Revision: 4402 http://geany.svn.sourceforge.net/geany/?rev=4402&view=rev Author: ntrel Date: 2009-11-05 18:02:08 +0000 (Thu, 05 Nov 2009)
Log Message: ----------- Show number of files saved on status bar when using Save All.
Modified Paths: -------------- trunk/ChangeLog trunk/src/callbacks.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-11-05 16:17:11 UTC (rev 4401) +++ trunk/ChangeLog 2009-11-05 18:02:08 UTC (rev 4402) @@ -3,6 +3,8 @@ * src/plugindata.h, HACKING: Deprecate PLUGIN_KEY_GROUP() macro - use plugin_set_key_group() instead. + * src/callbacks.c: + Show number of files saved on status bar when using Save All.
2009-11-04 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2009-11-05 16:17:11 UTC (rev 4401) +++ trunk/src/callbacks.c 2009-11-05 18:02:08 UTC (rev 4402) @@ -204,6 +204,7 @@ { gint i, max = gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook)); GeanyDocument *doc, *cur_doc = document_get_current(); + gint count = 0;
for (i = 0; i < max; i++) { @@ -215,11 +216,20 @@ /* display unnamed document */ gtk_notebook_set_current_page(GTK_NOTEBOOK(main_widgets.notebook), document_get_notebook_page(doc)); - dialogs_show_save_as(); + if (dialogs_show_save_as()) + count++; } else - document_save_file(doc, FALSE); + { + if (document_save_file(doc, FALSE)) + count++; + } } + if (!count) + return; + + ui_set_statusbar(FALSE, ngettext("%d file saved.", "%d files saved.", count), count); + /* saving may have changed window title, sidebar for another doc, so update */ sidebar_update_tag_list(cur_doc, TRUE); ui_set_window_title(cur_doc); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.