diff options
-rw-r--r-- | geyes/geyes.c | 20 | ||||
-rw-r--r-- | geyes/themes.c | 4 |
2 files changed, 23 insertions, 1 deletions
diff --git a/geyes/geyes.c b/geyes/geyes.c index 79d4b7c0..91bf8a67 100644 --- a/geyes/geyes.c +++ b/geyes/geyes.c @@ -30,9 +30,14 @@ static void applet_back_change (MatePanelApplet *a, MatePanelAppletBackgroundType type, GdkColor *color, +#if GTK_CHECK_VERSION (3, 0, 0) + cairo_pattern_t *pattern, +#else GdkPixmap *pixmap, +#endif EyesApplet *eyes_applet) { +#if !GTK_CHECK_VERSION (3, 0, 0) /* taken from the TrashApplet */ GtkRcStyle *rc_style; GtkStyle *style; @@ -66,7 +71,7 @@ applet_back_change (MatePanelApplet *a, default: break; } - +#endif } /* TODO - Optimize this a bit */ @@ -298,7 +303,11 @@ create_eyes (MatePanelApplet *applet) } static void +#if GTK_CHECK_VERSION (3, 0, 0) +dispose_cb (GObject *object, EyesApplet *eyes_applet) +#else destroy_cb (GtkObject *object, EyesApplet *eyes_applet) +#endif { g_return_if_fail (eyes_applet); @@ -401,7 +410,11 @@ geyes_applet_fill (MatePanelApplet *applet) eyes_applet = create_eyes (applet); eyes_applet->timeout_id = g_timeout_add ( +#if GTK_CHECK_VERSION (3, 0, 0) + UPDATE_TIMEOUT, (GSourceFunc) timer_cb, eyes_applet); +#else UPDATE_TIMEOUT, (GtkFunction) timer_cb, eyes_applet); +#endif action_group = gtk_action_group_new ("Geyes Applet Actions"); gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); @@ -432,8 +445,13 @@ geyes_applet_fill (MatePanelApplet *applet) G_CALLBACK (applet_back_change), eyes_applet); g_signal_connect (eyes_applet->vbox, +#if GTK_CHECK_VERSION (3, 0, 0) + "dispose", + G_CALLBACK (dispose_cb), +#else "destroy", G_CALLBACK (destroy_cb), +#endif eyes_applet); gtk_widget_show_all (GTK_WIDGET (eyes_applet->applet)); diff --git a/geyes/themes.c b/geyes/themes.c index 285b5b01..0f5ee028 100644 --- a/geyes/themes.c +++ b/geyes/themes.c @@ -130,7 +130,9 @@ load_theme (EyesApplet *eyes_applet, const gchar *theme_dir) _("Can not launch the eyes applet."), _("There was a fatal error while trying to load the theme.")); +#if !GTK_CHECK_VERSION (3, 0, 0) gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); +#endif gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); @@ -295,7 +297,9 @@ properties_cb (GtkAction *action, gtk_widget_set_size_request (GTK_WIDGET (pbox), 300, 200); gtk_dialog_set_default_response(GTK_DIALOG (pbox), GTK_RESPONSE_CLOSE); +#if !GTK_CHECK_VERSION (3, 0, 0) gtk_dialog_set_has_separator (GTK_DIALOG (pbox), FALSE); +#endif gtk_container_set_border_width (GTK_CONTAINER (pbox), 5); gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (pbox))), 2); |