[devhelp/wip/wintemplate: 5/7] Make sidebar inherit from GtkBox



commit 101dfac2a06faa73cd730b15fdcadcde49cea62f
Author: Ignacio Casal Quinteiro <ignacio casal nice-software com>
Date:   Tue Jul 23 20:30:48 2013 +0200

    Make sidebar inherit from GtkBox

 src/dh-sidebar.c |    4 ++--
 src/dh-sidebar.h |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/dh-sidebar.c b/src/dh-sidebar.c
index 19d9854..f77dbc4 100644
--- a/src/dh-sidebar.c
+++ b/src/dh-sidebar.c
@@ -36,7 +36,7 @@
 #include "dh-book.h"
 #include "dh-book-tree.h"
 
-G_DEFINE_TYPE (DhSidebar, dh_sidebar, GTK_TYPE_VBOX)
+G_DEFINE_TYPE (DhSidebar, dh_sidebar, GTK_TYPE_BOX)
 
 enum {
         LINK_SELECTED,
@@ -423,7 +423,7 @@ dh_sidebar_new (DhBookManager *book_manager)
         GtkWidget        *hbox;
         GtkWidget        *button_box;
 
-        self = g_object_new (DH_TYPE_SIDEBAR, NULL);
+        self = g_object_new (DH_TYPE_SIDEBAR, "orientation", GTK_ORIENTATION_VERTICAL, NULL);
         gtk_container_set_border_width (GTK_CONTAINER (self), 2);
         gtk_box_set_spacing (GTK_BOX (self), 4);
 
diff --git a/src/dh-sidebar.h b/src/dh-sidebar.h
index 773a431..e0d67ac 100644
--- a/src/dh-sidebar.h
+++ b/src/dh-sidebar.h
@@ -40,12 +40,12 @@ typedef struct _DhSidebarClass   DhSidebarClass;
 typedef struct _DhSidebarPrivate DhSidebarPrivate;
 
 struct _DhSidebar {
-        GtkVBox           parent_instance;
+        GtkBox            parent_instance;
         DhSidebarPrivate *priv;
 };
 
 struct _DhSidebarClass {
-        GtkVBoxClass parent_class;
+        GtkBoxClass parent_class;
 
         /* Signals */
         void (*link_selected) (DhSidebar *search,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]