]> www.fi.muni.cz Git - evince.git/commitdiff
Construct an actual sidebar.
authorJonathan Blandford <jrb@redhat.com>
Wed, 22 Dec 2004 04:21:54 +0000 (04:21 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Wed, 22 Dec 2004 04:21:54 +0000 (04:21 +0000)
Tue Dec 21 23:20:35 2004  Jonathan Blandford  <jrb@redhat.com>

        * shell/ev-sidebar.c: Construct an actual sidebar.
        * shell/ev-sidebar-bookmarks.[ch]:
        * shell/ev-sidebar-thumbnails.[ch]: Stub out sidebars.

ChangeLog
shell/Makefile.am
shell/ev-sidebar-bookmarks.c [new file with mode: 0644]
shell/ev-sidebar-bookmarks.h [new file with mode: 0644]
shell/ev-sidebar-thumbnails.c [new file with mode: 0644]
shell/ev-sidebar-thumbnails.h [new file with mode: 0644]
shell/ev-sidebar.c
shell/ev-sidebar.h
shell/ev-window.c

index 8b5ecb3439efb0424f4a00d1fc99966f8e588db9..97e906a34d02b85b283a777917b1769199d9b308 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Dec 21 23:20:35 2004  Jonathan Blandford  <jrb@redhat.com>
+
+       * shell/ev-sidebar.c: Construct an actual sidebar.
+       * shell/ev-sidebar-bookmarks.[ch]:
+       * shell/ev-sidebar-thumbnails.[ch]: Stub out sidebars.
+
 Tue Dec 21 23:05:51 2004  Owen Taylor  <otaylor@redhat.com>
 
        * backend/ev-document.{h,cc} pdf/xpdf/pdf-document.cc:
index 48aa917562f6a6d2cfb2e4340316ee1ab4e14810..67ec0b075889affa7a120687c3350465cccf9b6d 100644 (file)
@@ -26,6 +26,10 @@ evince_SOURCES=                              \
        ev-window.h                     \
        ev-sidebar.c                    \
        ev-sidebar.h                    \
+       ev-sidebar-bookmarks.c          \
+       ev-sidebar-bookmarks.h          \
+       ev-sidebar-thumbnails.c         \
+       ev-sidebar-thumbnails.h         \
        main.c                          \
        $(NULL)
 
diff --git a/shell/ev-sidebar-bookmarks.c b/shell/ev-sidebar-bookmarks.c
new file mode 100644 (file)
index 0000000..b7e060f
--- /dev/null
@@ -0,0 +1,100 @@
+/* this file is part of evince, a gnome document viewer
+ *
+ *  Copyright (C) 2004 Red Hat, Inc.
+ *
+ *  Author:
+ *    Jonathan Blandford <jrb@alum.mit.edu>
+ *
+ * Evince is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Evince is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+#include <gtk/gtk.h>
+
+#include "ev-sidebar-bookmarks.h"
+
+struct _EvSidebarBookmarksPrivate {
+       GtkWidget *tree_view;
+};
+
+enum {
+       BOOKMARKS_COLUMN_MARKUP,
+       BOOKMARKS_COLUMN_OUTLINE,
+       BOOKMARKS_COLUMN_PAGE_NUM,
+       BOOKMARKS_COLUMN_PAGE_VALID,
+       NUM_COLUMNS
+};
+
+G_DEFINE_TYPE (EvSidebarBookmarks, ev_sidebar_bookmarks, GTK_TYPE_VBOX)
+
+#define EV_SIDEBAR_BOOKMARKS_GET_PRIVATE(object) \
+       (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_SIDEBAR_BOOKMARKS, EvSidebarBookmarksPrivate))
+
+static void
+ev_sidebar_bookmarks_class_init (EvSidebarBookmarksClass *ev_sidebar_bookmarks_class)
+{
+       GObjectClass *g_object_class;
+
+       g_object_class = G_OBJECT_CLASS (ev_sidebar_bookmarks_class);
+
+       g_type_class_add_private (g_object_class, sizeof (EvSidebarBookmarksPrivate));
+
+}
+
+
+static void
+ev_sidebar_bookmarks_construct (EvSidebarBookmarks *ev_sidebar_bookmarks)
+{
+       EvSidebarBookmarksPrivate *priv;
+       GtkWidget *swindow;
+
+       priv = ev_sidebar_bookmarks->priv;
+       swindow = gtk_scrolled_window_new (NULL, NULL);
+
+       gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+                                       GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+       gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (swindow),
+                                            GTK_SHADOW_IN);
+
+       /* Create tree view */
+       priv->tree_view = gtk_tree_view_new ();
+       gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (priv->tree_view), FALSE);
+       gtk_container_add (GTK_CONTAINER (swindow), priv->tree_view);
+
+       gtk_box_pack_start (GTK_BOX (ev_sidebar_bookmarks), swindow, TRUE, TRUE, 0);
+       gtk_widget_show_all (GTK_WIDGET (ev_sidebar_bookmarks));
+}
+
+static void
+ev_sidebar_bookmarks_init (EvSidebarBookmarks *ev_sidebar_bookmarks)
+{
+       ev_sidebar_bookmarks->priv = EV_SIDEBAR_BOOKMARKS_GET_PRIVATE (ev_sidebar_bookmarks);
+
+       ev_sidebar_bookmarks_construct (ev_sidebar_bookmarks);
+}
+
+GtkWidget *
+ev_sidebar_bookmarks_new (void)
+{
+       GtkWidget *ev_sidebar_bookmarks;
+
+       ev_sidebar_bookmarks = g_object_new (EV_TYPE_SIDEBAR_BOOKMARKS, NULL);
+
+       return ev_sidebar_bookmarks;
+}
diff --git a/shell/ev-sidebar-bookmarks.h b/shell/ev-sidebar-bookmarks.h
new file mode 100644 (file)
index 0000000..86902c7
--- /dev/null
@@ -0,0 +1,59 @@
+/* ev-sidebar-bookmarks.h
+ *  this file is part of evince, a gnome document viewer
+ * 
+ * Copyright (C) 2004 Red Hat, Inc.
+ *
+ * Author:
+ *   Jonathan Blandford <jrb@alum.mit.edu>
+ *
+ * Evince is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Evince is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EV_SIDEBAR_BOOKMARKS_H__
+#define __EV_SIDEBAR_BOOKMARKS_H__
+
+#include <gtk/gtkvbox.h>
+
+G_BEGIN_DECLS
+
+typedef struct _EvSidebarBookmarks EvSidebarBookmarks;
+typedef struct _EvSidebarBookmarksClass EvSidebarBookmarksClass;
+typedef struct _EvSidebarBookmarksPrivate EvSidebarBookmarksPrivate;
+
+#define EV_TYPE_SIDEBAR_BOOKMARKS              (ev_sidebar_bookmarks_get_type())
+#define EV_SIDEBAR_BOOKMARKS(object)           (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_SIDEBAR_BOOKMARKS, EvSidebarBookmarks))
+#define EV_SIDEBAR_BOOKMARKS_CLASS(klass)      (G_TYPE_CHACK_CLASS_CAST((klass), EV_TYPE_SIDEBAR_BOOKMARKS, EvSidebarBookmarksClass))
+#define EV_IS_SIDEBAR_BOOKMARKS(object)                (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_SIDEBAR_BOOKMARKS))
+#define EV_IS_SIDEBAR_BOOKMARKS_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_SIDEBAR_BOOKMARKS))
+#define EV_SIDEBAR_BOOKMARKS_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_SIDEBAR_BOOKMARKS, EvSidebarBookmarksClass))
+
+struct _EvSidebarBookmarks {
+       GtkVBox base_instance;
+
+       EvSidebarBookmarksPrivate *priv;
+};
+
+struct _EvSidebarBookmarksClass {
+       GtkVBoxClass base_class;
+};
+
+GType      ev_sidebar_bookmarks_get_type (void);
+GtkWidget *ev_sidebar_bookmarks_new      (void);
+
+G_END_DECLS
+
+#endif /* __EV_SIDEBAR_BOOKMARKS_H__ */
+
+
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c
new file mode 100644 (file)
index 0000000..a2f5d76
--- /dev/null
@@ -0,0 +1,73 @@
+/* this file is part of evince, a gnome document viewer
+ *
+ *  Copyright (C) 2004 Red Hat, Inc.
+ *
+ *  Author:
+ *    Jonathan Blandford <jrb@alum.mit.edu>
+ *
+ * Evince is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Evince is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+#include <gtk/gtk.h>
+
+#include "ev-sidebar-thumbnails.h"
+
+struct _EvSidebarThumbnailsPrivate {
+       int dummy;
+};
+
+G_DEFINE_TYPE (EvSidebarThumbnails, ev_sidebar_thumbnails, GTK_TYPE_VBOX)
+
+#define EV_SIDEBAR_THUMBNAILS_GET_PRIVATE(object) \
+       (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_SIDEBAR_THUMBNAILS, EvSidebarThumbnailsPrivate))
+
+static void
+ev_sidebar_thumbnails_class_init (EvSidebarThumbnailsClass *ev_sidebar_thumbnails_class)
+{
+       GObjectClass *g_object_class;
+
+       g_object_class = G_OBJECT_CLASS (ev_sidebar_thumbnails_class);
+
+       g_type_class_add_private (g_object_class, sizeof (EvSidebarThumbnailsPrivate));
+
+}
+
+static void
+ev_sidebar_thumbnails_init (EvSidebarThumbnails *ev_sidebar_thumbnails)
+{
+       GtkWidget *label;
+
+       ev_sidebar_thumbnails->priv = EV_SIDEBAR_THUMBNAILS_GET_PRIVATE (ev_sidebar_thumbnails);
+       
+       label = gtk_label_new ("Thumbnails!");
+       gtk_box_pack_start (GTK_BOX (ev_sidebar_thumbnails), label,
+                           TRUE, TRUE, 0);
+       gtk_widget_show (label);
+}
+
+GtkWidget *
+ev_sidebar_thumbnails_new (void)
+{
+       GtkWidget *ev_sidebar_thumbnails;
+
+       ev_sidebar_thumbnails = g_object_new (EV_TYPE_SIDEBAR_THUMBNAILS, NULL);
+
+       return ev_sidebar_thumbnails;
+}
diff --git a/shell/ev-sidebar-thumbnails.h b/shell/ev-sidebar-thumbnails.h
new file mode 100644 (file)
index 0000000..e0ccccf
--- /dev/null
@@ -0,0 +1,59 @@
+/* ev-sidebar-thumbnails.h
+ *  this file is part of evince, a gnome document viewer
+ * 
+ * Copyright (C) 2004 Red Hat, Inc.
+ *
+ * Author:
+ *   Jonathan Blandford <jrb@alum.mit.edu>
+ *
+ * Evince is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Evince is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EV_SIDEBAR_THUMBNAILS_H__
+#define __EV_SIDEBAR_THUMBNAILS_H__
+
+#include <gtk/gtkvbox.h>
+
+G_BEGIN_DECLS
+
+typedef struct _EvSidebarThumbnails EvSidebarThumbnails;
+typedef struct _EvSidebarThumbnailsClass EvSidebarThumbnailsClass;
+typedef struct _EvSidebarThumbnailsPrivate EvSidebarThumbnailsPrivate;
+
+#define EV_TYPE_SIDEBAR_THUMBNAILS             (ev_sidebar_thumbnails_get_type())
+#define EV_SIDEBAR_THUMBNAILS(object)          (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_SIDEBAR_THUMBNAILS, EvSidebarThumbnails))
+#define EV_SIDEBAR_THUMBNAILS_CLASS(klass)     (G_TYPE_CHACK_CLASS_CAST((klass), EV_TYPE_SIDEBAR_THUMBNAILS, EvSidebarThumbnailsClass))
+#define EV_IS_SIDEBAR_THUMBNAILS(object)               (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_SIDEBAR_THUMBNAILS))
+#define EV_IS_SIDEBAR_THUMBNAILS_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_SIDEBAR_THUMBNAILS))
+#define EV_SIDEBAR_THUMBNAILS_GET_CLASS(object)        (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_SIDEBAR_THUMBNAILS, EvSidebarThumbnailsClass))
+
+struct _EvSidebarThumbnails {
+       GtkVBox base_instance;
+
+       EvSidebarThumbnailsPrivate *priv;
+};
+
+struct _EvSidebarThumbnailsClass {
+       GtkVBoxClass base_class;
+};
+
+GType      ev_sidebar_thumbnails_get_type (void);
+GtkWidget *ev_sidebar_thumbnails_new      (void);
+
+G_END_DECLS
+
+#endif /* __EV_SIDEBAR_THUMBNAILS_H__ */
+
+
index 7f2747de9ac063dde27693eec647d7d2c1d80833..4ff8405293fa5fe49d6138c3fff21b70a59c940d 100644 (file)
 
 #include "ev-sidebar.h"
 
