summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--capplets/appearance/appearance-desktop.c10
-rw-r--r--capplets/appearance/appearance-style.c4
-rw-r--r--capplets/appearance/appearance-themes.c4
-rw-r--r--capplets/common/capplet-util.c14
-rw-r--r--capplets/common/file-transfer-dialog.c4
-rw-r--r--capplets/display/scrollarea.c13
-rw-r--r--capplets/keybindings/eggcellrendererkeys.c67
-rw-r--r--capplets/windows/mate-metacity-support.c4
-rw-r--r--capplets/windows/mate-window-properties.c8
-rw-r--r--configure.ac4
-rw-r--r--font-viewer/font-view.c8
-rw-r--r--libslab/app-shell.c8
-rw-r--r--libslab/application-tile.c9
-rw-r--r--libslab/nameplate-tile.c4
-rw-r--r--libslab/slab-mate-util.c4
-rw-r--r--libslab/slab-section.c4
-rw-r--r--libslab/tile-action.c4
-rw-r--r--typing-break/drw-break-window.c53
-rw-r--r--typing-break/drwright.c20
19 files changed, 4 insertions, 242 deletions
diff --git a/capplets/appearance/appearance-desktop.c b/capplets/appearance/appearance-desktop.c
index ee5d1427..545f6c12 100644
--- a/capplets/appearance/appearance-desktop.c
+++ b/capplets/appearance/appearance-desktop.c
@@ -883,20 +883,12 @@ static gdouble
get_monitor_aspect_ratio_for_widget (GtkWidget *widget)
{
gdouble aspect;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor;
-#else
- gint monitor;
-#endif
GdkRectangle rect;
-#if GTK_CHECK_VERSION (3, 22, 0)
monitor = gdk_display_get_monitor_at_window (gtk_widget_get_display (widget), gtk_widget_get_window (widget));
gdk_monitor_get_geometry (monitor, &rect);
-#else
- monitor = gdk_screen_get_monitor_at_window (gtk_widget_get_screen (widget), gtk_widget_get_window (widget));
- gdk_screen_get_monitor_geometry (gtk_widget_get_screen (widget), monitor, &rect);
-#endif
+
aspect = rect.height / (gdouble)rect.width;
return aspect;
diff --git a/capplets/appearance/appearance-style.c b/capplets/appearance/appearance-style.c
index afd892b6..161917c2 100644
--- a/capplets/appearance/appearance-style.c
+++ b/capplets/appearance/appearance-style.c
@@ -234,11 +234,7 @@ static void update_message_area(AppearanceData* data)
data->style_message_label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (data->style_message_label), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (data->style_message_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (data->style_message_label), 0.0, 0.5);
-#endif
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 9);
icon = gtk_image_new_from_icon_name ("dialog-warning", GTK_ICON_SIZE_DIALOG);
diff --git a/capplets/appearance/appearance-themes.c b/capplets/appearance/appearance-themes.c
index 0025e90e..07c41507 100644
--- a/capplets/appearance/appearance-themes.c
+++ b/capplets/appearance/appearance-themes.c
@@ -661,11 +661,7 @@ theme_message_area_update (AppearanceData *data)
data->theme_message_label = gtk_label_new (NULL);
gtk_widget_show (data->theme_message_label);
gtk_label_set_line_wrap (GTK_LABEL (data->theme_message_label), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (data->theme_message_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (data->theme_message_label), 0.0, 0.5);
-#endif
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 9);
gtk_widget_show (hbox);
diff --git a/capplets/common/capplet-util.c b/capplets/common/capplet-util.c
index 3f9e4b53..d2458d9b 100644
--- a/capplets/common/capplet-util.c
+++ b/capplets/common/capplet-util.c
@@ -71,26 +71,12 @@ capplet_help (GtkWindow *parent, char const *section)
{
GError *error = NULL;
char *uri;
-#if !GTK_CHECK_VERSION (3, 22, 0)
- GdkScreen *screen;
-#endif
g_return_if_fail (section != NULL);
-#if !GTK_CHECK_VERSION (3, 22, 0)
- if (!parent)
- screen = gdk_screen_get_default ();
- else
- screen = gtk_widget_get_screen (GTK_WIDGET (parent));
-#endif
-
uri = g_strdup_printf ("help:mate-user-guide/%s", section);
-#if GTK_CHECK_VERSION (3, 22, 0)
if (!gtk_show_uri_on_window (parent , uri, gtk_get_current_event_time (), &error)) {
-#else
- if (!gtk_show_uri (screen, uri, gtk_get_current_event_time (), &error)) {
-#endif
capplet_error_dialog (
parent,
_("There was an error displaying help: %s"),
diff --git a/capplets/common/file-transfer-dialog.c b/capplets/common/file-transfer-dialog.c
index 03747935..8d2c2ec4 100644
--- a/capplets/common/file-transfer-dialog.c
+++ b/capplets/common/file-transfer-dialog.c
@@ -313,12 +313,8 @@ file_transfer_dialog_init (FileTransferDialog *dlg)
gtk_label_set_markup (GTK_LABEL (dlg->priv->status), markup);
g_free (markup);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (dlg->priv->status), 0.0);
gtk_label_set_yalign (GTK_LABEL (dlg->priv->status), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (dlg->priv->status), 0.0, 0.0);
-#endif
gtk_box_pack_start (GTK_BOX (vbox), dlg->priv->status, FALSE, FALSE, 0);
diff --git a/capplets/display/scrollarea.c b/capplets/display/scrollarea.c
index 17936130..0bd8cca3 100644
--- a/capplets/display/scrollarea.c
+++ b/capplets/display/scrollarea.c
@@ -527,12 +527,8 @@ emit_viewport_changed (FooScrollArea *scroll_area,
GdkRectangle *new_viewport,
GdkRectangle *old_viewport)
{
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkDisplay *display;
GdkSeat *seat;
-#else
- GdkDeviceManager *manager;
-#endif
GdkDevice *pointer;
int px, py;
@@ -542,14 +538,9 @@ emit_viewport_changed (FooScrollArea *scroll_area,
if (scroll_area->priv->input_window == NULL)
return;
-#if GTK_CHECK_VERSION (3, 20, 0)
display = gdk_window_get_display (scroll_area->priv->input_window);
seat = gdk_display_get_default_seat (display);
pointer = gdk_seat_get_pointer (seat);
-#else
- manager = gdk_display_get_device_manager (gdk_window_get_display (scroll_area->priv->input_window));
- pointer = gdk_device_manager_get_client_pointer (manager);
-#endif
gdk_window_get_device_position (scroll_area->priv->input_window,
pointer,
&px,
@@ -568,10 +559,6 @@ clamp_adjustment (GtkAdjustment *adj)
- gtk_adjustment_get_page_size (adj)));
else
gtk_adjustment_set_value (adj, 0.0);
-
-#if !GTK_CHECK_VERSION (3,18,0)
- gtk_adjustment_changed (adj);
-#endif
}
static gboolean
diff --git a/capplets/keybindings/eggcellrendererkeys.c b/capplets/keybindings/eggcellrendererkeys.c
index af96f332..828c1fab 100644
--- a/capplets/keybindings/eggcellrendererkeys.c
+++ b/capplets/keybindings/eggcellrendererkeys.c
@@ -378,13 +378,7 @@ static gboolean grab_key_callback(GtkWidget* widget, GdkEventKey* event, void* d
guint upper;
GdkModifierType ignored_modifiers;
GdkDisplay *display;
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkSeat *seat;
-#else
- GdkDevice *pointer;
- GdkDevice *keyboard;
- GdkDeviceManager *device_manager;
-#endif
keys = EGG_CELL_RENDERER_KEYS(data);
@@ -471,18 +465,9 @@ static gboolean grab_key_callback(GtkWidget* widget, GdkEventKey* event, void* d
out:
display = gtk_widget_get_display (widget);
-#if GTK_CHECK_VERSION(3, 20, 0)
seat = gdk_display_get_default_seat (display);
gdk_seat_ungrab (seat);
-#else
- device_manager = gdk_display_get_device_manager (display);
- keyboard = gdk_device_get_associated_device (pointer);
- pointer = gdk_device_manager_get_client_pointer (device_manager);
-
- gdk_device_ungrab (keyboard, event->time);
- gdk_device_ungrab (pointer, event->time);
-#endif
path = g_strdup(g_object_get_data(G_OBJECT(keys->edit_widget), EGG_CELL_RENDERER_TEXT_PATH));
@@ -508,27 +493,12 @@ static void ungrab_stuff(GtkWidget* widget, gpointer data)
{
EggCellRendererKeys* keys = EGG_CELL_RENDERER_KEYS(data);
GdkDisplay *display;
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkSeat *seat;
-#else
- GdkDevice *keyboard;
- GdkDevice *pointer;
- GdkDeviceManager *device_manager;
-#endif
display = gtk_widget_get_display (widget);
-#if GTK_CHECK_VERSION(3, 20, 0)
seat = gdk_display_get_default_seat (display);
gdk_seat_ungrab (seat);
-#else
- device_manager = gdk_display_get_device_manager (display);
- keyboard = gdk_device_get_associated_device (pointer);
- pointer = gdk_device_manager_get_client_pointer (device_manager);
-
- gdk_device_ungrab (keyboard, GDK_CURRENT_TIME);
- gdk_device_ungrab (pointer, GDK_CURRENT_TIME);
-#endif
g_signal_handlers_disconnect_by_func(G_OBJECT(keys->grab_widget), G_CALLBACK(grab_key_callback), data);
}
@@ -589,13 +559,7 @@ egg_cell_renderer_keys_start_editing (GtkCellRenderer *cell,
GtkCellRendererText *celltext;
EggCellRendererKeys *keys;
GdkDisplay *display;
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkSeat *seat;
-#else
- GdkDeviceManager *device_manager;
- GdkDevice *keyboard;
- GdkDevice *pointer;
-#endif
GtkWidget *label;
GtkWidget *eventbox;
GValue celltext_editable = {0};
@@ -611,7 +575,6 @@ egg_cell_renderer_keys_start_editing (GtkCellRenderer *cell,
g_return_val_if_fail (gtk_widget_get_window (widget) != NULL, NULL);
display = gtk_widget_get_display (widget);
-#if GTK_CHECK_VERSION (3, 20, 0)
seat = gdk_display_get_default_seat (display);
if (gdk_seat_grab (seat,
@@ -623,32 +586,6 @@ egg_cell_renderer_keys_start_editing (GtkCellRenderer *cell,
NULL,
NULL) != GDK_GRAB_SUCCESS)
return NULL;
-#else
- device_manager = gdk_display_get_device_manager (display);
- pointer = gdk_device_manager_get_client_pointer (device_manager);
- keyboard = gdk_device_get_associated_device (pointer);
-
- if (gdk_device_grab (keyboard,
- gtk_widget_get_window (widget),
- GDK_OWNERSHIP_NONE,
- FALSE,
- GDK_KEY_PRESS_MASK,
- NULL,
- gdk_event_get_time (event)) != GDK_GRAB_SUCCESS)
- return NULL;
-
- if (gdk_device_grab (pointer,
- gtk_widget_get_window (widget),
- GDK_OWNERSHIP_NONE,
- FALSE,
- GDK_BUTTON_PRESS_MASK,
- NULL,
- gdk_event_get_time (event)) != GDK_GRAB_SUCCESS)
- {
- gdk_device_ungrab (keyboard, gdk_event_get_time (event));
- return NULL;
- }
-#endif
keys->grab_widget = widget;
@@ -663,11 +600,7 @@ egg_cell_renderer_keys_start_editing (GtkCellRenderer *cell,
(void**) &keys->edit_widget);
label = gtk_label_new (NULL);
-#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_widget_modify_bg (eventbox, GTK_STATE_NORMAL,
&gtk_widget_get_style (widget)->bg[GTK_STATE_SELECTED]);
diff --git a/capplets/windows/mate-metacity-support.c b/capplets/windows/mate-metacity-support.c
index 079b18d1..d5964444 100644
--- a/capplets/windows/mate-metacity-support.c
+++ b/capplets/windows/mate-metacity-support.c
@@ -52,11 +52,7 @@ mate_metacity_config_tool ()
widget = gtk_label_new (str);
g_free (str);
gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (widget), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
widget = gtk_check_button_new_with_label (_("Enable software _compositing window manager"));
diff --git a/capplets/windows/mate-window-properties.c b/capplets/windows/mate-window-properties.c
index ecc71247..bf5ab4cb 100644
--- a/capplets/windows/mate-window-properties.c
+++ b/capplets/windows/mate-window-properties.c
@@ -303,12 +303,8 @@ title_label_new (const char* title)
g_free (str);
gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (widget), 0.0);
gtk_label_set_yalign (GTK_LABEL (widget), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.0);
-#endif
return widget;
}
@@ -492,12 +488,8 @@ main (int argc, char **argv)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
widget = gtk_label_new_with_mnemonic (_("To move a window, press-and-hold this key then grab the window:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (widget), 0.0);
gtk_label_set_yalign (GTK_LABEL (widget), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.0);
-#endif
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 6);
alt_click_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
diff --git a/configure.ac b/configure.ac
index 0ce226c5..2d2126c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,8 +59,8 @@ AC_CHECK_FUNC(XScreenSaverQueryInfo, [
AC_SUBST(TYPING_BREAK)
AC_SUBST(SCREENSAVER_LIBS)
-GLIB_REQUIRED=2.36.0
-GTK_REQUIRED=3.14.0
+GLIB_REQUIRED=2.50.0
+GTK_REQUIRED=3.22.0
MARCO_REQUIRED=1.17.0
MSD_REQUIRED=1.17.0
MATEKBD_REQUIRED=1.17.0
diff --git a/font-viewer/font-view.c b/font-viewer/font-view.c
index abf9a194..6b3bd536 100644
--- a/font-viewer/font-view.c
+++ b/font-viewer/font-view.c
@@ -162,22 +162,14 @@ add_row (GtkWidget *grid,
name_w = gtk_label_new (name);
gtk_style_context_add_class (gtk_widget_get_style_context (name_w), "dim-label");
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (name_w), 1.0);
gtk_label_set_yalign (GTK_LABEL (name_w), 0.0);
- #else
- gtk_misc_set_alignment (GTK_MISC (name_w), 1.0, 0.0);
- #endif
gtk_container_add (GTK_CONTAINER (grid), name_w);
label = gtk_label_new (value);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.0);
- #else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
- #endif
gtk_label_set_selectable (GTK_LABEL(label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
diff --git a/libslab/app-shell.c b/libslab/app-shell.c
index 85934a7a..c1765975 100644
--- a/libslab/app-shell.c
+++ b/libslab/app-shell.c
@@ -416,11 +416,7 @@ create_actions_section (AppShellData * app_data, const gchar * title,
header = gtk_label_new (action->name);
gtk_label_set_line_wrap (GTK_LABEL (header), TRUE);
gtk_label_set_max_width_chars (GTK_LABEL (header), 0);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (header), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (header), 0.0, 0.5);
-#endif
launcher = nameplate_tile_new (NULL, NULL, header, NULL);
g_object_set_data (G_OBJECT (launcher), APP_ACTION_KEY, action->item);
@@ -707,11 +703,7 @@ create_application_category_sections (AppShellData * app_data)
GtkWidget *hbox;
GtkWidget *table;
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (header), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (header), 0.0, 0.5);
-#endif
data->group_launcher = TILE (nameplate_tile_new (NULL, NULL, header, NULL));
g_object_ref (data->group_launcher);
diff --git a/libslab/application-tile.c b/libslab/application-tile.c
index 523643df..2e41eaba 100644
--- a/libslab/application-tile.c
+++ b/libslab/application-tile.c
@@ -412,11 +412,7 @@ create_header (const gchar *name)
header = gtk_label_new (name);
gtk_label_set_line_wrap (GTK_LABEL (header), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (header), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (header), 0.0, 0.5);
-#endif
g_signal_connect (
G_OBJECT (header),
@@ -435,11 +431,8 @@ create_subheader (const gchar *desc)
subheader = gtk_label_new (desc);
gtk_label_set_ellipsize (GTK_LABEL (subheader), PANGO_ELLIPSIZE_END);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (subheader), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (subheader), 0.0, 0.5);
-#endif
+
gtk_widget_modify_fg (
subheader,
GTK_STATE_NORMAL,
diff --git a/libslab/nameplate-tile.c b/libslab/nameplate-tile.c
index fa84840b..8e282ab6 100644
--- a/libslab/nameplate-tile.c
+++ b/libslab/nameplate-tile.c
@@ -242,11 +242,7 @@ nameplate_tile_setup (NameplateTile *this)
if (GTK_IS_WIDGET (this->subheader))
gtk_container_add (priv->subheader_ctnr, this->subheader);
-#if GTK_CHECK_VERSION(3,20,0)
gtk_widget_set_focus_on_click (GTK_WIDGET (this), FALSE);
-#else
- gtk_button_set_focus_on_click (GTK_BUTTON (this), FALSE);
-#endif
}
static void
diff --git a/libslab/slab-mate-util.c b/libslab/slab-mate-util.c
index efb4a535..2eb55209 100644
--- a/libslab/slab-mate-util.c
+++ b/libslab/slab-mate-util.c
@@ -118,11 +118,7 @@ open_desktop_item_help (MateDesktopItem * desktop_item)
help_uri = g_strdup_printf ("help:%s", doc_path);
error = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
if (!gtk_show_uri_on_window (NULL, help_uri, gtk_get_current_event_time (), &error))
-#else
- if (!gtk_show_uri (libslab_get_current_screen (), help_uri, gtk_get_current_event_time (), &error))
-#endif
{
g_warning ("error opening %s [%s]\n", help_uri, error->message);
diff --git a/libslab/slab-section.c b/libslab/slab-section.c
index fec9634d..068048d6 100644
--- a/libslab/slab-section.c
+++ b/libslab/slab-section.c
@@ -148,11 +148,7 @@ slab_section_new_with_markup (const gchar * title_markup, SlabStyle style)
section->title = gtk_label_new (title_markup);
gtk_label_set_use_markup (GTK_LABEL (section->title), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (section->title), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (section->title), 0.0, 0.5);
-#endif
gtk_widget_set_name (GTK_WIDGET (section), widget_theming_name);
g_signal_connect (G_OBJECT (section), "style-set", G_CALLBACK (slab_section_style_set),
diff --git a/libslab/tile-action.c b/libslab/tile-action.c
index c87f2dad..4934cbd3 100644
--- a/libslab/tile-action.c
+++ b/libslab/tile-action.c
@@ -83,11 +83,7 @@ tile_action_set_menu_item_label (TileAction * this, const gchar * markup)
{
label = gtk_label_new (markup);
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);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
this->menu_item = GTK_MENU_ITEM (gtk_menu_item_new ());
gtk_container_add (GTK_CONTAINER (this->menu_item), label);
diff --git a/typing-break/drw-break-window.c b/typing-break/drw-break-window.c
index b7e57385..22ff0f45 100644
--- a/typing-break/drw-break-window.c
+++ b/typing-break/drw-break-window.c
@@ -127,9 +127,7 @@ drw_break_window_init (DrwBreakWindow *window)
gint root_monitor = 0;
GdkScreen *screen = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkDisplay *display;
-#endif
GdkRectangle monitor;
gint right_padding;
gint bottom_padding;
@@ -151,12 +149,8 @@ drw_break_window_init (DrwBreakWindow *window)
gtk_window_set_modal (GTK_WINDOW (window), TRUE);
screen = gdk_screen_get_default ();
-#if GTK_CHECK_VERSION (3, 22, 0)
display = gdk_screen_get_display (screen);
gdk_monitor_get_geometry (gdk_display_get_monitor (display, root_monitor), &monitor);
-#else
- gdk_screen_get_monitor_geometry (screen, root_monitor, &monitor);
-#endif
gtk_window_set_default_size (GTK_WINDOW (window),
WidthOfScreen (gdk_x11_screen_get_xscreen (screen)),
@@ -438,16 +432,9 @@ grab_on_window (GdkWindow *window,
guint32 activate_time)
{
GdkDisplay *display;
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkSeat *seat;
-#else
- GdkDeviceManager *device_manager;
- GdkDevice *pointer;
- GdkDevice *keyboard;
-#endif
display = gdk_window_get_display (window);
-#if GTK_CHECK_VERSION (3, 20, 0)
seat = gdk_display_get_default_seat (display);
return (gdk_seat_grab (seat,
@@ -458,36 +445,6 @@ grab_on_window (GdkWindow *window,
NULL,
NULL,
NULL) == GDK_GRAB_SUCCESS);
-#else
- device_manager = gdk_display_get_device_manager (display);
- pointer = gdk_device_manager_get_client_pointer (device_manager);
- keyboard = gdk_device_get_associated_device (pointer);
-
- if ((gdk_device_grab (pointer,
- window,
- GDK_OWNERSHIP_NONE,
- TRUE,
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_POINTER_MOTION_MASK,
- NULL,
- activate_time) == 0)) {
- if (gdk_device_grab (keyboard,
- window,
- GDK_OWNERSHIP_NONE,
- TRUE,
- GDK_KEY_PRESS_MASK,
- NULL,
- activate_time) == 0)
- return TRUE;
- else {
- gdk_device_ungrab (pointer, activate_time);
- return FALSE;
- }
- }
-
- return FALSE;
-#endif
}
static gboolean
@@ -576,16 +533,12 @@ get_layout_location (GtkLabel *label,
gint *xp,
gint *yp)
{
-#if !GTK_CHECK_VERSION (3, 16, 0)
- GtkMisc *misc;
-#endif
GtkWidget *widget;
GtkAllocation widget_allocation;
GtkRequisition widget_requisition;
gfloat xalign, yalign;
gint x, y;
gint xpad, ypad;
-#if GTK_CHECK_VERSION (3, 16, 0)
gint margin_start, margin_end, margin_top, margin_bottom;
widget = GTK_WIDGET (label);
@@ -599,13 +552,7 @@ get_layout_location (GtkLabel *label,
xpad = margin_start + margin_end;
ypad = margin_top + margin_bottom;
-#else
- misc = GTK_MISC (label);
- widget = GTK_WIDGET (label);
- gtk_misc_get_alignment (misc, &xalign, &yalign);
- gtk_misc_get_padding (misc, &xpad, &ypad);
-#endif
gtk_widget_get_allocation (widget, &widget_allocation);
gtk_widget_get_requisition (widget, &widget_requisition);
diff --git a/typing-break/drwright.c b/typing-break/drwright.c
index c0968af0..b1b26612 100644
--- a/typing-break/drwright.c
+++ b/typing-break/drwright.c
@@ -324,17 +324,10 @@ grab_keyboard_on_window (GdkWindow *window,
guint32 activate_time)
{
GdkDisplay *display;
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkSeat *seat;
-#else
- GdkDeviceManager *device_manager;
- GdkDevice *pointer;
- GdkDevice *keyboard;
-#endif
GdkGrabStatus status;
display = gdk_window_get_display (window);
-#if GTK_CHECK_VERSION (3, 20, 0)
seat = gdk_display_get_default_seat (display);
status = gdk_seat_grab (seat,
@@ -345,19 +338,6 @@ grab_keyboard_on_window (GdkWindow *window,
NULL,
NULL,
NULL);
-#else
- device_manager = gdk_display_get_device_manager (display);
- pointer = gdk_device_manager_get_client_pointer (device_manager);
- keyboard = gdk_device_get_associated_device (pointer);
-
- status = gdk_device_grab (keyboard,
- window,
- GDK_OWNERSHIP_NONE,
- TRUE,
- GDK_KEY_PRESS_MASK,
- NULL,
- activate_time);
-#endif
if (status == GDK_GRAB_SUCCESS) {
return TRUE;