Revision: 784 http://svn.sourceforge.net/geany/?rev=784&view=rev Author: eht16 Date: 2006-09-03 06:30:12 -0700 (Sun, 03 Sep 2006)
Log Message: ----------- Save All button is also active when only one file is changed(improves usability).
Modified Paths: -------------- trunk/ChangeLog trunk/src/utils.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-09-02 23:28:34 UTC (rev 783) +++ trunk/ChangeLog 2006-09-03 13:30:12 UTC (rev 784) @@ -1,3 +1,9 @@ +2006-09-03 Enrico Tröger enrico.troeger@uvena.de + + * src/utils.c: Save All button is also active when only one file is + changed(improves usability). + + 2006-09-02 Enrico Tröger enrico.troeger@uvena.de
* src/document.c, src/search.c:
Modified: trunk/src/utils.c =================================================================== --- trunk/src/utils.c 2006-09-02 23:28:34 UTC (rev 783) +++ trunk/src/utils.c 2006-09-03 13:30:12 UTC (rev 784) @@ -249,7 +249,7 @@ void utils_save_buttons_toggle(gboolean enable) { guint i; - guint dirty_tabs = 0; + gboolean dirty_tabs = FALSE;
gtk_widget_set_sensitive(app->save_buttons[0], enable); gtk_widget_set_sensitive(app->save_buttons[1], enable); @@ -257,14 +257,14 @@ // save all menu item and tool button for (i = 0; i < (guint) gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)); i++) { - // count the amount of tabs where changes were made and if they are more than one, + // count the amount of files where changes were made and if there are some, // we need the save all button / item - if (doc_list[i].is_valid && doc_list[i].changed) - dirty_tabs++; + if (! dirty_tabs && doc_list[i].is_valid && doc_list[i].changed) + dirty_tabs = TRUE; }
- gtk_widget_set_sensitive(app->save_buttons[2], (dirty_tabs > 1) ? TRUE : FALSE); - gtk_widget_set_sensitive(app->save_buttons[3], (dirty_tabs > 1) ? TRUE : FALSE); + gtk_widget_set_sensitive(app->save_buttons[2], (dirty_tabs > 0) ? TRUE : FALSE); + gtk_widget_set_sensitive(app->save_buttons[3], (dirty_tabs > 0) ? TRUE : FALSE); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.