+typedef struct
+{
+       char *id;
+       char *title;
+       GtkWidget *main_widget;
+} EvSidebarPage;
+
+enum
+{
+       PAGE_COLUMN_ID,
+       PAGE_COLUMN_TITLE,
+       PAGE_COLUMN_MAIN_WIDGET,
+       PAGE_COLUMN_NOTEBOOK_INDEX,
+       PAGE_COLUMN_NUM_COLS
+};
+
 struct _EvSidebarPrivate {
        GtkWidget *option_menu;
        GtkWidget *notebook;
+
+       GtkTreeModel *page_model;
 };
 
+static void ev_sidebar_omenu_changed_cb (GtkComboBox *combo_box,
+                                        gpointer     user_data);
+
 G_DEFINE_TYPE (EvSidebar, ev_sidebar, GTK_TYPE_VBOX)
 
 #define EV_SIDEBAR_GET_PRIVATE(object) \
@@ -53,17 +74,67 @@ ev_sidebar_class_init (EvSidebarClass *ev_sidebar_class)
 static void
 ev_sidebar_init (EvSidebar *ev_sidebar)
 {
+       GtkWidget *hbox;
+       GtkCellRenderer *renderer;
+
        ev_sidebar->priv = EV_SIDEBAR_GET_PRIVATE (ev_sidebar);
 
-       ev_sidebar->priv->notebook = gtk_notebook_new ();
+       gtk_box_set_spacing (GTK_BOX (ev_sidebar), 6);
+       /* data model */
+       ev_sidebar->priv->page_model = (GtkTreeModel *)
+               gtk_list_store_new (PAGE_COLUMN_NUM_COLS,
+                                   G_TYPE_STRING,
+                                   G_TYPE_STRING,
+                                   GTK_TYPE_WIDGET,
+                                   G_TYPE_INT);
+       /* top option menu */
+       hbox = gtk_hbox_new (FALSE, 6);
+       gtk_box_pack_start (GTK_BOX (ev_sidebar), hbox,
+                           FALSE, FALSE, 0);
+       ev_sidebar->priv->option_menu =
+               gtk_combo_box_new_with_model (ev_sidebar->priv->page_model);
+       g_signal_connect (ev_sidebar->priv->option_menu, "changed",
+                         G_CALLBACK (ev_sidebar_omenu_changed_cb), ev_sidebar);
+       gtk_box_pack_start (GTK_BOX (hbox),
+                           ev_sidebar->priv->option_menu,
+                           FALSE, FALSE, 0);
+       renderer = gtk_cell_renderer_text_new ();
+       gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (ev_sidebar->priv->option_menu),
+                                   renderer, TRUE);
+       gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (ev_sidebar->priv->option_menu),
+                                       renderer,
+                                       "text", PAGE_COLUMN_TITLE,
+                                       NULL);
 
