diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | libmate-desktop/mate-bg-crossfade.c | 11 | ||||
-rw-r--r-- | libmate-desktop/mate-bg.c | 18 | ||||
-rw-r--r-- | libmate-desktop/mate-colorsel.c | 17 | ||||
-rw-r--r-- | libmate-desktop/mate-desktop-item.c | 7 | ||||
-rw-r--r-- | libmate-desktop/mate-rr-labeler.c | 11 |
6 files changed, 2 insertions, 64 deletions
diff --git a/configure.ac b/configure.ac index 0df1b3a..ab512e2 100644 --- a/configure.ac +++ b/configure.ac @@ -110,7 +110,7 @@ fi GLIB_REQUIRED=2.36.0 GIO_REQUIRED=2.26.0 -GTK_REQUIRED=3.14.0 +GTK_REQUIRED=3.22.0 XRANDR_REQUIRED=1.3 dnl ---------------------------------------------------------------------------- diff --git a/libmate-desktop/mate-bg-crossfade.c b/libmate-desktop/mate-bg-crossfade.c index 8dac621..848727b 100644 --- a/libmate-desktop/mate-bg-crossfade.c +++ b/libmate-desktop/mate-bg-crossfade.c @@ -411,7 +411,6 @@ draw_background (MateBGCrossfade *fade) if (fade->priv->widget != NULL) { gtk_widget_queue_draw (fade->priv->widget); } else if (gdk_window_get_window_type (fade->priv->window) != GDK_WINDOW_ROOT) { -#if GTK_CHECK_VERSION (3, 22, 0) cairo_t *cr; cairo_region_t *region; GdkDrawingContext *draw_context; @@ -425,16 +424,6 @@ draw_background (MateBGCrossfade *fade) cairo_paint (cr); gdk_window_end_draw_frame (fade->priv->window, draw_context); cairo_region_destroy (region); -#else - cairo_pattern_t *pattern; - - pattern = - cairo_pattern_create_for_surface (fade->priv->fading_surface); - gdk_window_set_background_pattern (fade->priv->window, pattern); - cairo_pattern_destroy (pattern); - gdk_window_invalidate_rect (fade->priv->window, NULL, FALSE); - gdk_window_process_updates (fade->priv->window, FALSE); -#endif } else { Display *xdisplay = GDK_WINDOW_XDISPLAY (fade->priv->window); gdk_error_trap_push (); diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c index d4a9a71..e1d05db 100644 --- a/libmate-desktop/mate-bg.c +++ b/libmate-desktop/mate-bg.c @@ -844,25 +844,15 @@ draw_color_each_monitor (MateBG *bg, GdkPixbuf *dest, GdkScreen *screen) { -#if GTK_CHECK_VERSION (3, 22, 0) GdkDisplay *display; -#endif GdkRectangle rect; gint num_monitors; int monitor; -#if GTK_CHECK_VERSION (3, 22, 0) display = gdk_screen_get_display (screen); num_monitors = gdk_display_get_n_monitors (display); -#else - num_monitors = gdk_screen_get_n_monitors (screen); -#endif for (monitor = 0; monitor < num_monitors; monitor++) { -#if GTK_CHECK_VERSION (3, 22, 0) gdk_monitor_get_geometry (gdk_display_get_monitor (display, monitor), &rect); -#else - gdk_screen_get_monitor_geometry (screen, monitor, &rect); -#endif draw_color_area (bg, dest, &rect); } } @@ -1033,25 +1023,17 @@ draw_each_monitor (MateBG *bg, GdkPixbuf *dest, GdkScreen *screen) { -#if GTK_CHECK_VERSION (3, 22, 0) GdkDisplay *display; display = gdk_screen_get_display (screen); gint num_monitors = gdk_display_get_n_monitors (display); -#else - gint num_monitors = gdk_screen_get_n_monitors (screen); -#endif gint monitor = 0; for (; monitor < num_monitors; monitor++) { GdkRectangle rect; GdkPixbuf *pixbuf; -#if GTK_CHECK_VERSION (3, 22, 0) gdk_monitor_get_geometry (gdk_display_get_monitor (display, monitor), &rect); -#else - gdk_screen_get_monitor_geometry (screen, monitor, &rect); -#endif pixbuf = get_pixbuf_for_size (bg, monitor, rect.width, rect.height); if (pixbuf) { diff --git a/libmate-desktop/mate-colorsel.c b/libmate-desktop/mate-colorsel.c index 851f9cd..430304f 100644 --- a/libmate-desktop/mate-colorsel.c +++ b/libmate-desktop/mate-colorsel.c @@ -395,11 +395,7 @@ mate_color_selection_init (MateColorSelection *colorsel) gtk_grid_attach (GTK_GRID (grid), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL), 0, 3, 8, 1); priv->opacity_label = gtk_label_new_with_mnemonic (_("Op_acity:")); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (priv->opacity_label), 0.0); -#else - gtk_misc_set_alignment (GTK_MISC (priv->opacity_label), 0.0, 0.5); -#endif gtk_grid_attach (GTK_GRID (grid), priv->opacity_label, 0, 4, 1, 1); adjust = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 255.0, 1.0, 1.0, 0.0)); g_object_set_data (G_OBJECT (adjust), "COLORSEL", colorsel); @@ -424,11 +420,7 @@ mate_color_selection_init (MateColorSelection *colorsel) label = gtk_label_new_with_mnemonic (_("Color _name:")); gtk_grid_attach (GTK_GRID (grid), label, 0, 5, 1, 1); -#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 priv->hex_entry = gtk_entry_new (); gtk_label_set_mnemonic_widget (GTK_LABEL (label), priv->hex_entry); @@ -471,11 +463,8 @@ mate_color_selection_init (MateColorSelection *colorsel) set_selected_palette (colorsel, 0, 0); priv->palette_frame = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); label = gtk_label_new_with_mnemonic (_("_Palette:")); -#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 (priv->palette_frame), label, FALSE, FALSE, 0); gtk_label_set_mnemonic_widget (GTK_LABEL (label), @@ -2072,11 +2061,7 @@ make_label_spinbutton (MateColorSelection *colorsel, label = gtk_label_new_with_mnemonic (text); gtk_label_set_mnemonic_widget (GTK_LABEL (label), *spinbutton); -#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_grid_attach (GTK_GRID (grid), label, i, j, 1, 1); gtk_grid_attach (GTK_GRID (grid), *spinbutton, i+1, j, 1, 1); } diff --git a/libmate-desktop/mate-desktop-item.c b/libmate-desktop/mate-desktop-item.c index e1cf0a4..3413e56 100644 --- a/libmate-desktop/mate-desktop-item.c +++ b/libmate-desktop/mate-desktop-item.c @@ -2080,17 +2080,10 @@ mate_desktop_item_launch_on_screen_with_env ( return -1; } -#if GTK_CHECK_VERSION (3, 22, 0) retval = gtk_show_uri_on_window (NULL, url, GDK_CURRENT_TIME, error); -#else - retval = gtk_show_uri (screen, - url, - GDK_CURRENT_TIME, - error); -#endif return retval ? 0 : -1; } diff --git a/libmate-desktop/mate-rr-labeler.c b/libmate-desktop/mate-rr-labeler.c index 569f04d..d0b9090 100644 --- a/libmate-desktop/mate-rr-labeler.c +++ b/libmate-desktop/mate-rr-labeler.c @@ -363,22 +363,11 @@ position_window (MateRRLabeler *labeler, { GdkRectangle workarea; GdkRectangle monitor; -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *monitor_num; -#else - int monitor_num; -#endif get_work_area (labeler, &workarea); -#if GTK_CHECK_VERSION (3, 22, 0) monitor_num = gdk_display_get_monitor_at_point (gdk_screen_get_display (labeler->priv->screen), x, y); gdk_monitor_get_geometry (monitor_num, &monitor); -#else - monitor_num = gdk_screen_get_monitor_at_point (labeler->priv->screen, x, y); - gdk_screen_get_monitor_geometry (labeler->priv->screen, - monitor_num, - &monitor); -#endif gdk_rectangle_intersect (&monitor, &workarea, &workarea); gtk_window_move (GTK_WINDOW (window), workarea.x, workarea.y); |