SF.net SVN: geany: [1818] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Fri Aug 24 11:19:26 UTC 2007
Revision: 1818
http://geany.svn.sourceforge.net/geany/?rev=1818&view=rev
Author: ntrel
Date: 2007-08-24 04:19:26 -0700 (Fri, 24 Aug 2007)
Log Message:
-----------
Fix saving the wrong document when using Save All with unnamed
documents.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/callbacks.c
trunk/src/dialogs.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-08-23 17:59:22 UTC (rev 1817)
+++ trunk/ChangeLog 2007-08-24 11:19:26 UTC (rev 1818)
@@ -1,3 +1,10 @@
+2007-08-24 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/dialogs.c, src/callbacks.c:
+ Fix saving the wrong document when using Save All with unnamed
+ documents.
+
+
2007-08-23 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/document.c: Fix invalid filetype setting when using Save All and
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2007-08-23 17:59:22 UTC (rev 1817)
+++ trunk/src/callbacks.c 2007-08-24 11:19:26 UTC (rev 1818)
@@ -228,12 +228,18 @@
{
gint i, idx, max = gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook));
gint cur_idx = document_get_cur_idx();
- for(i = 0; i < max; i++)
+
+ for (i = 0; i < max; i++)
{
idx = document_get_n_idx(i);
if (! doc_list[idx].changed) continue;
if (doc_list[idx].file_name == NULL)
+ {
+ // display unnamed document
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook),
+ document_get_notebook_page(idx));
dialogs_show_save_as();
+ }
else
document_save_file(idx, FALSE);
}
Modified: trunk/src/dialogs.c
===================================================================
--- trunk/src/dialogs.c 2007-08-23 17:59:22 UTC (rev 1817)
+++ trunk/src/dialogs.c 2007-08-24 11:19:26 UTC (rev 1818)
@@ -451,8 +451,8 @@
#endif
-/* This shows the file selection dialog to save a file, returning TRUE if
- * the file was saved. */
+/* Show the Save As dialog for the current notebook page.
+ * Returns: TRUE if the file was saved. */
gboolean dialogs_show_save_as()
{
#if GEANY_USE_WIN32_DIALOG
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