]> www.fi.muni.cz Git - evince.git/commitdiff
Change sidebar ordering. Fixes bug #439939.
authorWouter Bolsterlee <wbolster@svn.gnome.org>
Sun, 20 May 2007 13:49:30 +0000 (13:49 +0000)
committerWouter Bolsterlee <wbolster@src.gnome.org>
Sun, 20 May 2007 13:49:30 +0000 (13:49 +0000)
2007-05-20  Wouter Bolsterlee  <wbolster@svn.gnome.org>

* shell/ev-sidebar.c: (ev_sidebar_add_page):
* shell/ev-window.c:

Change sidebar ordering. Fixes bug #439939.

svn path=/trunk/; revision=2470

ChangeLog
shell/ev-sidebar.c
shell/ev-window.c

index 9037d203a0c0db769506e4a32515d3d1ce07e3d9..c4268ada484d5c5831f1ee0ae95cb6b40bdeeeea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-05-20  Wouter Bolsterlee  <wbolster@svn.gnome.org>
+
+       * shell/ev-sidebar.c: (ev_sidebar_add_page):
+       * shell/ev-window.c:
+
+       Change sidebar ordering. Fixes bug #439939.
+
 2007-05-20  Marc Brockschmidt he+bugzilla.g@marcbrockschmidt.de
 
        * backend/comics/Makefile.am:
index 90e8c1daeb51366fe5cf382c1510fc71cb4462bc..06a29c78eb9830e7015777f31f2cd3835b5ac9c3 100644 (file)
@@ -451,7 +451,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 +460,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,
index 9615c9ab4a52ed6e6ac2f370a22c46406a14f134..dbba0990df2f2e89820844cb8eed0672cb7f18db 100644 (file)
@@ -5063,6 +5063,17 @@ ev_window_init (EvWindow *ev_window)
 
        /* Stub sidebar, for now */
 
+       sidebar_widget = ev_sidebar_thumbnails_new ();
+       ev_window->priv->sidebar_thumbs = sidebar_widget;
+       g_signal_connect (sidebar_widget,
+                         "notify::main-widget",
+                         G_CALLBACK (sidebar_page_main_widget_update_cb),
+                         ev_window);
+       sidebar_page_main_widget_update_cb (G_OBJECT (sidebar_widget), NULL, ev_window);
+       gtk_widget_show (sidebar_widget);
+       ev_sidebar_add_page (EV_SIDEBAR (ev_window->priv->sidebar),
+                            sidebar_widget);
+
        sidebar_widget = ev_sidebar_links_new ();
        ev_window->priv->sidebar_links = sidebar_widget;
        g_signal_connect (sidebar_widget,
@@ -5088,17 +5099,6 @@ ev_window_init (EvWindow *ev_window)
        ev_sidebar_add_page (EV_SIDEBAR (ev_window->priv->sidebar),
                             sidebar_widget);
 
-       sidebar_widget = ev_sidebar_thumbnails_new ();
-       ev_window->priv->sidebar_thumbs = sidebar_widget;
-       g_signal_connect (sidebar_widget,
-                         "notify::main-widget",
-                         G_CALLBACK (sidebar_page_main_widget_update_cb),
-                         ev_window);
-       sidebar_page_main_widget_update_cb (G_OBJECT (sidebar_widget), NULL, ev_window);
-       gtk_widget_show (sidebar_widget);
-       ev_sidebar_add_page (EV_SIDEBAR (ev_window->priv->sidebar),
-                            sidebar_widget);
-
        ev_window->priv->scrolled_window =
                GTK_WIDGET (g_object_new (GTK_TYPE_SCROLLED_WINDOW,
                                          "shadow-type", GTK_SHADOW_IN,