+       ev_sidebar->priv->notebook = gtk_notebook_new ();
        gtk_notebook_set_show_border (GTK_NOTEBOOK (ev_sidebar->priv->notebook), FALSE);
        gtk_notebook_set_show_tabs (GTK_NOTEBOOK (ev_sidebar->priv->notebook), FALSE);
        gtk_box_pack_start (GTK_BOX (ev_sidebar), ev_sidebar->priv->notebook,
                            TRUE, TRUE, 0);
-       gtk_widget_show_all (ev_sidebar->priv->notebook);
+       gtk_widget_show_all (GTK_WIDGET (ev_sidebar));
 }
 
+static void
+ev_sidebar_omenu_changed_cb (GtkComboBox *combo_box,
+                            gpointer     user_data)
+{
+       GtkTreeIter iter;
+       EvSidebar *ev_sidebar = EV_SIDEBAR (user_data);
+
+       if (gtk_combo_box_get_active_iter (combo_box, &iter)) {
+               gint index;
+
+               gtk_tree_model_get (ev_sidebar->priv->page_model,
+                                   &iter,
+                                   PAGE_COLUMN_NOTEBOOK_INDEX, &index,
+                                   -1);
+               gtk_notebook_set_current_page (GTK_NOTEBOOK (ev_sidebar->priv->notebook),
+                                              index);
+                                              
+       }
+}
+
+/* Public functions */
 
 GtkWidget *
 ev_sidebar_new (void)
