summaryrefslogtreecommitdiff
path: root/src/ui/preview-widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/preview-widget.c')
-rw-r--r--src/ui/preview-widget.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/ui/preview-widget.c b/src/ui/preview-widget.c
index da8593d4..9138c6f5 100644
--- a/src/ui/preview-widget.c
+++ b/src/ui/preview-widget.c
@@ -103,19 +103,17 @@ meta_preview_class_init (MetaPreviewClass *class)
gobject_class->finalize = meta_preview_finalize;
- #if GTK_CHECK_VERSION(3, 0, 0)
+#if GTK_CHECK_VERSION(3, 0, 0)
widget_class->draw = meta_preview_draw;
widget_class->get_preferred_width = meta_preview_get_preferred_width;
widget_class->get_preferred_height = meta_preview_get_preferred_height;
- #else
- widget_class->expose_event = meta_preview_expose;
- widget_class->size_request = meta_preview_size_request;
- #endif
- widget_class->size_allocate = meta_preview_size_allocate;
-#if GTK_CHECK_VERSION(3, 0, 0)
gtk_container_class_handle_border_width (GTK_CONTAINER_CLASS (class));
+#else
+ widget_class->expose_event = meta_preview_expose;
+ widget_class->size_request = meta_preview_size_request;
#endif
+ widget_class->size_allocate = meta_preview_size_allocate;
}
static void
@@ -162,11 +160,7 @@ meta_preview_new (void)
{
MetaPreview *preview;
- #if GTK_CHECK_VERSION(3, 0, 0)
preview = g_object_new (META_TYPE_PREVIEW, NULL);
- #else
- preview = gtk_type_new (META_TYPE_PREVIEW);
- #endif
return GTK_WIDGET (preview);
}
@@ -447,9 +441,6 @@ meta_preview_expose (GtkWidget *widget,
return GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
}
-#endif
-
-#if !GTK_CHECK_VERSION (3, 0, 0)
static void
meta_preview_size_request (GtkWidget *widget,
GtkRequisition *req)