SF.net SVN: geany:[4915] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sat May 15 12:05:55 UTC 2010


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

Log Message:
-----------
Call handle_save_as() only when the Save As dialog was not cancelled.

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-05-15 11:57:40 UTC (rev 4914)
+++ trunk/ChangeLog	2010-05-15 12:05:54 UTC (rev 4915)
@@ -7,6 +7,8 @@
    Remove old code.
    Pass and use also parent and title arguments to
    win32_show_document_open_dialog().
+ * src/dialogs.c:
+   Call handle_save_as() only when the Save As dialog was not cancelled.
 
 
 2010-05-15  Frank Lanitz  <frank(at)frank(dot)uvena(dot)de>

Modified: trunk/src/dialogs.c
===================================================================
--- trunk/src/dialogs.c	2010-05-15 11:57:40 UTC (rev 4914)
+++ trunk/src/dialogs.c	2010-05-15 12:05:54 UTC (rev 4915)
@@ -226,7 +226,7 @@
 	setptr(initdir, utils_get_locale_from_utf8(initdir));
 
 #if GEANY_USE_WIN32_DIALOG
-	win32_show_document_open_dialog(TRUE, initdir);
+	win32_show_document_open_dialog(GTK_WINDOW(main_widgets.window), _("Open File"), initdir);
 #else /* X11, not win32: use GTK_FILE_CHOOSER */
 
 	/* We use the same file selection widget each time, so first of all we create it
@@ -551,13 +551,14 @@
  **/
 gboolean dialogs_show_save_as()
 {
-	gboolean result;
+	gboolean result = FALSE;
 
 #if GEANY_USE_WIN32_DIALOG
 	GeanyDocument *doc = document_get_current();
 	gchar *utf8_name = win32_show_document_save_as_dialog(GTK_WINDOW(main_widgets.window),
 					_("Save File"), DOC_FILENAME(doc));
-	result = handle_save_as(utf8_name, FALSE, FALSE);
+	if (utf8_name != NULL)
+		result = handle_save_as(utf8_name, FALSE, FALSE);
 #else
 	result = gtk_show_save_as();
 #endif


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