diff options
author | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2007-01-28 10:25:48 (GMT) |
---|---|---|
committer | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2007-01-28 10:25:48 (GMT) |
commit | 761766c8ca4392f376d898ba037f1f2fa3822e95 (patch) | |
tree | a75a6f79c920adebdd7511b86a70a211cc97e40d /shell/ev-navigation-action.c | |
parent | 9de1152cd935d9f00f2709052d25d42b18cb1b0f (diff) |
Reorder menu items and build menu with fixed length
svn path=/trunk/; revision=2255
Diffstat (limited to 'shell/ev-navigation-action.c')
-rw-r--r-- | shell/ev-navigation-action.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/ev-navigation-action.c b/shell/ev-navigation-action.c index bedadfe..490b5f9 100644 --- a/shell/ev-navigation-action.c +++ b/shell/ev-navigation-action.c @@ -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); |