Improving native Windows file dialog in Rambetter-temp-fixes branch some

more.  This adds new code and improves code committed in revision 351.

- Calling GetOpenFileName() and GetSaveFileName() from a new thread, thus
allowing the main thread to continue refreshing GtkRadiant while the native
Windows file dialog is open.  Prevents the ugly "hall of mirrors" effect.
A similar approach is used in the open source Inkscape, so I'm not doing
anything too dangerous here.  However, this _is_ hacky in my opinion.

- Using memset() to zero out the memory of the OPENFILENAME structure.
This is safer than selectively setting fields on this structure.  We no
longer need to explicity set certain field to NULL now.

- "all files" filter now lowercase to be consistent with other code.

These changes have been tested on Windows XP and Windows 7.

THIS COMMIT SHOULD BE MERGED INTO TRUNK AT SOME POINT!!!


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-temp-fixes@352 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
rambetter
2010-12-18 03:03:55 +00:00
parent f482df40a1
commit b1b208f12e
2 changed files with 76 additions and 19 deletions

View File

@@ -2218,7 +2218,7 @@ void PrefsDlg::BuildDialog ()
#ifdef _WIN32
// win32 file dialog
check = gtk_check_button_new_with_label (_("Use win32 file load dialog"));
check = gtk_check_button_new_with_label (_("Use win32 file load dialog (hacky)"));
gtk_widget_show (check);
// gtk_container_add (GTK_CONTAINER (vbox), check);
gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);