[emerillon/gtk3] Use GtkBox instead of deprecated GtkVBox/GtkHBox



commit bbe163c43732e95bba1758a915efe1ccf5f828f3
Author: Andreas Henriksson <andreas fatal se>
Date:   Sat Aug 6 23:23:27 2011 +0200

    Use GtkBox instead of deprecated GtkVBox/GtkHBox
    
    VBox and HBox is deprecated since Gtk+ 3.2, use GtkBox instead.

 emerillon/sidebar.c             |    9 ++++++---
 emerillon/sidebar.h             |    4 ++--
 emerillon/window.c              |    2 +-
 plugins/placemarks/add-dialog.c |    2 +-
 plugins/search/search.c         |    2 +-
 5 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/emerillon/sidebar.c b/emerillon/sidebar.c
index 777e7b7..21385f8 100644
--- a/emerillon/sidebar.c
+++ b/emerillon/sidebar.c
@@ -69,7 +69,7 @@ struct _EmerillonSidebarPrivate
     GtkTreeModel *page_model;
 };
 
-G_DEFINE_TYPE (EmerillonSidebar, emerillon_sidebar, GTK_TYPE_VBOX)
+G_DEFINE_TYPE (EmerillonSidebar, emerillon_sidebar, GTK_TYPE_BOX)
 
 #define EMERILLON_SIDEBAR_GET_PRIVATE(object) \
     (G_TYPE_INSTANCE_GET_PRIVATE ((object), EMERILLON_TYPE_SIDEBAR, EmerillonSidebarPrivate))
@@ -383,6 +383,9 @@ emerillon_sidebar_init (EmerillonSidebar *sidebar)
 
   sidebar->priv = EMERILLON_SIDEBAR_GET_PRIVATE (sidebar);
 
+  gtk_orientable_set_orientation (GTK_ORIENTABLE (sidebar),
+      GTK_ORIENTATION_VERTICAL);
+
   /* data model */
   sidebar->priv->page_model = (GtkTreeModel *) gtk_list_store_new (
       PAGE_COLUMN_NUM_COLS,
@@ -392,7 +395,7 @@ emerillon_sidebar_init (EmerillonSidebar *sidebar)
       G_TYPE_INT);
 
   /* top option menu */
-  hbox = gtk_hbox_new (FALSE, 0);
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
   sidebar->priv->hbox = hbox;
   gtk_box_pack_start (GTK_BOX (sidebar), hbox, FALSE, FALSE, 0);
   gtk_widget_show (hbox);
@@ -410,7 +413,7 @@ emerillon_sidebar_init (EmerillonSidebar *sidebar)
       G_CALLBACK (emerillon_sidebar_select_button_key_press_cb),
       sidebar);
 
-  select_hbox = gtk_hbox_new (FALSE, 0);
+  select_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
 
   sidebar->priv->label = gtk_label_new ("");
   gtk_label_set_ellipsize (GTK_LABEL (sidebar->priv->label),
diff --git a/emerillon/sidebar.h b/emerillon/sidebar.h
index bd64d74..305fc14 100644
--- a/emerillon/sidebar.h
+++ b/emerillon/sidebar.h
@@ -48,14 +48,14 @@ typedef struct _EmerillonSidebarPrivate EmerillonSidebarPrivate;
 
 struct _EmerillonSidebar
 {
-  GtkVBox base_instance;
+  GtkBox base_instance;
 
   EmerillonSidebarPrivate *priv;
 };
 
 struct _EmerillonSidebarClass
 {
-  GtkVBoxClass base_class;
+  GtkBoxClass base_class;
 
   void (* page_added)   (EmerillonSidebar *sidebar,
                          GtkWidget *main_widget);
diff --git a/emerillon/window.c b/emerillon/window.c
index b366c00..f335b26 100644
--- a/emerillon/window.c
+++ b/emerillon/window.c
@@ -877,7 +877,7 @@ build_ui (EmerillonWindow *self)
       gtk_ui_manager_get_accel_group (self->priv->ui_manager));
 
   /* Main box. */
-  vbox = gtk_vbox_new (FALSE, 0);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
   gtk_container_add (GTK_CONTAINER (self), vbox);
   gtk_widget_show (vbox);
 
diff --git a/plugins/placemarks/add-dialog.c b/plugins/placemarks/add-dialog.c
index a0a1a8e..ef46db4 100644
--- a/plugins/placemarks/add-dialog.c
+++ b/plugins/placemarks/add-dialog.c
@@ -124,7 +124,7 @@ build_ui (AddDialog *self)
   gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
 
   area = gtk_dialog_get_content_area (dialog);
-  hbox = gtk_hbox_new (FALSE, 10);
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
   gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
 
   label = gtk_label_new (_("Name:"));
diff --git a/plugins/search/search.c b/plugins/search/search.c
index 3b8e406..f3b3e1e 100644
--- a/plugins/search/search.c
+++ b/plugins/search/search.c
@@ -412,7 +412,7 @@ search_plugin_activate (PeasActivatable *plugin)
   gtk_label_set_line_wrap (GTK_LABEL (priv->search_page), TRUE);
   gtk_label_set_single_line_mode (GTK_LABEL (priv->search_page), FALSE);
   */
-  priv->search_page = gtk_vbox_new (FALSE, 10);
+  priv->search_page = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
 
   /* FIXME: set this based on the sidebar size. */
   gtk_widget_set_size_request (priv->search_page, 200, -1);



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