X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=shell%2Fev-sidebar.c;h=2d97381d5aee5a4426811e15e26cfb0442e9cb77;hb=e2796d0d1a833e63c9495193c9241bd718f68082;hp=90e8c1daeb51366fe5cf382c1510fc71cb4462bc;hpb=e637fd672cb1fa494600c66dc7b49a7f77c78aa8;p=evince.git diff --git a/shell/ev-sidebar.c b/shell/ev-sidebar.c index 90e8c1da..2d97381d 100644 --- a/shell/ev-sidebar.c +++ b/shell/ev-sidebar.c @@ -25,6 +25,7 @@ #endif #include + #include #include @@ -451,7 +452,8 @@ ev_sidebar_add_page (EvSidebar *ev_sidebar, gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (ev_sidebar->priv->menu), menu_item); - + + /* Insert and move to end */ gtk_list_store_insert_with_values (GTK_LIST_STORE (ev_sidebar->priv->page_model), &iter, 0, PAGE_COLUMN_TITLE, title, @@ -459,7 +461,10 @@ ev_sidebar_add_page (EvSidebar *ev_sidebar, PAGE_COLUMN_MAIN_WIDGET, main_widget, PAGE_COLUMN_NOTEBOOK_INDEX, index, -1); - + gtk_list_store_move_before(GTK_LIST_STORE(ev_sidebar->priv->page_model), + &iter, NULL); + + /* Set the first item added as active */ gtk_tree_model_get_iter_first (ev_sidebar->priv->page_model, &iter); gtk_tree_model_get (ev_sidebar->priv->page_model,