summaryrefslogtreecommitdiff
path: root/shell/ev-sidebar.c
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-08-08 16:43:34 +0300
committerMonsta <[email protected]>2015-08-08 16:43:34 +0300
commit3de4956ee790ad32f268134a25474b63e64a4682 (patch)
tree69f58600370b4628b14d91fe6ed73e1a9bd4228b /shell/ev-sidebar.c
parentd3280a6e90640adab91d94577ae96e3d8cbee29f (diff)
downloadatril-3de4956ee790ad32f268134a25474b63e64a4682.tar.bz2
atril-3de4956ee790ad32f268134a25474b63e64a4682.tar.xz
use GObject instead of deprecated GtkObject in GTK+2 as well
Diffstat (limited to 'shell/ev-sidebar.c')
-rw-r--r--shell/ev-sidebar.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/shell/ev-sidebar.c b/shell/ev-sidebar.c
index 49413010..311c83bd 100644
--- a/shell/ev-sidebar.c
+++ b/shell/ev-sidebar.c
@@ -64,11 +64,7 @@ G_DEFINE_TYPE (EvSidebar, ev_sidebar, GTK_TYPE_VBOX)
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_SIDEBAR, EvSidebarPrivate))
static void
-#if GTK_CHECK_VERSION (3, 0, 0)
ev_sidebar_dispose (GObject *object)
-#else
-ev_sidebar_destroy (GtkObject *object)
-#endif
{
EvSidebar *ev_sidebar = EV_SIDEBAR (object);
@@ -76,17 +72,13 @@ ev_sidebar_destroy (GtkObject *object)
gtk_menu_detach (GTK_MENU (ev_sidebar->priv->menu));
ev_sidebar->priv->menu = NULL;
}
-
+
if (ev_sidebar->priv->page_model) {
g_object_unref (ev_sidebar->priv->page_model);
ev_sidebar->priv->page_model = NULL;
}
-
-#if GTK_CHECK_VERSION (3, 0, 0)
+
(* G_OBJECT_CLASS (ev_sidebar_parent_class)->dispose) (object);
-#else
- (* GTK_OBJECT_CLASS (ev_sidebar_parent_class)->destroy) (object);
-#endif
}
static void
@@ -183,22 +175,11 @@ static void
ev_sidebar_class_init (EvSidebarClass *ev_sidebar_class)
{
GObjectClass *g_object_class;
-#if !GTK_CHECK_VERSION (3, 0, 0)
- GtkObjectClass *gtk_object_klass;
-#endif
g_object_class = G_OBJECT_CLASS (ev_sidebar_class);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- gtk_object_klass = GTK_OBJECT_CLASS (ev_sidebar_class);
-#endif
-
g_type_class_add_private (g_object_class, sizeof (EvSidebarPrivate));
-#if GTK_CHECK_VERSION (3, 0, 0)
g_object_class->dispose = ev_sidebar_dispose;
-#else
- gtk_object_klass->destroy = ev_sidebar_destroy;
-#endif
g_object_class->get_property = ev_sidebar_get_property;
g_object_class->set_property = ev_sidebar_set_property;