summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libview/ev-view-presentation.c25
-rw-r--r--libview/ev-view.c26
-rw-r--r--shell/ev-sidebar-attachments.c20
-rw-r--r--shell/ev-sidebar.c23
4 files changed, 4 insertions, 90 deletions
diff --git a/libview/ev-view-presentation.c b/libview/ev-view-presentation.c
index 118df5f7..3e47b30c 100644
--- a/libview/ev-view-presentation.c
+++ b/libview/ev-view-presentation.c
@@ -967,11 +967,7 @@ ev_view_presentation_update_current_surface (EvViewPresentation *pview,
}
static void
-#if GTK_CHECK_VERSION (3, 0, 0)
ev_view_presentation_dispose (GObject *object)
-#else
-ev_view_presentation_destroy (GtkObject *object)
-#endif
{
EvViewPresentation *pview = EV_VIEW_PRESENTATION (object);
@@ -1001,11 +997,7 @@ ev_view_presentation_destroy (GtkObject *object)
pview->goto_entry = NULL;
}
-#if GTK_CHECK_VERSION (3, 0, 0)
G_OBJECT_CLASS (ev_view_presentation_parent_class)->dispose (object);
-#else
- GTK_OBJECT_CLASS (ev_view_presentation_parent_class)->destroy (object);
-#endif
}
#if GTK_CHECK_VERSION (3, 0, 0)
@@ -1178,11 +1170,7 @@ ev_view_presentation_key_press_event (GtkWidget *widget,
EvViewPresentation *pview = EV_VIEW_PRESENTATION (widget);
if (pview->state == EV_PRESENTATION_END)
-#if GTK_CHECK_VERSION (3, 0, 0)
return gtk_bindings_activate_event (G_OBJECT (widget), event);
-#else
- return gtk_bindings_activate_event (GTK_OBJECT (widget), event);
-#endif
switch (event->keyval) {
case GDK_KEY_b:
@@ -1238,11 +1226,7 @@ ev_view_presentation_key_press_event (GtkWidget *widget,
return TRUE;
}
-#if GTK_CHECK_VERSION (3, 0, 0)
return gtk_bindings_activate_event (G_OBJECT (widget), event);
-#else
- return gtk_bindings_activate_event (GTK_OBJECT (widget), event);
-#endif
}
static gboolean
@@ -1509,9 +1493,6 @@ ev_view_presentation_class_init (EvViewPresentationClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
-#endif
GtkBindingSet *binding_set;
#if GTK_CHECK_VERSION (3, 0, 0)
GtkCssProvider *provider;
@@ -1537,15 +1518,11 @@ ev_view_presentation_class_init (EvViewPresentationClass *klass)
widget_class->motion_notify_event = ev_view_presentation_motion_notify_event;
widget_class->scroll_event = ev_view_presentation_scroll_event;
-#if GTK_CHECK_VERSION (3, 0, 0)
gobject_class->dispose = ev_view_presentation_dispose;
-#else
- gtk_object_class->destroy = ev_view_presentation_destroy;
-#endif
gobject_class->constructor = ev_view_presentation_constructor;
gobject_class->set_property = ev_view_presentation_set_property;
- gobject_class->get_property = ev_view_presentation_get_property;
+ gobject_class->get_property = ev_view_presentation_get_property;
g_object_class_install_property (gobject_class,
PROP_DOCUMENT,
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 9bd53d55..b1ce01d2 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -245,11 +245,7 @@ static void on_adjustment_value_changed (GtkAdjustment
/*** GObject ***/
static void ev_view_finalize (GObject *object);
-#if GTK_CHECK_VERSION (3, 0, 0)
static void ev_view_dispose (GObject *object);
-#else
-static void ev_view_destroy (GtkObject *object);
-#endif
static void ev_view_class_init (EvViewClass *class);
static void ev_view_init (EvView *view);
@@ -4302,11 +4298,7 @@ ev_view_key_press_event (GtkWidget *widget,
return FALSE;
}
-#if GTK_CHECK_VERSION (3, 0, 0)
return gtk_bindings_activate_event (G_OBJECT (widget), event);
-#else
- return gtk_bindings_activate_event (GTK_OBJECT (widget), event);
-#endif
}
static gint
@@ -4718,11 +4710,7 @@ ev_view_finalize (GObject *object)
}
static void
-#if GTK_CHECK_VERSION (3, 0, 0)
ev_view_dispose (GObject *object)
-#else
-ev_view_destroy (GtkObject *object)
-#endif
{
EvView *view = EV_VIEW (object);
@@ -4781,12 +4769,7 @@ ev_view_destroy (GtkObject *object)
#if !GTK_CHECK_VERSION (3, 0, 0)
ev_view_set_scroll_adjustments (GTK_LAYOUT (view), NULL, NULL);
#endif
-
-#if GTK_CHECK_VERSION (3, 0, 0)
G_OBJECT_CLASS (ev_view_parent_class)->dispose (object);
-#else
- GTK_OBJECT_CLASS (ev_view_parent_class)->destroy (object);
-#endif
}
#if GTK_CHECK_VERSION (3, 0, 0)
@@ -4900,9 +4883,6 @@ static void
ev_view_class_init (EvViewClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (class);
-#endif
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
#if !GTK_CHECK_VERSION (3, 0, 0)
GtkLayoutClass *layout_class = GTK_LAYOUT_CLASS (class);
@@ -4913,7 +4893,6 @@ ev_view_class_init (EvViewClass *class)
object_class->get_property = ev_view_get_property;
object_class->set_property = ev_view_set_property;
#endif
-
object_class->finalize = ev_view_finalize;
#if GTK_CHECK_VERSION (3, 0, 0)
@@ -4951,11 +4930,7 @@ ev_view_class_init (EvViewClass *class)
widget_class->popup_menu = ev_view_popup_menu;
widget_class->query_tooltip = ev_view_query_tooltip;
-#if GTK_CHECK_VERSION (3, 0, 0)
object_class->dispose = ev_view_dispose;
-#else
- gtk_object_class->destroy = ev_view_destroy;
-#endif
#if !GTK_CHECK_VERSION (3, 0, 0)
layout_class->set_scroll_adjustments = ev_view_set_scroll_adjustments;
@@ -5055,7 +5030,6 @@ ev_view_class_init (EvViewClass *class)
GTK_SCROLL_STEP_BACKWARD, G_TYPE_BOOLEAN, FALSE);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_L, 0, "binding_activated", 2, GTK_TYPE_SCROLL_TYPE,
GTK_SCROLL_STEP_FORWARD, G_TYPE_BOOLEAN, TRUE);
-
}
static void
diff --git a/shell/ev-sidebar-attachments.c b/shell/ev-sidebar-attachments.c
index 9b8ee6c8..2b03e225 100644
--- a/shell/ev-sidebar-attachments.c
+++ b/shell/ev-sidebar-attachments.c
@@ -472,11 +472,7 @@ ev_sidebar_attachments_get_property (GObject *object,
}
static void
-#if GTK_CHECK_VERSION (3, 0, 0)
ev_sidebar_attachments_dispose (GObject *object)
-#else
-ev_sidebar_attachments_destroy (GtkObject *object)
-#endif
{
EvSidebarAttachments *ev_attachbar = EV_SIDEBAR_ATTACHMENTS (object);
@@ -487,7 +483,7 @@ ev_sidebar_attachments_destroy (GtkObject *object)
ev_attachbar);
ev_attachbar->priv->icon_theme = NULL;
}
-
+
if (ev_attachbar->priv->model) {
g_object_unref (ev_attachbar->priv->model);
ev_attachbar->priv->model = NULL;
@@ -498,34 +494,20 @@ ev_sidebar_attachments_destroy (GtkObject *object)
ev_attachbar->priv->icon_cache = NULL;
}
-#if GTK_CHECK_VERSION (3, 0, 0)
(* G_OBJECT_CLASS (ev_sidebar_attachments_parent_class)->dispose) (object);
-#else
- (* GTK_OBJECT_CLASS (ev_sidebar_attachments_parent_class)->destroy) (object);
-#endif
}
static void
ev_sidebar_attachments_class_init (EvSidebarAttachmentsClass *ev_attachbar_class)
{
GObjectClass *g_object_class;
-#if !GTK_CHECK_VERSION (3, 0, 0)
- GtkObjectClass *gtk_object_class;
-#endif
GtkWidgetClass *gtk_widget_class;
g_object_class = G_OBJECT_CLASS (ev_attachbar_class);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- gtk_object_class = GTK_OBJECT_CLASS (ev_attachbar_class);
-#endif
gtk_widget_class = GTK_WIDGET_CLASS (ev_attachbar_class);
g_object_class->get_property = ev_sidebar_attachments_get_property;
-#if GTK_CHECK_VERSION (3, 0, 0)
g_object_class->dispose = ev_sidebar_attachments_dispose;
-#else
- gtk_object_class->destroy = ev_sidebar_attachments_destroy;
-#endif
gtk_widget_class->popup_menu = ev_sidebar_attachments_popup_menu;
gtk_widget_class->screen_changed = ev_sidebar_attachments_screen_changed;
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;