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

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2393 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2008-03-24 13:23:01 +00:00
parent 056c296851
commit 91e8ffdbce

View File

@ -534,11 +534,11 @@ void ui_save_buttons_toggle(gboolean enable)
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;