diff options
Diffstat (limited to 'geyes')
-rw-r--r-- | geyes/geyes.c | 22 | ||||
-rw-r--r-- | geyes/themes.c | 15 |
2 files changed, 1 insertions, 36 deletions
diff --git a/geyes/geyes.c b/geyes/geyes.c index 2c8ed8a8..00f85fd7 100644 --- a/geyes/geyes.c +++ b/geyes/geyes.c @@ -124,33 +124,20 @@ static gint timer_cb (EyesApplet *eyes_applet) { GdkDisplay *display; -#if GTK_CHECK_VERSION (3, 20, 0) GdkSeat *seat; -#else - GdkDeviceManager *device_manager; - GdkDevice *device; -#endif gint x, y; gint pupil_x, pupil_y; gint i; display = gtk_widget_get_display (GTK_WIDGET (eyes_applet->applet)); -#if GTK_CHECK_VERSION (3, 20, 0) seat = gdk_display_get_default_seat (display); -#else - device_manager = gdk_display_get_device_manager (display); - device = gdk_device_manager_get_client_pointer (device_manager); -#endif for (i = 0; i < eyes_applet->num_eyes; i++) { if (gtk_widget_get_realized (eyes_applet->eyes[i])) { -#if GTK_CHECK_VERSION (3, 20, 0) gdk_window_get_device_position (gtk_widget_get_window (eyes_applet->eyes[i]), gdk_seat_get_pointer (seat), &x, &y, NULL); -#else - gdk_window_get_device_position (gtk_widget_get_window (eyes_applet->eyes[i]), device, &x, &y, NULL); -#endif + if ((x != eyes_applet->pointer_last_x[i]) || (y != eyes_applet->pointer_last_y[i])) { calculate_pupil_xy (eyes_applet, x, y, &pupil_x, &pupil_y, eyes_applet->eyes[i]); @@ -342,17 +329,10 @@ help_cb (GtkAction *action, { GError *error = NULL; -#if GTK_CHECK_VERSION (3, 22, 0) gtk_show_uri_on_window (NULL, "help:mate-geyes", gtk_get_current_event_time (), &error); -#else - gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (eyes_applet->applet)), - "help:mate-geyes", - gtk_get_current_event_time (), - &error); -#endif if (error) { GtkWidget *dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, diff --git a/geyes/themes.c b/geyes/themes.c index 687c4694..b9226a66 100644 --- a/geyes/themes.c +++ b/geyes/themes.c @@ -216,17 +216,10 @@ phelp_cb (GtkDialog *dialog) { GError *error = NULL; -#if GTK_CHECK_VERSION (3, 22, 0) gtk_show_uri_on_window (GTK_WINDOW (dialog), "help:mate-geyes/geyes-settings", gtk_get_current_event_time (), &error); -#else - gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)), - "help:mate-geyes/geyes-settings", - gtk_get_current_event_time (), - &error); -#endif if (error) { GtkWidget *error_dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, @@ -326,11 +319,7 @@ properties_cb (GtkAction *action, label = gtk_label_new (_(title)); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (label), 0.0); -#else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); -#endif gtk_box_pack_start (GTK_BOX (category_vbox), label, FALSE, FALSE, 0); g_free (title); @@ -348,11 +337,7 @@ properties_cb (GtkAction *action, gtk_widget_show (control_vbox); label = gtk_label_new_with_mnemonic (_("_Select a theme:")); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (label), 0.0); -#else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); -#endif gtk_box_pack_start (GTK_BOX (control_vbox), label, FALSE, FALSE, 0); scrolled = gtk_scrolled_window_new (NULL, NULL); |