[eog] Remove deprecated GtkVBox/GtkHBox usage



commit 81cb0682eae5ab9864737132abb4f0c18b10ff8c
Author: Adrian ZgorzaÅek <a zgorzalek gmail com>
Date:   Tue Feb 28 21:33:40 2012 +0100

    Remove deprecated GtkVBox/GtkHBox usage
    
    The GtkHBox and GtkVBox have been deprecated by now.
    Also be consistent with the other properties declarations
    and use PROP_0 instead of PROP = 1.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=671008

 src/eog-print-preview.c |    3 ++-
 src/eog-sidebar.c       |    5 ++++-
 src/eog-sidebar.h       |    4 ++--
 src/eog-thumb-nav.c     |    8 ++++++--
 src/eog-thumb-nav.h     |    4 ++--
 5 files changed, 16 insertions(+), 8 deletions(-)
---
diff --git a/src/eog-print-preview.c b/src/eog-print-preview.c
index 0fe07ed..182eed6 100644
--- a/src/eog-print-preview.c
+++ b/src/eog-print-preview.c
@@ -83,7 +83,8 @@ enum {
 static gint preview_signals [SIGNAL_LAST];
 
 enum {
-	PROP_IMAGE = 1,
+	PROP_0,
+	PROP_IMAGE,
 	PROP_IMAGE_X_ALIGN,
 	PROP_IMAGE_Y_ALIGN,
 	PROP_IMAGE_SCALE,
diff --git a/src/eog-sidebar.c b/src/eog-sidebar.c
index 5239abc..51a241f 100644
--- a/src/eog-sidebar.c
+++ b/src/eog-sidebar.c
@@ -64,7 +64,7 @@ struct _EogSidebarPrivate {
 	GtkTreeModel *page_model;
 };
 
-G_DEFINE_TYPE (EogSidebar, eog_sidebar, GTK_TYPE_VBOX)
+G_DEFINE_TYPE (EogSidebar, eog_sidebar, GTK_TYPE_BOX)
 
 #define EOG_SIDEBAR_GET_PRIVATE(object) \
 	(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOG_TYPE_SIDEBAR, EogSidebarPrivate))
@@ -370,6 +370,9 @@ eog_sidebar_init (EogSidebar *eog_sidebar)
 	GtkWidget *arrow;
 	GtkWidget *image;
 
+	gtk_orientable_set_orientation (GTK_ORIENTABLE (eog_sidebar),
+					GTK_ORIENTATION_VERTICAL);
+
 	eog_sidebar->priv = EOG_SIDEBAR_GET_PRIVATE (eog_sidebar);
 
 	/* data model */
diff --git a/src/eog-sidebar.h b/src/eog-sidebar.h
index ff8e35b..09befb0 100644
--- a/src/eog-sidebar.h
+++ b/src/eog-sidebar.h
@@ -42,13 +42,13 @@ typedef struct _EogSidebarPrivate EogSidebarPrivate;
 #define EOG_SIDEBAR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  EOG_TYPE_SIDEBAR, EogSidebarClass))
 
 struct _EogSidebar {
-	GtkVBox base_instance;
+	GtkBox base_instance;
 
 	EogSidebarPrivate *priv;
 };
 
 struct _EogSidebarClass {
-	GtkVBoxClass base_class;
+	GtkBoxClass base_class;
 
 	void (* page_added)   (EogSidebar *eog_sidebar,
 			       GtkWidget  *main_widget);
diff --git a/src/eog-thumb-nav.c b/src/eog-thumb-nav.c
index d7a7c2b..f29ec32 100644
--- a/src/eog-thumb-nav.c
+++ b/src/eog-thumb-nav.c
@@ -35,7 +35,7 @@
 #define EOG_THUMB_NAV_GET_PRIVATE(object) \
 	(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOG_TYPE_THUMB_NAV, EogThumbNavPrivate))
 
-G_DEFINE_TYPE (EogThumbNav, eog_thumb_nav, GTK_TYPE_HBOX);
+G_DEFINE_TYPE (EogThumbNav, eog_thumb_nav, GTK_TYPE_BOX);
 
 #define EOG_THUMB_NAV_SCROLL_INC      20
 #define EOG_THUMB_NAV_SCROLL_MOVE     20
@@ -43,7 +43,8 @@ G_DEFINE_TYPE (EogThumbNav, eog_thumb_nav, GTK_TYPE_HBOX);
 
 enum
 {
-	PROP_SHOW_BUTTONS = 1,
+	PROP_0,
+	PROP_SHOW_BUTTONS,
 	PROP_THUMB_VIEW,
 	PROP_MODE
 };
@@ -325,6 +326,9 @@ eog_thumb_nav_init (EogThumbNav *nav)
 	EogThumbNavPrivate *priv;
 	GtkWidget *arrow;
 
+	gtk_orientable_set_orientation (GTK_ORIENTABLE (nav),
+					GTK_ORIENTATION_HORIZONTAL);
+
 	nav->priv = EOG_THUMB_NAV_GET_PRIVATE (nav);
 
 	priv = nav->priv;
diff --git a/src/eog-thumb-nav.h b/src/eog-thumb-nav.h
index 3eff584..7c2bd4e 100644
--- a/src/eog-thumb-nav.h
+++ b/src/eog-thumb-nav.h
@@ -49,13 +49,13 @@ typedef enum {
 } EogThumbNavMode;
 
 struct _EogThumbNav {
-	GtkHBox base_instance;
+	GtkBox base_instance;
 
 	EogThumbNavPrivate *priv;
 };
 
 struct _EogThumbNavClass {
-	GtkHBoxClass parent_class;
+	GtkBoxClass parent_class;
 };
 
 GType	         eog_thumb_nav_get_type          (void) G_GNUC_CONST;



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