SF.net SVN: geany: [2393] trunk/src/ui_utils.c

ntrel at users.sourceforge.net ntrel at xxxxx
Mon Mar 24 13:23:12 UTC 2008


Revision: 2393
          http://geany.svn.sourceforge.net/geany/?rev=2393&view=rev
Author:   ntrel
Date:     2008-03-24 06:23:01 -0700 (Mon, 24 Mar 2008)

Log Message:
-----------
Fix comparison always true warning, use doc_array->len instead of number of notebook tabs.

Modified Paths:
--------------
    trunk/src/ui_utils.c

Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c	2008-03-24 13:09:29 UTC (rev 2392)
+++ trunk/src/ui_utils.c	2008-03-24 13:23:01 UTC (rev 2393)
@@ -534,11 +534,11 @@
 	gtk_widget_set_sensitive(ui_widgets.save_buttons[1], enable);
 
 	/* save all menu item and tool button */
-	for (i = 0; i < (guint) gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)); i++)
+	for (i = 0; i < doc_array->len; i++)
 	{
 		/* check whether there are files where changes were made and if there are some,
 		 * we need the save all button / item */
-		if (DOC_IDX_VALID(i) && doc_list[i].changed)
+		if (doc_list[i].is_valid && doc_list[i].changed)
 		{
 			dirty_tabs = TRUE;
 			break;


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