[geany/geany] 50b150: Merge pull request #583 from eht16/win32_fix_native_dialogs
Enrico Tröger
git-noreply at xxxxx
Wed Jul 22 19:50:57 UTC 2015
Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger at uvena.de>
Committer: Enrico Tröger <enrico.troeger at uvena.de>
Date: Wed, 22 Jul 2015 19:50:57 UTC
Commit: 50b150b66d6ee659446f89749382cf9bd6158a19
https://github.com/geany/geany/commit/50b150b66d6ee659446f89749382cf9bd6158a19
Log Message:
-----------
Merge pull request #583 from eht16/win32_fix_native_dialogs
Windows: restore modern design of native file dialogs
Modified Paths:
--------------
src/win32.c
Modified: src/win32.c
35 lines changed, 9 insertions(+), 26 deletions(-)
===================================================================
@@ -300,7 +300,7 @@ gchar *win32_show_folder_dialog(GtkWidget *parent, const gchar *title, const gch
bi.lpszTitle = w_title;
bi.lpfn = BrowseCallbackProc;
bi.lParam = (LPARAM) get_dir_for_path(initial_dir);
- bi.ulFlags = BIF_DONTGOBELOWDOMAIN | BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT;
+ bi.ulFlags = BIF_DONTGOBELOWDOMAIN | BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT | BIF_USENEWUI;
pidl = SHBrowseForFolderW(&bi);
@@ -343,11 +343,7 @@ gchar *win32_show_project_open_dialog(GtkWidget *parent, const gchar *title,
/* initialise file dialog info struct */
memset(&of, 0, sizeof of);
-#ifdef OPENFILENAME_SIZE_VERSION_400
- of.lStructSize = OPENFILENAME_SIZE_VERSION_400;
-#else
of.lStructSize = sizeof of;
-#endif
of.hwndOwner = GDK_WINDOW_HWND(gtk_widget_get_window(parent));
of.lpstrFilter = get_filters(project_file_filter);
@@ -359,7 +355,8 @@ gchar *win32_show_project_open_dialog(GtkWidget *parent, const gchar *title,
of.lpstrFileTitle = NULL;
of.lpstrTitle = w_title;
of.lpstrDefExt = L"";
- of.Flags = OFN_PATHMUSTEXIST | OFN_EXPLORER | OFN_HIDEREADONLY | OFN_ENABLEHOOK;
+ of.Flags = OFN_PATHMUSTEXIST | OFN_EXPLORER | OFN_HIDEREADONLY |
+ OFN_ENABLEHOOK | OFN_ENABLESIZING;
of.lpfnHook = win32_dialog_explorer_hook_proc;
if (! allow_new_file)
of.Flags |= OFN_FILEMUSTEXIST;
@@ -406,11 +403,7 @@ gboolean win32_show_document_open_dialog(GtkWindow *parent, const gchar *title,
/* initialise file dialog info struct */
memset(&of, 0, sizeof of);
-#ifdef OPENFILENAME_SIZE_VERSION_400
- of.lStructSize = OPENFILENAME_SIZE_VERSION_400;
-#else
of.lStructSize = sizeof of;
-#endif
of.hwndOwner = GDK_WINDOW_HWND(gtk_widget_get_window(GTK_WIDGET(parent)));
of.lpstrFilter = get_file_filters();
@@ -422,7 +415,8 @@ gboolean win32_show_document_open_dialog(GtkWindow *parent, const gchar *title,
of.lpstrFileTitle = NULL;
of.lpstrTitle = w_title;
of.lpstrDefExt = L"";
- of.Flags = OFN_ALLOWMULTISELECT | OFN_FILEMUSTEXIST | OFN_EXPLORER | OFN_ENABLEHOOK;
+ of.Flags = OFN_ALLOWMULTISELECT | OFN_FILEMUSTEXIST | OFN_EXPLORER |
+ OFN_ENABLEHOOK | OFN_ENABLESIZING;
of.lpfnHook = win32_dialog_explorer_hook_proc;
retval = GetOpenFileNameW(&of);
@@ -500,11 +494,7 @@ gchar *win32_show_document_save_as_dialog(GtkWindow *parent, const gchar *title,
/* initialise file dialog info struct */
memset(&of, 0, sizeof of);
-#ifdef OPENFILENAME_SIZE_VERSION_400
- of.lStructSize = OPENFILENAME_SIZE_VERSION_400;
-#else
of.lStructSize = sizeof of;
-#endif
of.hwndOwner = GDK_WINDOW_HWND(gtk_widget_get_window(GTK_WIDGET(parent)));
of.lpstrFilter = get_file_filter_all_files();
@@ -516,7 +506,7 @@ gchar *win32_show_document_save_as_dialog(GtkWindow *parent, const gchar *title,
of.lpstrFileTitle = NULL;
of.lpstrTitle = w_title;
of.lpstrDefExt = L"";
- of.Flags = OFN_OVERWRITEPROMPT | OFN_EXPLORER | OFN_ENABLEHOOK;
+ of.Flags = OFN_OVERWRITEPROMPT | OFN_EXPLORER | OFN_ENABLEHOOK | OFN_ENABLESIZING;
of.lpfnHook = win32_dialog_explorer_hook_proc;
retval = GetSaveFileNameW(&of);
@@ -557,11 +547,7 @@ gchar *win32_show_file_dialog(GtkWindow *parent, const gchar *title, const gchar
/* initialise file dialog info struct */
memset(&of, 0, sizeof of);
-#ifdef OPENFILENAME_SIZE_VERSION_400
- of.lStructSize = OPENFILENAME_SIZE_VERSION_400;
-#else
of.lStructSize = sizeof of;
-#endif
of.hwndOwner = GDK_WINDOW_HWND(gtk_widget_get_window(GTK_WIDGET(parent)));
of.lpstrFile = w_file;
@@ -569,7 +555,7 @@ gchar *win32_show_file_dialog(GtkWindow *parent, const gchar *title, const gchar
of.lpstrFileTitle = NULL;
of.lpstrTitle = w_title;
of.lpstrDefExt = L"";
- of.Flags = OFN_FILEMUSTEXIST | OFN_EXPLORER | OFN_ENABLEHOOK;
+ of.Flags = OFN_FILEMUSTEXIST | OFN_EXPLORER | OFN_ENABLEHOOK | OFN_ENABLESIZING;
of.lpfnHook = win32_dialog_explorer_hook_proc;
retval = GetOpenFileNameW(&of);
@@ -674,11 +660,7 @@ void win32_show_pref_file_dialog(GtkEntry *item)
/* initialize file dialog info struct */
memset(&of, 0, sizeof of);
-#ifdef OPENFILENAME_SIZE_VERSION_400
- of.lStructSize = OPENFILENAME_SIZE_VERSION_400;
-#else
of.lStructSize = sizeof of;
-#endif
of.hwndOwner = GDK_WINDOW_HWND(gtk_widget_get_window(ui_widgets.prefs_dialog));
of.lpstrFilter = get_filters(FALSE);
@@ -692,7 +674,8 @@ void win32_show_pref_file_dialog(GtkEntry *item)
of.lpstrInitialDir = NULL;
of.lpstrTitle = NULL;
of.lpstrDefExt = L"exe";
- of.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_EXPLORER | OFN_ENABLEHOOK;
+ of.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_EXPLORER |
+ OFN_ENABLEHOOK | OFN_ENABLESIZING;
of.lpfnHook = win32_dialog_explorer_hook_proc;
retval = GetOpenFileNameW(&of);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list