From: Nickolay V. Shmyrev Date: Sun, 28 Jan 2007 10:25:48 +0000 (+0000) Subject: Reorder menu items and build menu with fixed length X-Git-Tag: EVINCE_0_7_2~66 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=761766c8ca4392f376d898ba037f1f2fa3822e95;p=evince.git Reorder menu items and build menu with fixed length svn path=/trunk/; revision=2255 --- diff --git a/ChangeLog b/ChangeLog index dc58733a..0fd8b824 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-01-28 Nickolay V. Shmyrev + + * shell/ev-navigation-action.c: (build_menu): + + Reorder menu items and build menu with fixed length. + 2007-01-27 Ed Catmur * shell/ev-view.c: (get_selected_text): diff --git a/shell/ev-navigation-action.c b/shell/ev-navigation-action.c index bedadfe9..490b5f92 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);