summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--baobab/src/baobab-remote-connect-dialog.c36
-rw-r--r--baobab/src/baobab-utils.c5
-rw-r--r--configure.ac6
-rw-r--r--gsearchtool/src/gsearchtool-callbacks.c6
-rw-r--r--logview/src/logview-findbar.c4
-rw-r--r--logview/src/logview-window.c12
-rw-r--r--mate-dictionary/libgdict/gdict-defbox.c9
-rw-r--r--mate-dictionary/src/gdict-applet.c17
-rw-r--r--mate-dictionary/src/gdict-pref-dialog.c4
-rw-r--r--mate-dictionary/src/gdict-sidebar.c4
-rw-r--r--mate-dictionary/src/gdict-source-dialog.c4
-rw-r--r--mate-dictionary/src/gdict-window.c4
-rw-r--r--mate-screenshot/src/mate-screenshot.c26
-rw-r--r--mate-screenshot/src/screenshot-utils.c70
14 files changed, 5 insertions, 202 deletions
diff --git a/baobab/src/baobab-remote-connect-dialog.c b/baobab/src/baobab-remote-connect-dialog.c
index a5b6d5e0..603adb9b 100644
--- a/baobab/src/baobab-remote-connect-dialog.c
+++ b/baobab/src/baobab-remote-connect-dialog.c
@@ -436,12 +436,8 @@ setup_for_type (BaobabRemoteConnectDialog *dialog)
if (meth->scheme == NULL) {
label = gtk_label_new_with_mnemonic (_("_Location (URI):"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_widget_show (label);
gtk_grid_attach (GTK_GRID (grid), label, 0, i, 1, 1);
@@ -456,12 +452,8 @@ setup_for_type (BaobabRemoteConnectDialog *dialog)
}
label = gtk_label_new_with_mnemonic (_("_Server:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_widget_show (label);
gtk_grid_attach (GTK_GRID (grid), label, 0, i, 1, 1);
@@ -473,12 +465,8 @@ setup_for_type (BaobabRemoteConnectDialog *dialog)
i++;
label = gtk_label_new (_("Optional information:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_widget_show (label);
gtk_grid_attach (GTK_GRID (grid), label, 0, i, 2, 1);
@@ -486,12 +474,8 @@ setup_for_type (BaobabRemoteConnectDialog *dialog)
if (meth->flags & SHOW_SHARE) {
label = gtk_label_new_with_mnemonic (_("_Share:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_widget_show (label);
gtk_grid_attach (GTK_GRID (grid), label, 0, i, 1, 1);
@@ -505,12 +489,8 @@ setup_for_type (BaobabRemoteConnectDialog *dialog)
if (meth->flags & SHOW_PORT) {
label = gtk_label_new_with_mnemonic (_("_Port:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_widget_show (label);
gtk_grid_attach (GTK_GRID (grid), label, 0, i, 1, 1);
@@ -523,12 +503,8 @@ setup_for_type (BaobabRemoteConnectDialog *dialog)
}
label = gtk_label_new_with_mnemonic (_("_Folder:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_widget_show (label);
gtk_grid_attach (GTK_GRID (grid), label, 0, i, 1, 1);
@@ -541,12 +517,8 @@ setup_for_type (BaobabRemoteConnectDialog *dialog)
if (meth->flags & SHOW_USER) {
label = gtk_label_new_with_mnemonic (_("_User Name:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_widget_show (label);
gtk_grid_attach (GTK_GRID (grid), label, 0, i, 1, 1);
@@ -560,12 +532,8 @@ setup_for_type (BaobabRemoteConnectDialog *dialog)
if (meth->flags & SHOW_DOMAIN) {
label = gtk_label_new_with_mnemonic (_("_Domain Name:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_widget_show (label);
gtk_grid_attach (GTK_GRID (grid), label, 0, i, 1, 1);
@@ -641,12 +609,8 @@ baobab_remote_connect_dialog_init (BaobabRemoteConnectDialog *dialog)
gtk_widget_show (hbox);
label = gtk_label_new_with_mnemonic (_("Service _type:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (hbox),
label, FALSE, FALSE, 0);
diff --git a/baobab/src/baobab-utils.c b/baobab/src/baobab-utils.c
index 40b52145..a102bc30 100644
--- a/baobab/src/baobab-utils.c
+++ b/baobab/src/baobab-utils.c
@@ -506,15 +506,10 @@ baobab_help_display (GtkWindow *parent,
g_strdup_printf ("help:%s/%s", file_name, link_id) :
g_strdup_printf ("help:%s", file_name);
-#if GTK_CHECK_VERSION (3, 22, 0)
ret = gtk_show_uri_on_window (parent,
uri,
gtk_get_current_event_time (),
&error);
-#else
- ret = gtk_show_uri (gtk_window_get_screen (parent),
- uri, gtk_get_current_event_time (), &error);
-#endif
g_free (uri);
if (error != NULL) {
diff --git a/configure.ac b/configure.ac
index 4d9e0b9e..d7a72c9a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,10 +59,10 @@ AC_SUBST(LIBGDICT_LT_VERSION)
dnl pkg-config check
-GLIB_REQUIRED=2.36.0
-GIO_REQUIRED=2.36.0
+GLIB_REQUIRED=2.50.0
+GIO_REQUIRED=2.50.0
GIO_UNIX_REQUIRED=2.18.0
-GTK_REQUIRED=3.14.0
+GTK_REQUIRED=3.22.0
LIBMATE_PANEL_APPLET_REQUIRED=1.17.0
LIBGTOP_REQUIRED=2.12.0
LIBCANBERRA_GTK_REQUIRED=0.4
diff --git a/gsearchtool/src/gsearchtool-callbacks.c b/gsearchtool/src/gsearchtool-callbacks.c
index 876fc0f5..55b1e086 100644
--- a/gsearchtool/src/gsearchtool-callbacks.c
+++ b/gsearchtool/src/gsearchtool-callbacks.c
@@ -186,13 +186,9 @@ click_help_cb (GtkWidget * widget,
GtkWidget * window = data;
GError * error = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (GTK_WINDOW (window), "help:mate-search-tool",
gtk_get_current_event_time (), &error);
-#else
- gtk_show_uri (gtk_widget_get_screen (widget), "help:mate-search-tool",
- gtk_get_current_event_time (), &error);
-#endif
+
if (error) {
GtkWidget * dialog;
diff --git a/logview/src/logview-findbar.c b/logview/src/logview-findbar.c
index 58cb9909..0246d8d6 100644
--- a/logview/src/logview-findbar.c
+++ b/logview/src/logview-findbar.c
@@ -215,12 +215,8 @@ logview_findbar_init (LogviewFindbar *findbar)
gtk_tool_item_set_expand (priv->status_item, TRUE);
priv->message = gtk_label_new ("");
gtk_label_set_use_markup (GTK_LABEL (priv->message), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->message), 0.0);
gtk_label_set_yalign (GTK_LABEL (priv->message), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->message), 0.0, 0.5);
-#endif
gtk_container_add (GTK_CONTAINER (priv->status_item), priv->message);
gtk_widget_show (priv->message);
gtk_toolbar_insert (gtoolbar, priv->status_item, -1);
diff --git a/logview/src/logview-window.c b/logview/src/logview-window.c
index 23fcc7b7..e20208b2 100644
--- a/logview/src/logview-window.c
+++ b/logview/src/logview-window.c
@@ -356,11 +356,7 @@ logview_help (GtkAction *action, GtkWidget *parent_window)
{
GError *error = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (GTK_WINDOW (parent_window),
-#else
- gtk_show_uri (gtk_widget_get_screen (parent_window),
-#endif
"help:mate-system-log", gtk_get_current_event_time (),
&error);
@@ -1200,12 +1196,8 @@ message_area_create_error_box (LogviewWindow *window,
gtk_box_pack_start (GTK_BOX (vbox), primary_label, TRUE, TRUE, 0);
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (primary_label), 0.0);
gtk_label_set_yalign (GTK_LABEL (primary_label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5);
-#endif
gtk_widget_set_can_focus (primary_label, TRUE);
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
@@ -1218,12 +1210,8 @@ message_area_create_error_box (LogviewWindow *window,
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (secondary_label), 0.0);
gtk_label_set_yalign (GTK_LABEL (secondary_label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.0, 0.5);
-#endif
window->priv->message_secondary = secondary_label;
diff --git a/mate-dictionary/libgdict/gdict-defbox.c b/mate-dictionary/libgdict/gdict-defbox.c
index 69d76329..ee48c3e5 100644
--- a/mate-dictionary/libgdict/gdict-defbox.c
+++ b/mate-dictionary/libgdict/gdict-defbox.c
@@ -1602,23 +1602,14 @@ defbox_visibility_notify_cb (GtkWidget *text_view,
GdictDefbox *defbox)
{
GdkDisplay *display;
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkSeat *seat;
-#else
- GdkDeviceManager *device_manager;
-#endif
GdkDevice *pointer;
gint wx, wy;
gint bx, by;
display = gdk_window_get_display (event->window);
-#if GTK_CHECK_VERSION (3, 20, 0)
seat = gdk_display_get_default_seat (display);
pointer = gdk_seat_get_pointer (seat);
-#else
- device_manager = gdk_display_get_device_manager (display);
- pointer = gdk_device_manager_get_client_pointer (device_manager);
-#endif
gdk_window_get_device_position (gtk_widget_get_window (text_view), pointer, &wx, &wy, NULL);
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
diff --git a/mate-dictionary/src/gdict-applet.c b/mate-dictionary/src/gdict-applet.c
index 6269c5b1..817880dd 100644
--- a/mate-dictionary/src/gdict-applet.c
+++ b/mate-dictionary/src/gdict-applet.c
@@ -130,13 +130,8 @@ set_window_default_size (GdictApplet *applet)
GtkWidget *widget, *defbox;
gint width, height;
gint font_size;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkDisplay *display;
GdkMonitor *monitor_num;
-#else
- GdkScreen *screen;
- gint monitor_num;
-#endif
GtkRequisition req;
GdkRectangle monitor;
@@ -159,18 +154,10 @@ set_window_default_size (GdictApplet *applet)
height = MAX (height, req.height);
/* ... but make it no larger than half the monitor size */
-#if GTK_CHECK_VERSION (3, 22, 0)
display = gtk_widget_get_display (widget);
monitor_num = gdk_display_get_monitor_at_window (display,
gtk_widget_get_window (widget));
gdk_monitor_get_geometry (monitor_num, &monitor);
-#else
- screen = gtk_widget_get_screen (widget);
- monitor_num = gdk_screen_get_monitor_at_window (screen,
- gtk_widget_get_window (widget));
-
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
-#endif
width = MIN (width, monitor.width / 2);
height = MIN (height, monitor.height / 2);
@@ -729,11 +716,7 @@ gdict_applet_cmd_help (GtkAction *action,
{
GError *err = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (NULL,
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (applet)),
-#endif
"help:mate-dictionary/mate-dictionary-applet",
gtk_get_current_event_time (), &err);
diff --git a/mate-dictionary/src/gdict-pref-dialog.c b/mate-dictionary/src/gdict-pref-dialog.c
index 006d5711..e3563479 100644
--- a/mate-dictionary/src/gdict-pref-dialog.c
+++ b/mate-dictionary/src/gdict-pref-dialog.c
@@ -484,11 +484,7 @@ response_cb (GtkDialog *dialog,
switch (response_id)
{
case GTK_RESPONSE_HELP:
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (GTK_WINDOW (dialog),
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)),
-#endif
"help:mate-dictionary/mate-dictionary-preferences",
gtk_get_current_event_time (), &err);
if (err)
diff --git a/mate-dictionary/src/gdict-sidebar.c b/mate-dictionary/src/gdict-sidebar.c
index 1a6e6d4b..4290bd6b 100644
--- a/mate-dictionary/src/gdict-sidebar.c
+++ b/mate-dictionary/src/gdict-sidebar.c
@@ -346,12 +346,8 @@ gdict_sidebar_init (GdictSidebar *sidebar)
select_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
priv->label = gtk_label_new (NULL);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->label), 0.0);
gtk_label_set_yalign (GTK_LABEL (priv->label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (select_hbox), priv->label, FALSE, FALSE, 0);
gtk_widget_show (priv->label);
diff --git a/mate-dictionary/src/gdict-source-dialog.c b/mate-dictionary/src/gdict-source-dialog.c
index 589ae962..f79b5a4a 100644
--- a/mate-dictionary/src/gdict-source-dialog.c
+++ b/mate-dictionary/src/gdict-source-dialog.c
@@ -469,11 +469,7 @@ gdict_source_dialog_response_cb (GtkDialog *dialog,
build_new_source (GDICT_SOURCE_DIALOG (dialog));
break;
case GTK_RESPONSE_HELP:
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (GTK_WINDOW (dialog),
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)),
-#endif
"help:mate-dictionary/mate-dictionary-add-source",
gtk_get_current_event_time (), &err);
if (err)
diff --git a/mate-dictionary/src/gdict-window.c b/mate-dictionary/src/gdict-window.c
index 0bc300c4..07d05922 100644
--- a/mate-dictionary/src/gdict-window.c
+++ b/mate-dictionary/src/gdict-window.c
@@ -1244,11 +1244,7 @@ gdict_window_cmd_help_contents (GtkAction *action,
g_return_if_fail (GDICT_IS_WINDOW (window));
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (GTK_WINDOW (window),
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (window)),
-#endif
"help:mate-dictionary",
gtk_get_current_event_time (), &err);
if (err)
diff --git a/mate-screenshot/src/mate-screenshot.c b/mate-screenshot/src/mate-screenshot.c
index 0b5c3332..e4251fed 100644
--- a/mate-screenshot/src/mate-screenshot.c
+++ b/mate-screenshot/src/mate-screenshot.c
@@ -126,16 +126,10 @@ display_help (GtkWindow *parent)
{
GError *error = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (parent,
"help:mate-user-guide/goseditmainmenu-53",
gtk_get_current_event_time (),
&error);
-#else
- gtk_show_uri (gtk_window_get_screen (parent),
- "help:mate-user-guide/goseditmainmenu-53",
- gtk_get_current_event_time (), &error);
-#endif
if (error)
{
@@ -339,12 +333,8 @@ create_effects_frame (GtkWidget *outer_vbox,
title = g_strconcat ("<b>", frame_title, "</b>", NULL);
label = gtk_label_new (title);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (main_vbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
g_free (title);
@@ -385,12 +375,8 @@ create_effects_frame (GtkWidget *outer_vbox,
label = gtk_label_new_with_mnemonic (_("Apply _effect:"));
gtk_widget_set_sensitive (label, take_window_shot);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
effect_label = label;
@@ -423,12 +409,8 @@ create_screenshot_frame (GtkWidget *outer_vbox,
title = g_strconcat ("<b>", frame_title, "</b>", NULL);
label = gtk_label_new (title);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (main_vbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
g_free (title);
@@ -494,12 +476,8 @@ create_screenshot_frame (GtkWidget *outer_vbox,
* delay of <spin button> seconds".
*/
label = gtk_label_new_with_mnemonic (_("Grab _after a delay of"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (delay_hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
@@ -519,12 +497,8 @@ create_screenshot_frame (GtkWidget *outer_vbox,
* delay of <spin button> seconds".
*/
label = gtk_label_new (_("seconds"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_box_pack_end (GTK_BOX (delay_hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
}
diff --git a/mate-screenshot/src/screenshot-utils.c b/mate-screenshot/src/screenshot-utils.c
index b6539c85..d565fffe 100644
--- a/mate-screenshot/src/screenshot-utils.c
+++ b/mate-screenshot/src/screenshot-utils.c
@@ -160,23 +160,14 @@ GdkWindow *
screenshot_find_current_window ()
{
GdkWindow *current_window;
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkDisplay *display;
GdkSeat *seat;
-#else
- GdkDeviceManager *manager;
-#endif
GdkDevice *device;
current_window = screenshot_find_active_window ();
-#if GTK_CHECK_VERSION (3, 20, 0)
display = gdk_window_get_display (current_window);
seat = gdk_display_get_default_seat (display);
device = gdk_seat_get_pointer (seat);
-#else
- manager = gdk_display_get_device_manager (gdk_display_get_default ());
- device = gdk_device_manager_get_client_pointer (manager);
-#endif
/* If there's no active window, we fall back to returning the
* window that the cursor is in.
@@ -389,12 +380,7 @@ screenshot_select_area_async (SelectAreaCallback callback)
{
GdkDisplay *display;
GdkCursor *cursor;
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkSeat *seat;
-#else
- GdkDeviceManager *manager;
- GdkDevice *pointer, *keyboard;
-#endif
GdkGrabStatus res;
select_area_filter_data data;
GdkRectangle *rectangle;
@@ -418,7 +404,6 @@ screenshot_select_area_async (SelectAreaCallback callback)
display = gdk_display_get_default ();
cursor = gdk_cursor_new_for_display (display, GDK_CROSSHAIR);
-#if GTK_CHECK_VERSION (3, 20, 0)
seat = gdk_display_get_default_seat (display);
res = gdk_seat_grab (seat,
@@ -439,41 +424,6 @@ screenshot_select_area_async (SelectAreaCallback callback)
gtk_main ();
gdk_seat_ungrab (seat);
-#else
- manager = gdk_display_get_device_manager (display);
- pointer = gdk_device_manager_get_client_pointer (manager);
- keyboard = gdk_device_get_associated_device (pointer);
-
- res = gdk_device_grab (pointer, gtk_widget_get_window (data.window),
- GDK_OWNERSHIP_NONE, FALSE,
- GDK_POINTER_MOTION_MASK |
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK,
- cursor, GDK_CURRENT_TIME);
-
- if (res != GDK_GRAB_SUCCESS)
- {
- g_object_unref (cursor);
- goto out;
- }
-
- res = gdk_device_grab (keyboard, gtk_widget_get_window (data.window),
- GDK_OWNERSHIP_NONE, FALSE,
- GDK_KEY_PRESS_MASK |
- GDK_KEY_RELEASE_MASK,
- NULL, GDK_CURRENT_TIME);
- if (res != GDK_GRAB_SUCCESS)
- {
- gdk_device_ungrab (pointer, GDK_CURRENT_TIME);
- g_object_unref (cursor);
- goto out;
- }
-
- gtk_main ();
-
- gdk_device_ungrab (keyboard, GDK_CURRENT_TIME);
- gdk_device_ungrab (pointer, GDK_CURRENT_TIME);
-#endif
gtk_widget_destroy (data.window);
g_object_unref (cursor);
@@ -515,19 +465,13 @@ find_wm_window (Window xid)
static cairo_region_t *
make_region_with_monitors (GdkScreen *screen)
{
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkDisplay *display;
-#endif
cairo_region_t *region;
int num_monitors;
int i;
-#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
region = cairo_region_create ();
@@ -535,11 +479,7 @@ make_region_with_monitors (GdkScreen *screen)
{
GdkRectangle rect;
-#if GTK_CHECK_VERSION (3, 22, 0)
gdk_monitor_get_geometry (gdk_display_get_monitor (display, i), &rect);
-#else
- gdk_screen_get_monitor_geometry (screen, i, &rect);
-#endif
cairo_region_union_rectangle (region, &rect);
}
@@ -839,24 +779,16 @@ screenshot_get_pixbuf (GdkWindow *window,
if (cursor_pixbuf != NULL)
{
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkDisplay *display;
GdkSeat *seat;
-#else
- GdkDeviceManager *manager;
-#endif
GdkDevice *device;
GdkRectangle r1, r2;
gint cx, cy, xhot, yhot;
-#if GTK_CHECK_VERSION (3, 20, 0)
display = gdk_window_get_display (window);
seat = gdk_display_get_default_seat (display);
device = gdk_seat_get_pointer (seat);
-#else
- manager = gdk_display_get_device_manager (gdk_display_get_default ());
- device = gdk_device_manager_get_client_pointer (manager);
-#endif
+
gdk_window_get_device_position (window, device, &cx, &cy, NULL);
sscanf (gdk_pixbuf_get_option (cursor_pixbuf, "x_hot"), "%d", &xhot);
sscanf (gdk_pixbuf_get_option (cursor_pixbuf, "y_hot"), "%d", &yhot);