[Xfce4-commits] <mousepad:master> Fix error in recent actions.
Nick Schermer
noreply at xfce.org
Sat May 5 21:31:28 CEST 2012
Updating branch refs/heads/master
to ff0faf3c3250b4e56598aec891109d96f3aece7a (commit)
from 185821ae262235222f7ef1d3a86dc0ea2b19bbd9 (commit)
commit ff0faf3c3250b4e56598aec891109d96f3aece7a
Author: Nick Schermer <nick at xfce.org>
Date: Fri Oct 15 16:24:59 2010 +0200
Fix error in recent actions.
mousepad/mousepad-window.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c
index deb9696..a434867 100644
--- a/mousepad/mousepad-window.c
+++ b/mousepad/mousepad-window.c
@@ -2380,7 +2380,7 @@ mousepad_window_recent_menu_idle (gpointer user_data)
g_object_get (G_OBJECT (window->preferences), "misc-recent-menu-items", &n, NULL);
/* append the items to the menu */
- for (li = filtered; n > 0 && li != NULL; li = li->next)
+ for (li = filtered, i = 1; n > 0 && li != NULL; li = li->next)
{
info = li->data;
@@ -2392,7 +2392,7 @@ mousepad_window_recent_menu_idle (gpointer user_data)
if (filename && g_file_test (filename, G_FILE_TEST_EXISTS))
{
/* create the action name */
- g_snprintf (name, sizeof (name), "recent-info-%d", n);
+ g_snprintf (name, sizeof (name), "recent-info-%d", i);
/* get the name of the item and escape the underscores */
display_name = gtk_recent_info_get_display_name (info);
@@ -2425,8 +2425,9 @@ mousepad_window_recent_menu_idle (gpointer user_data)
"/main-menu/file-menu/recent-menu/placeholder-recent-items",
name, name, GTK_UI_MANAGER_MENUITEM, FALSE);
- /* decrease counter */
+ /* update couters */
n--;
+ i++;
}
else
{
More information about the Xfce4-commits
mailing list