summaryrefslogtreecommitdiff
path: root/src/eom-sidebar.c
diff options
context:
space:
mode:
authorLaszlo Boros <[email protected]>2013-08-18 01:26:29 +0200
committerStefano Karapetsas <[email protected]>2013-10-17 12:28:11 +0200
commit1e9954cbc51fc67b1e34cd6dd8f0a77a360eb4c8 (patch)
tree0051295b73ee5aa6caa0210e6a3ac7af11edf674 /src/eom-sidebar.c
parent7a364394044201fbd23a9fc5e152f512d24fd876 (diff)
downloadeom-1e9954cbc51fc67b1e34cd6dd8f0a77a360eb4c8.tar.bz2
eom-1e9954cbc51fc67b1e34cd6dd8f0a77a360eb4c8.tar.xz
GTK3 support
Diffstat (limited to 'src/eom-sidebar.c')
-rw-r--r--src/eom-sidebar.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/eom-sidebar.c b/src/eom-sidebar.c
index 8d8b8b0..4ca9e89 100644
--- a/src/eom-sidebar.c
+++ b/src/eom-sidebar.c
@@ -70,7 +70,11 @@ G_DEFINE_TYPE (EomSidebar, eom_sidebar, GTK_TYPE_VBOX)
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_SIDEBAR, EomSidebarPrivate))
static void
+#if GTK_CHECK_VERSION(3, 0, 0)
+eom_sidebar_destroy (GtkWidget *object)
+#else
eom_sidebar_destroy (GtkObject *object)
+#endif
{
EomSidebar *eom_sidebar = EOM_SIDEBAR (object);
@@ -84,7 +88,11 @@ eom_sidebar_destroy (GtkObject *object)
eom_sidebar->priv->page_model = NULL;
}
+ #if GTK_CHECK_VERSION(3, 0, 0)
+ (* GTK_WIDGET_CLASS (eom_sidebar_parent_class)->destroy) (object);
+ #else
(* GTK_OBJECT_CLASS (eom_sidebar_parent_class)->destroy) (object);
+ #endif
}
static void
@@ -179,17 +187,28 @@ eom_sidebar_get_property (GObject *object,
static void
eom_sidebar_class_init (EomSidebarClass *eom_sidebar_class)
{
+ // REFERENCE:
+ // https://git.gnome.org/browse/eog/tree/src/eog-sidebar.c?h=gnome-3-0
+
GObjectClass *g_object_class;
GtkWidgetClass *widget_class;
+ #if !GTK_CHECK_VERSION(3, 0, 0)
GtkObjectClass *gtk_object_klass;
+ #endif
g_object_class = G_OBJECT_CLASS (eom_sidebar_class);
widget_class = GTK_WIDGET_CLASS (eom_sidebar_class);
+ #if !GTK_CHECK_VERSION(3, 0, 0)
gtk_object_klass = GTK_OBJECT_CLASS (eom_sidebar_class);
+ #endif
g_type_class_add_private (g_object_class, sizeof (EomSidebarPrivate));
+ #if GTK_CHECK_VERSION(3, 0, 0)
+ widget_class->destroy = eom_sidebar_destroy;
+ #else
gtk_object_klass->destroy = eom_sidebar_destroy;
+ #endif
g_object_class->get_property = eom_sidebar_get_property;
g_object_class->set_property = eom_sidebar_set_property;