diff options
author | monsta <[email protected]> | 2018-02-02 16:25:31 +0300 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-02-04 20:32:14 +0100 |
commit | d1020226236576464be4ab47ec0098a588bef486 (patch) | |
tree | c79b616da32f8b684b964af8b8cf3fa96b98c4e6 /drivemount | |
parent | e6d55cba85fc49b3dfac8150c397540bda369847 (diff) | |
download | mate-applets-d1020226236576464be4ab47ec0098a588bef486.tar.bz2 mate-applets-d1020226236576464be4ab47ec0098a588bef486.tar.xz |
require GTK+ 3.22 and GLib 2.50
Diffstat (limited to 'drivemount')
-rw-r--r-- | drivemount/drive-button.c | 26 | ||||
-rw-r--r-- | drivemount/drivemount.c | 7 |
2 files changed, 0 insertions, 33 deletions
diff --git a/drivemount/drive-button.c b/drivemount/drive-button.c index bd01805e..1b1a758c 100644 --- a/drivemount/drive-button.c +++ b/drivemount/drive-button.c @@ -72,7 +72,6 @@ drive_button_class_init (DriveButtonClass *class) provider = gtk_css_provider_new (); -#if GTK_CHECK_VERSION (3, 20, 0) gtk_css_provider_load_from_data (provider, "#drive-button {\n" " border-width: 0px;\n" @@ -80,15 +79,6 @@ drive_button_class_init (DriveButtonClass *class) " margin: 0px;\n" "}", -1, NULL); -#else - gtk_css_provider_load_from_data (provider, - "#drive-button {\n" - " border-width: 0px;\n" - " -GtkWidget-focus-line-width: 0px;\n" - " -GtkWidget-focus-padding: 0px;\n" - "}", - -1, NULL); -#endif gtk_style_context_add_provider_for_screen (gdk_screen_get_default(), GTK_STYLE_PROVIDER (provider), @@ -176,7 +166,6 @@ drive_button_unrealize (GtkWidget *widget) } #endif /* 0 */ -#if GTK_CHECK_VERSION(3, 22, 0) static int _gtk_get_monitor_num (GdkMonitor *monitor) { @@ -193,7 +182,6 @@ _gtk_get_monitor_num (GdkMonitor *monitor) return -1; } -#endif /* the following function is adapted from gtkmenuitem.c */ static void @@ -207,12 +195,8 @@ position_menu (GtkMenu *menu, gint *x, gint *y, GtkRequisition requisition; GtkTextDirection direction; GdkRectangle monitor; -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *monitor_num; GdkDisplay *display; -#else - gint monitor_num; -#endif g_return_if_fail (menu != NULL); g_return_if_fail (x != NULL); @@ -227,17 +211,11 @@ position_menu (GtkMenu *menu, gint *x, gint *y, theight = requisition.height; screen = gtk_widget_get_screen (GTK_WIDGET (menu)); -#if GTK_CHECK_VERSION (3, 22, 0) display =gdk_screen_get_display (screen); monitor_num = gdk_display_get_monitor_at_window (display, gtk_widget_get_window (widget)); if (monitor_num == NULL) monitor_num = gdk_display_get_monitor (display, 0); gdk_monitor_get_geometry (monitor_num, &monitor); -#else - monitor_num = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (widget)); - if (monitor_num < 0) monitor_num = 0; - gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor); -#endif if (!gdk_window_get_origin (gtk_widget_get_window (widget), &tx, &ty)) { g_warning ("Menu not on screen"); @@ -263,11 +241,7 @@ position_menu (GtkMenu *menu, gint *x, gint *y, *x = CLAMP (tx, monitor.x, MAX (monitor.x, monitor.x + monitor.width - twidth)); *y = ty; -#if GTK_CHECK_VERSION (3, 22, 0) gtk_menu_set_monitor (menu, _gtk_get_monitor_num (monitor_num)); -#else - gtk_menu_set_monitor (menu, monitor_num); -#endif } static gboolean diff --git a/drivemount/drivemount.c b/drivemount/drivemount.c index 57a7031a..433aa6cc 100644 --- a/drivemount/drivemount.c +++ b/drivemount/drivemount.c @@ -132,17 +132,10 @@ display_help (GtkAction *action, screen = gtk_widget_get_screen (GTK_WIDGET (drive_list)); -#if GTK_CHECK_VERSION (3, 22, 0) gtk_show_uri_on_window (NULL, "help:mate-drivemount", gtk_get_current_event_time (), &error); -#else - gtk_show_uri (screen, - "help:mate-drivemount", - gtk_get_current_event_time (), - &error); -#endif if (error) { GtkWidget *dialog; |