[libegg] toolbareditor: use GtkBox instead of H/V versions



commit 1c1a5bf8cfc092c6cf541873b6e2fe99e18fb760
Author: Diego Escalante Urrelo <descalante igalia com>
Date:   Fri Oct 7 18:46:04 2011 -0500

    toolbareditor: use GtkBox instead of H/V versions
    
    Bug #661240

 libegg/toolbareditor/egg-editable-toolbar.c |    8 +++++---
 libegg/toolbareditor/egg-editable-toolbar.h |    4 ++--
 libegg/toolbareditor/egg-toolbar-editor.c   |    6 ++++--
 libegg/toolbareditor/egg-toolbar-editor.h   |    4 ++--
 4 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/libegg/toolbareditor/egg-editable-toolbar.c b/libegg/toolbareditor/egg-editable-toolbar.c
index e826d1f..a27b88a 100644
--- a/libegg/toolbareditor/egg-editable-toolbar.c
+++ b/libegg/toolbareditor/egg-editable-toolbar.c
@@ -84,7 +84,7 @@ struct _EggEditableToolbarPrivate
   gchar *primary_name;
 };
 
-G_DEFINE_TYPE (EggEditableToolbar, egg_editable_toolbar, GTK_TYPE_VBOX);
+G_DEFINE_TYPE (EggEditableToolbar, egg_editable_toolbar, GTK_TYPE_BOX);
 
 static int
 get_dock_position (EggEditableToolbar *etoolbar,
@@ -1061,7 +1061,7 @@ create_dock (EggEditableToolbar *etoolbar)
 {
   GtkWidget *toolbar, *hbox;
 
-  hbox = gtk_hbox_new (0, FALSE);
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
 
   toolbar = gtk_toolbar_new ();
   gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), TRUE);
@@ -1416,6 +1416,8 @@ egg_editable_toolbar_init (EggEditableToolbar *etoolbar)
 
   priv = etoolbar->priv = EGG_EDITABLE_TOOLBAR_GET_PRIVATE (etoolbar);
 
+  gtk_orientable_set_orientation (GTK_ORIENTABLE (etoolbar),
+                                  GTK_ORIENTATION_VERTICAL);
   priv->save_hidden = TRUE;
 
   g_signal_connect (etoolbar, "notify::visible",
@@ -1859,7 +1861,7 @@ new_separator_pixbuf (void)
   GtkWidget *separator;
   GdkPixbuf *pixbuf;
 
-  separator = gtk_vseparator_new ();
+  separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
   pixbuf = new_pixbuf_from_widget (separator);
   return pixbuf;
 }
diff --git a/libegg/toolbareditor/egg-editable-toolbar.h b/libegg/toolbareditor/egg-editable-toolbar.h
index b08f68a..9f975b8 100644
--- a/libegg/toolbareditor/egg-editable-toolbar.h
+++ b/libegg/toolbareditor/egg-editable-toolbar.h
@@ -41,7 +41,7 @@ typedef struct _EggEditableToolbarClass   EggEditableToolbarClass;
 
 struct _EggEditableToolbar
 {
-  GtkVBox parent_object;
+  GtkBox parent_object;
 
   /*< private >*/
   EggEditableToolbarPrivate *priv;
@@ -49,7 +49,7 @@ struct _EggEditableToolbar
 
 struct _EggEditableToolbarClass
 {
-  GtkVBoxClass parent_class;
+  GtkBoxClass parent_class;
 
   void (* action_request) (EggEditableToolbar *etoolbar,
 			   const char *action_name);
diff --git a/libegg/toolbareditor/egg-toolbar-editor.c b/libegg/toolbareditor/egg-toolbar-editor.c
index 5e6833a..09339ab 100644
--- a/libegg/toolbareditor/egg-toolbar-editor.c
+++ b/libegg/toolbareditor/egg-toolbar-editor.c
@@ -71,7 +71,7 @@ struct EggToolbarEditorPrivate
   gulong     sig_handlers[SIGNAL_HANDLER_LIST_SIZE];
 };
 
-G_DEFINE_TYPE (EggToolbarEditor, egg_toolbar_editor, GTK_TYPE_VBOX);
+G_DEFINE_TYPE (EggToolbarEditor, egg_toolbar_editor, GTK_TYPE_BOX);
 
 static gint
 compare_items (gconstpointer a,
@@ -456,7 +456,7 @@ editor_create_item (EggToolbarEditor *editor,
 		        G_CALLBACK (drag_end_cb), NULL);
     }
 
-  vbox = gtk_vbox_new (0, FALSE);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
   gtk_widget_show (vbox);
   gtk_container_add (GTK_CONTAINER (event_box), vbox);
 
@@ -667,6 +667,8 @@ egg_toolbar_editor_init (EggToolbarEditor *t)
 {
   t->priv = EGG_TOOLBAR_EDITOR_GET_PRIVATE (t);
 
+  gtk_orientable_set_orientation (GTK_ORIENTABLE (t),
+                                  GTK_ORIENTATION_VERTICAL);
   t->priv->manager = NULL;
   t->priv->actions_list = NULL;
 
diff --git a/libegg/toolbareditor/egg-toolbar-editor.h b/libegg/toolbareditor/egg-toolbar-editor.h
index ba6e1a9..038e191 100644
--- a/libegg/toolbareditor/egg-toolbar-editor.h
+++ b/libegg/toolbareditor/egg-toolbar-editor.h
@@ -40,7 +40,7 @@ typedef struct EggToolbarEditorPrivate EggToolbarEditorPrivate;
 
 struct EggToolbarEditor
 {
-  GtkVBox parent_object;
+  GtkBox parent_object;
 
   /*< private >*/
   EggToolbarEditorPrivate *priv;
@@ -48,7 +48,7 @@ struct EggToolbarEditor
 
 struct EggToolbarEditorClass
 {
-  GtkVBoxClass parent_class;
+  GtkBoxClass parent_class;
 };
 
 



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