summaryrefslogtreecommitdiff
path: root/src/eom-thumb-nav.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2015-09-01 20:06:15 +0200
committerinfirit <[email protected]>2015-09-06 13:08:31 +0200
commit0ea8ddb0d7f34a22da6467fb4688b321735c601d (patch)
tree1ce4aefcdfe761c2f813ab315539e68ce71d07c3 /src/eom-thumb-nav.c
parent35e40d42b54aab81f37323e4f7830318f9db6bf1 (diff)
downloadeom-0ea8ddb0d7f34a22da6467fb4688b321735c601d.tar.bz2
eom-0ea8ddb0d7f34a22da6467fb4688b321735c601d.tar.xz
Gtk3: 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. taken from: https://git.gnome.org/browse/eog/commit/?id=81cb068
Diffstat (limited to 'src/eom-thumb-nav.c')
-rw-r--r--src/eom-thumb-nav.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/eom-thumb-nav.c b/src/eom-thumb-nav.c
index 24c2431..11fd211 100644
--- a/src/eom-thumb-nav.c
+++ b/src/eom-thumb-nav.c
@@ -36,7 +36,11 @@
#define EOM_THUMB_NAV_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_THUMB_NAV, EomThumbNavPrivate))
+#if GTK_CHECK_VERSION (3, 2, 0)
+G_DEFINE_TYPE (EomThumbNav, eom_thumb_nav, GTK_TYPE_BOX);
+#else
G_DEFINE_TYPE (EomThumbNav, eom_thumb_nav, GTK_TYPE_HBOX);
+#endif
#define EOM_THUMB_NAV_SCROLL_INC 20
#define EOM_THUMB_NAV_SCROLL_MOVE 20
@@ -44,7 +48,8 @@ G_DEFINE_TYPE (EomThumbNav, eom_thumb_nav, GTK_TYPE_HBOX);
enum
{
- PROP_SHOW_BUTTONS = 1,
+ PROP_0,
+ PROP_SHOW_BUTTONS,
PROP_THUMB_VIEW,
PROP_MODE
};
@@ -345,6 +350,11 @@ eom_thumb_nav_init (EomThumbNav *nav)
EomThumbNavPrivate *priv;
GtkWidget *arrow;
+#if GTK_CHECK_VERSION (3, 2, 0)
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (nav),
+ GTK_ORIENTATION_HORIZONTAL);
+#endif
+
nav->priv = EOM_THUMB_NAV_GET_PRIVATE (nav);
priv = nav->priv;