]> www.fi.muni.cz Git - evince.git/commitdiff
Reorder menu items and build menu with fixed length
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sun, 28 Jan 2007 10:25:48 +0000 (10:25 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sun, 28 Jan 2007 10:25:48 +0000 (10:25 +0000)
svn path=/trunk/; revision=2255

ChangeLog
shell/ev-navigation-action.c

index dc58733a86948adf67cbcca7d9511d201a1641e8..0fd8b82451281a49f474ec86479c35f2ac7858f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-28  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * shell/ev-navigation-action.c: (build_menu):
+       
+       Reorder menu items and build menu with fixed length.
+
 2007-01-27  Ed Catmur  <ed@catmur.co.uk>
 
        * shell/ev-view.c: (get_selected_text):
index bedadfe90ab9370359f90f0d4a061d262ee75035..490b5f92bbfb06c0828346c7fe96fe10ec96a24e 100644 (file)
@@ -144,13 +144,13 @@ build_menu (EvNavigationAction *action)
                return GTK_WIDGET (menu);
        }
 
-       start = 0;
-       end = ev_history_get_n_links (history);
+       start = MAX (ev_history_get_current_index (action->priv->history) - 5, 0);
+       end = MIN (ev_history_get_n_links (history), start + 7);
 
        for (i = start; i < end; i++) {
                link = ev_history_get_link_nth (history, i);
                item = new_history_menu_item (action, link, i);
-               gtk_menu_shell_append (menu, item);
+               gtk_menu_shell_prepend (menu, item);
        }
 
        return GTK_WIDGET (menu);