SF.net SVN: geany:[4913] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sat May 15 11:47:22 UTC 2010


Revision: 4913
          http://geany.svn.sourceforge.net/geany/?rev=4913&view=rev
Author:   eht16
Date:     2010-05-15 11:47:22 +0000 (Sat, 15 May 2010)

Log Message:
-----------
Don't use file filters for the native Windows Save As dialog.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/win32.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-05-15 11:35:26 UTC (rev 4912)
+++ trunk/ChangeLog	2010-05-15 11:47:22 UTC (rev 4913)
@@ -2,6 +2,7 @@
 
  * src/win32.c:
    Sort file filters for the native Windows file open dialog by name.
+   Don't use file filters for the native Windows Save As dialog.
 
 
 2010-05-15  Frank Lanitz  <frank(at)frank(dot)uvena(dot)de>

Modified: trunk/src/win32.c
===================================================================
--- trunk/src/win32.c	2010-05-15 11:35:26 UTC (rev 4912)
+++ trunk/src/win32.c	2010-05-15 11:47:22 UTC (rev 4913)
@@ -133,6 +133,23 @@
 }
 
 
+static wchar_t *get_file_filter_all_files(void)
+{
+	guint len;
+	static wchar_t title[4096];
+	gchar *filter;
+
+	/* create meta file filter "All files" */
+	filter = g_strdup_printf("%s\0*\0", _("All files"));
+
+	len = strlen(_("All files")) + 3;
+	MultiByteToWideChar(CP_UTF8, 0, filter, len, title, sizeof(title));
+	g_free(filter);
+
+	return title;
+}
+
+
 static wchar_t *get_filters(gboolean project_files)
 {
 	gchar *string;
@@ -447,9 +464,9 @@
 #endif
 	of.hwndOwner = GDK_WINDOW_HWND(GTK_WIDGET(parent)->window);
 
-	of.lpstrFilter = get_file_filters();
+	of.lpstrFilter = get_file_filter_all_files();
 	of.lpstrCustomFilter = NULL;
-	of.nFilterIndex = GEANY_FILETYPES_NONE + 1;
+	of.nFilterIndex = 0;
 
 	of.lpstrFile = w_file;
 	of.nMaxFile = 2048;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list