diff options
author | monsta <[email protected]> | 2018-01-28 14:33:17 +0300 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-01-29 15:59:27 +0100 |
commit | dac0d4e304ceaa0e4f5c93fe4053ad44233a2c75 (patch) | |
tree | bbfeb8167947be43580ee675016d4c781a0cadc5 | |
parent | bff61989d0355ee61120ce5d0121d0c99f693569 (diff) | |
download | mate-power-manager-dac0d4e304ceaa0e4f5c93fe4053ad44233a2c75.tar.bz2 mate-power-manager-dac0d4e304ceaa0e4f5c93fe4053ad44233a2c75.tar.xz |
require GTK+ 3.22 and GLib 2.50
and drop additional checks for min/max GLib versions, it's not needed
-rw-r--r-- | applets/brightness/gpm-common.c | 4 | ||||
-rw-r--r-- | applets/inhibit/gpm-common.c | 4 | ||||
-rw-r--r-- | configure.ac | 14 | ||||
-rw-r--r-- | src/gpm-backlight.c | 14 | ||||
-rw-r--r-- | src/gpm-common.c | 4 | ||||
-rw-r--r-- | src/gpm-kbd-backlight.c | 14 | ||||
-rw-r--r-- | src/gpm-manager.c | 8 | ||||
-rw-r--r-- | src/msd-osd-window.c | 3 |
8 files changed, 5 insertions, 60 deletions
diff --git a/applets/brightness/gpm-common.c b/applets/brightness/gpm-common.c index da47610..9ebfbf0 100644 --- a/applets/brightness/gpm-common.c +++ b/applets/brightness/gpm-common.c @@ -45,11 +45,7 @@ gpm_help_display (const gchar *link_id) else uri = g_strdup ("help:mate-power-manager"); -#if GTK_CHECK_VERSION (3, 22, 0) gtk_show_uri_on_window (NULL, uri, GDK_CURRENT_TIME, &error); -#else - gtk_show_uri (NULL, uri, GDK_CURRENT_TIME, &error); -#endif if (error != NULL) { GtkWidget *d; diff --git a/applets/inhibit/gpm-common.c b/applets/inhibit/gpm-common.c index da47610..9ebfbf0 100644 --- a/applets/inhibit/gpm-common.c +++ b/applets/inhibit/gpm-common.c @@ -45,11 +45,7 @@ gpm_help_display (const gchar *link_id) else uri = g_strdup ("help:mate-power-manager"); -#if GTK_CHECK_VERSION (3, 22, 0) gtk_show_uri_on_window (NULL, uri, GDK_CURRENT_TIME, &error); -#else - gtk_show_uri (NULL, uri, GDK_CURRENT_TIME, &error); -#endif if (error != NULL) { GtkWidget *d; diff --git a/configure.ac b/configure.ac index ba7964a..6307719 100644 --- a/configure.ac +++ b/configure.ac @@ -19,12 +19,6 @@ IT_PROG_INTLTOOL([0.50.1]) MATE_COMPILE_WARNINGS YELP_HELP_INIT -# GLib min/max required versions -AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_36], - [Warn on use of APIs added after GLib 2.36]) -AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_36], - [Warn on use of APIs deprecated before GLib 2.36]) - AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) AC_ARG_ENABLE(deprecated, @@ -95,10 +89,10 @@ GLIB_GSETTINGS dnl ---------------------------------------------------------------------------- dnl - Library dependencies dnl ---------------------------------------------------------------------------- -GLIB_REQUIRED=2.36.0 -GIO_REQUIRED=2.36.0 -GDK_REQUIRED=3.14.0 -GTK_REQUIRED=3.14.0 +GLIB_REQUIRED=2.50.0 +GIO_REQUIRED=2.50.0 +GDK_REQUIRED=3.22.0 +GTK_REQUIRED=3.22.0 GNOME_KEYRING_REQUIRED=3.0.0 DBUS_REQUIRED=1.0 DBUS_GLIB_REQUIRED=0.70 diff --git a/src/gpm-backlight.c b/src/gpm-backlight.c index fa54ad6..e066d06 100644 --- a/src/gpm-backlight.c +++ b/src/gpm-backlight.c @@ -208,11 +208,7 @@ gpm_backlight_dialog_show (GpmBacklight *backlight) GtkRequisition win_req; GdkScreen *pointer_screen; GdkRectangle geometry; -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *monitor; -#else - int monitor; -#endif GdkDisplay *display; GdkDeviceManager *device_manager; GdkDevice *device; @@ -241,21 +237,11 @@ gpm_backlight_dialog_show (GpmBacklight *backlight) &pointer_x, &pointer_y); -#if GTK_CHECK_VERSION (3, 22, 0) monitor = gdk_display_get_monitor_at_point (gdk_screen_get_display (pointer_screen), pointer_x, pointer_y); gdk_monitor_get_geometry (monitor, &geometry); -#else - monitor = gdk_screen_get_monitor_at_point (pointer_screen, - pointer_x, - pointer_y); - - gdk_screen_get_monitor_geometry (pointer_screen, - monitor, - &geometry); -#endif screen_w = geometry.width; screen_h = geometry.height; diff --git a/src/gpm-common.c b/src/gpm-common.c index 8b7834e..6556d85 100644 --- a/src/gpm-common.c +++ b/src/gpm-common.c @@ -145,11 +145,7 @@ gpm_help_display (const gchar *link_id) else uri = g_strdup ("help:mate-power-manager"); -#if GTK_CHECK_VERSION (3, 22, 0) gtk_show_uri_on_window (NULL, uri, GDK_CURRENT_TIME, &error); -#else - gtk_show_uri (NULL, uri, GDK_CURRENT_TIME, &error); -#endif if (error != NULL) { GtkWidget *d; diff --git a/src/gpm-kbd-backlight.c b/src/gpm-kbd-backlight.c index cc5d362..ec353e0 100644 --- a/src/gpm-kbd-backlight.c +++ b/src/gpm-kbd-backlight.c @@ -185,11 +185,7 @@ gpm_kbd_backlight_dialog_show (GpmKbdBacklight *backlight) GtkRequisition win_req; GdkScreen *pointer_screen; GdkRectangle geometry; -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *monitor; -#else - int monitor; -#endif GdkDisplay *display; GdkDeviceManager *device_manager; GdkDevice *device; @@ -218,21 +214,11 @@ gpm_kbd_backlight_dialog_show (GpmKbdBacklight *backlight) &pointer_x, &pointer_y); -#if GTK_CHECK_VERSION (3, 22, 0) monitor = gdk_display_get_monitor_at_point (gdk_screen_get_display (pointer_screen), pointer_x, pointer_y); gdk_monitor_get_geometry (monitor, &geometry); -#else - monitor = gdk_screen_get_monitor_at_point (pointer_screen, - pointer_x, - pointer_y); - - gdk_screen_get_monitor_geometry (pointer_screen, - monitor, - &geometry); -#endif screen_w = geometry.width; screen_h = geometry.height; diff --git a/src/gpm-manager.c b/src/gpm-manager.c index 784532a..91d787d 100644 --- a/src/gpm-manager.c +++ b/src/gpm-manager.c @@ -528,9 +528,6 @@ out: static void gpm_manager_sleep_failure_response_cb (GtkDialog *dialog, gint response_id, GpmManager *manager) { -#if !GTK_CHECK_VERSION (3, 22, 0) - GdkScreen *screen; -#endif GtkWidget *dialog_error; GError *error = NULL; gboolean ret; @@ -539,12 +536,7 @@ gpm_manager_sleep_failure_response_cb (GtkDialog *dialog, gint response_id, GpmM /* user clicked the help button */ if (response_id == GTK_RESPONSE_HELP) { uri = g_settings_get_string (manager->priv->settings, GPM_SETTINGS_NOTIFY_SLEEP_FAILED_URI); -#if GTK_CHECK_VERSION (3, 22, 0) ret = gtk_show_uri_on_window (GTK_WINDOW (dialog), uri, gtk_get_current_event_time (), &error); -#else - screen = gdk_screen_get_default(); - ret = gtk_show_uri (screen, uri, gtk_get_current_event_time (), &error); -#endif if (!ret) { dialog_error = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "Failed to show uri %s", error->message); diff --git a/src/msd-osd-window.c b/src/msd-osd-window.c index cfc426f..0b006ad 100644 --- a/src/msd-osd-window.c +++ b/src/msd-osd-window.c @@ -400,9 +400,8 @@ msd_osd_window_class_init (MsdOsdWindowClass *klass) G_TYPE_NONE, 1, G_TYPE_POINTER); -#if GTK_CHECK_VERSION (3, 20, 0) gtk_widget_class_set_css_name (widget_class, "MsdOsdWindow"); -#endif + g_type_class_add_private (klass, sizeof (MsdOsdWindowPrivate)); } |