@@ -74,3 +145,37 @@ ev_sidebar_new (void)
 
        return ev_sidebar;
 }
+
+void
+ev_sidebar_add_page (EvSidebar   *ev_sidebar,
+                    const gchar *page_id,
+                    const gchar *title,
+                    GtkWidget   *main_widget)
+{
+       GtkTreeIter iter;
+       int index;
+
+       g_return_if_fail (EV_IS_SIDEBAR (ev_sidebar));
+       g_return_if_fail (page_id != NULL);
+       g_return_if_fail (title != NULL);
+       g_return_if_fail (GTK_IS_WIDGET (main_widget));
+
+       index = gtk_notebook_append_page (GTK_NOTEBOOK (ev_sidebar->priv->notebook),
+                                         main_widget, NULL);
+                                         
+       gtk_list_store_insert_with_values (GTK_LIST_STORE (ev_sidebar->priv->page_model),
+                                          &iter, 0,
+                                          PAGE_COLUMN_ID, page_id,
+                                          PAGE_COLUMN_TITLE, title,
+                                          PAGE_COLUMN_MAIN_WIDGET, main_widget,
+                                          PAGE_COLUMN_NOTEBOOK_INDEX, index,
+                                          -1);
+}
+
+void
+ev_sidebar_clear (EvSidebar *ev_sidebar)
+{
+       g_return_if_fail (EV_IS_SIDEBAR (ev_sidebar));
+
+       gtk_list_store_clear (GTK_LIST_STORE (ev_sidebar->priv->page_model));
+}
index 4a9ac93e09a2b861fdf6737e30f5ff417f9547a3..ea97f5f82368e9b3db771b63bff0799db39b4143 100644 (file)
@@ -51,6 +51,11 @@ struct _EvSidebarClass {
 
 GType      ev_sidebar_get_type (void);
 GtkWidget *ev_sidebar_new      (void);
+void       ev_sidebar_add_page (EvSidebar   *ev_sidebar,
+                               const gchar *page_id,
+                               const gchar *title,
+                               GtkWidget   *main_widget);
+void       ev_sidebar_clear    (EvSidebar   *ev_sidebar);
 
 G_END_DECLS
 
index 72fc62721f7972d66e49b8ddc2562195a507a0f9..8d0bcbf6639674a2db4ef1748921e9e1c200e458 100644 (file)
@@ -28,6 +28,8 @@
 
 #include "ev-window.h"
 #include "ev-sidebar.h"
+#include "ev-sidebar-bookmarks.h"
+#include "ev-sidebar-thumbnails.h"
 #include "ev-view.h"
 #include "eggfindbar.h"
 
@@ -717,6 +719,7 @@ ev_window_init (EvWindow *ev_window)
        GtkWidget *scrolled_window;
        GtkWidget *menubar;
        GtkWidget *toolbar;
+       GtkWidget *sidebar_widget;
 
        ev_window->priv = EV_WINDOW_GET_PRIVATE (ev_window);
 
@@ -775,10 +778,26 @@ ev_window_init (EvWindow *ev_window)
        gtk_paned_add1 (GTK_PANED (ev_window->priv->hpaned),
                        ev_window->priv->sidebar);
 
+       /* Stub sidebar, for now */
+       sidebar_widget = ev_sidebar_bookmarks_new ();
+       gtk_widget_show (sidebar_widget);
+       ev_sidebar_add_page (EV_SIDEBAR (ev_window->priv->sidebar),
+                            "bookmarks",
+                            _("Bookmarks"),
+                            sidebar_widget);
+
+       sidebar_widget = ev_sidebar_thumbnails_new ();
+       gtk_widget_show (sidebar_widget);
+       ev_sidebar_add_page (EV_SIDEBAR (ev_window->priv->sidebar),
+                            "thumbnails",
+                            _("Thumbnails"),
+                            sidebar_widget);
+       
        scrolled_window = gtk_scrolled_window_new (NULL, NULL);
        gtk_widget_show (scrolled_window);
        gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
                                        GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
        gtk_paned_add2 (GTK_PANED (ev_window->priv->hpaned),
                        scrolled_window);