SF.net SVN: geany: [2391] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Sun Mar 23 16:43:02 UTC 2008
Revision: 2391
http://geany.svn.sourceforge.net/geany/?rev=2391&view=rev
Author: eht16
Date: 2008-03-23 09:43:01 -0700 (Sun, 23 Mar 2008)
Log Message:
-----------
Small improvement in counting changed documents for Save All update.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/ui_utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-03-23 16:32:36 UTC (rev 2390)
+++ trunk/ChangeLog 2008-03-23 16:43:01 UTC (rev 2391)
@@ -14,6 +14,8 @@
opening Find dialogs.
* src/keybindings.c, src/keybindings.h, src/plugindata.h:
Add shortcut to switch to the sidebar.
+ * src/ui_utils.c:
+ Small improvement in counting changed documents for Save All update.
2008-03-21 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2008-03-23 16:32:36 UTC (rev 2390)
+++ trunk/src/ui_utils.c 2008-03-23 16:43:01 UTC (rev 2391)
@@ -536,14 +536,17 @@
/* 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 files where changes were made and if there are some,
+ /* check whether there are files where changes were made and if there are some,
* we need the save all button / item */
- if (! dirty_tabs && doc_list[i].is_valid && doc_list[i].changed)
+ if (DOC_IDX_VALID(i) && doc_list[i].changed)
+ {
dirty_tabs = TRUE;
+ break;
+ }
}
- gtk_widget_set_sensitive(ui_widgets.save_buttons[2], (dirty_tabs > 0) ? TRUE : FALSE);
- gtk_widget_set_sensitive(ui_widgets.save_buttons[3], (dirty_tabs > 0) ? TRUE : FALSE);
+ gtk_widget_set_sensitive(ui_widgets.save_buttons[2], dirty_tabs);
+ gtk_widget_set_sensitive(ui_widgets.save_buttons[3], dirty_tabs);
}
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