summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authormonsta <[email protected]>2018-01-31 09:46:08 +0300
committermonsta <[email protected]>2018-01-31 09:46:08 +0300
commitab7987701bcea97e4326fecd161c3137080f6077 (patch)
tree3e49c11405cc69fab4b8a10ba4342cf70078d22a /applets
parentf553591e0562fd7b4bba0fe6a6182bc0b3747a34 (diff)
downloadmate-panel-ab7987701bcea97e4326fecd161c3137080f6077.tar.bz2
mate-panel-ab7987701bcea97e4326fecd161c3137080f6077.tar.xz
require GTK+ 3.22 and GLib 2.50
Diffstat (limited to 'applets')
-rw-r--r--applets/clock/clock-location-tile.c8
-rw-r--r--applets/clock/clock-utils.c6
-rw-r--r--applets/clock/clock.c65
-rw-r--r--applets/fish/fish.c11
-rw-r--r--applets/notification_area/main.c30
-rw-r--r--applets/notification_area/status-notifier/sn-dbus-menu.c4
-rw-r--r--applets/notification_area/status-notifier/sn-item-v0.c2
-rw-r--r--applets/notification_area/status-notifier/sn-item.c77
-rw-r--r--applets/notification_area/system-tray/fixedtip.c4
-rw-r--r--applets/notification_area/testtray.c9
-rw-r--r--applets/wncklet/showdesktop.c28
-rw-r--r--applets/wncklet/window-list.c7
-rw-r--r--applets/wncklet/window-menu.c25
-rw-r--r--applets/wncklet/wncklet.c5
14 files changed, 10 insertions, 271 deletions
diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c
index fc331e1d..a4546f71 100644
--- a/applets/clock/clock-location-tile.c
+++ b/applets/clock/clock-location-tile.c
@@ -277,12 +277,8 @@ clock_location_tile_fill (ClockLocationTile *this)
priv->city_label = gtk_label_new (NULL);
gtk_widget_set_margin_end (priv->city_label, 3);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->city_label), 0.0);
gtk_label_set_yalign (GTK_LABEL (priv->city_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->city_label), 0, 0);
-#endif
head_section = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (head_section), priv->city_label, FALSE, FALSE, 0);
@@ -290,12 +286,8 @@ clock_location_tile_fill (ClockLocationTile *this)
priv->time_label = gtk_label_new (NULL);
gtk_label_set_width_chars (GTK_LABEL (priv->time_label), 20);
gtk_widget_set_margin_end (priv->time_label, 3);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->time_label), 0.0);
gtk_label_set_yalign (GTK_LABEL (priv->time_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->time_label), 0, 0);
-#endif
priv->weather_icon = gtk_image_new ();
gtk_widget_set_valign (priv->weather_icon, GTK_ALIGN_START);
diff --git a/applets/clock/clock-utils.c b/applets/clock/clock-utils.c
index 83b08fc6..5b15fe5f 100644
--- a/applets/clock/clock-utils.c
+++ b/applets/clock/clock-utils.c
@@ -72,13 +72,9 @@ clock_utils_display_help (GtkWidget *widget,
uri = g_strdup_printf ("help:%s/%s", doc_id, link_id);
else
uri = g_strdup_printf ("help:%s", doc_id);
-#if GTK_CHECK_VERSION (3, 22, 0)
+
gtk_show_uri_on_window (NULL, uri,
gtk_get_current_event_time (), &error);
-#else
- gtk_show_uri (gtk_widget_get_screen (widget), uri,
- gtk_get_current_event_time (), &error);
-#endif
g_free (uri);
if (error &&
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 110e39ee..a17d642e 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -258,10 +258,6 @@ calculate_minimum_width (GtkWidget *widget,
PangoContext *pango_context;
PangoLayout *layout;
int width, height;
-#if !GTK_CHECK_VERSION (3, 20, 0)
- int focus_width = 0;
- int focus_pad = 0;
-#endif
GtkStyleContext *style_context;
GtkStateFlags state;
GtkBorder padding;
@@ -278,16 +274,8 @@ calculate_minimum_width (GtkWidget *widget,
state = gtk_widget_get_state_flags (widget);
style_context = gtk_widget_get_style_context (widget);
gtk_style_context_get_padding (style_context, state, &padding);
-#if GTK_CHECK_VERSION (3, 20, 0)
width += padding.left + padding.right;
-#else
- gtk_style_context_get_style (style_context,
- "focus-line-width", &focus_width,
- "focus-padding", &focus_pad,
- NULL);
- width += 2 * (focus_width + focus_pad) + padding.left + padding.right;
-#endif
return width;
}
@@ -384,10 +372,6 @@ calculate_minimum_height (GtkWidget *widget,
GtkBorder padding;
PangoContext *pango_context;
PangoFontMetrics *metrics;
-#if !GTK_CHECK_VERSION (3, 20, 0)
- int focus_width = 0;
- int focus_pad = 0;
-#endif
int ascent;
int descent;
int thickness;
@@ -407,12 +391,6 @@ calculate_minimum_height (GtkWidget *widget,
pango_font_metrics_unref (metrics);
gtk_style_context_get_padding (style_context, state, &padding);
-#if !GTK_CHECK_VERSION (3, 20, 0)
- gtk_style_context_get_style (style_context,
- "focus-line-width", &focus_width,
- "focus-padding", &focus_pad,
- NULL);
-#endif
if (orientation == MATE_PANEL_APPLET_ORIENT_UP
|| orientation == MATE_PANEL_APPLET_ORIENT_DOWN) {
@@ -421,11 +399,7 @@ calculate_minimum_height (GtkWidget *widget,
thickness = padding.left + padding.right;
}
-#if GTK_CHECK_VERSION (3, 20, 0)
return PANGO_PIXELS (ascent + descent) + thickness;
-#else
- return PANGO_PIXELS (ascent + descent) + 2 * (focus_width + focus_pad) + thickness;
-#endif
}
static gboolean
@@ -874,9 +848,7 @@ position_calendar_popup (ClockData *cd)
{
GtkRequisition req;
GtkAllocation allocation;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkDisplay *display;
-#endif
GdkScreen *screen;
GdkRectangle monitor;
GdkGravity gravity = GDK_GRAVITY_NORTH_WEST;
@@ -900,19 +872,11 @@ position_calendar_popup (ClockData *cd)
button_h = allocation.height;
screen = gtk_window_get_screen (GTK_WINDOW (cd->calendar_popup));
-#if GTK_CHECK_VERSION (3, 22, 0)
display = gdk_screen_get_display (screen);
n = gdk_display_get_n_monitors (display);
-#else
- n = gdk_screen_get_n_monitors (screen);
-#endif
for (i = 0; i < n; i++) {
-#if GTK_CHECK_VERSION (3, 22, 0)
gdk_monitor_get_geometry (gdk_display_get_monitor (display, i), &monitor);
-#else
- gdk_screen_get_monitor_geometry (screen, i, &monitor);
-#endif
if (x >= monitor.x && x <= monitor.x + monitor.width &&
y >= monitor.y && y <= monitor.y + monitor.height) {
found_monitor = TRUE;
@@ -1308,7 +1272,6 @@ clock_update_text_gravity (GtkWidget *label)
pango_context_set_base_gravity (context, PANGO_GRAVITY_AUTO);
}
-#if GTK_CHECK_VERSION (3, 20, 0)
static inline void
force_no_button_padding (GtkWidget *widget)
{
@@ -1328,30 +1291,6 @@ force_no_button_padding (GtkWidget *widget)
gtk_widget_set_name (widget, "clock-applet-button");
}
-#else
-static inline void
-force_no_focus_padding (GtkWidget *widget)
-{
- static gboolean first_time = TRUE;
- GtkCssProvider *provider;
-
- if (first_time) {
- provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_data (provider,
- "#clock-applet-button {\n"
- " -GtkWidget-focus-line-width: 0px;\n"
- " -GtkWidget-focus-padding: 0px; }",
- -1, NULL);
- gtk_style_context_add_provider (gtk_widget_get_style_context (widget),
- GTK_STYLE_PROVIDER (provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- g_object_unref (provider);
- first_time = FALSE;
- }
-
- gtk_widget_set_name (widget, "clock-applet-button");
-}
-#endif
static GtkWidget *
create_main_clock_button (void)
@@ -1361,11 +1300,7 @@ create_main_clock_button (void)
button = gtk_toggle_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
-#if GTK_CHECK_VERSION (3, 20, 0)
force_no_button_padding (button);
-#else
- force_no_focus_padding (button);
-#endif
return button;
}
diff --git a/applets/fish/fish.c b/applets/fish/fish.c
index f9e8d6ac..1a1e5807 100644
--- a/applets/fish/fish.c
+++ b/applets/fish/fish.c
@@ -152,13 +152,9 @@ static void show_help(FishApplet* fish, const char* link_id)
uri = g_strdup_printf ("help:%s/%s", FISH_HELP_DOC, link_id);
else
uri = g_strdup_printf ("help:%s", FISH_HELP_DOC);
-#if GTK_CHECK_VERSION (3, 22, 0)
+
gtk_show_uri_on_window (NULL, uri,
gtk_get_current_event_time (), &error);
-#else
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (fish)), uri,
- gtk_get_current_event_time (), &error);
-#endif
g_free (uri);
if (error &&
@@ -889,13 +885,8 @@ static void display_fortune_dialog(FishApplet* fish)
gtk_label_set_ellipsize (GTK_LABEL (fish->fortune_label),
PANGO_ELLIPSIZE_MIDDLE);
fish->fortune_cmd_label = gtk_label_new ("");
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (fish->fortune_cmd_label), 0.0);
gtk_label_set_yalign (GTK_LABEL (fish->fortune_cmd_label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (fish->fortune_cmd_label),
- 0, 0.5);
-#endif
vbox = gtk_dialog_get_content_area (GTK_DIALOG (fish->fortune_dialog));
gtk_box_pack_start (GTK_BOX (vbox),
diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c
index 259573c4..069a74b3 100644
--- a/applets/notification_area/main.c
+++ b/applets/notification_area/main.c
@@ -111,11 +111,7 @@ static void help_cb(GtkAction* action, NaTrayApplet* applet)
#define NA_HELP_DOC "mate-user-guide"
uri = g_strdup_printf("help:%s/%s", NA_HELP_DOC, "panels-notification-area");
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (NULL, uri, gtk_get_current_event_time (), &error);
-#else
- gtk_show_uri(gtk_widget_get_screen(GTK_WIDGET(applet)), uri, gtk_get_current_event_time(), &error);
-#endif
g_free(uri);
if (error && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
@@ -300,26 +296,6 @@ na_tray_applet_focus (GtkWidget *widget,
return GTK_WIDGET_CLASS (na_tray_applet_parent_class)->focus (widget, direction);
}
-#if !GTK_CHECK_VERSION (3, 20, 0)
-static inline void
-force_no_focus_padding (GtkWidget *widget)
-{
- GtkCssProvider *provider;
-
- provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_data (provider,
- "NaTrayApplet {\n"
- " -GtkWidget-focus-line-width: 0px;\n"
- " -GtkWidget-focus-padding: 0px;\n"
- "}",
- -1, NULL);
- gtk_style_context_add_provider (gtk_widget_get_style_context (widget),
- GTK_STYLE_PROVIDER (provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- g_object_unref (provider);
-}
-#endif
-
static void
na_tray_applet_class_init (NaTrayAppletClass *class)
{
@@ -361,9 +337,7 @@ na_tray_applet_class_init (NaTrayAppletClass *class)
g_type_class_add_private (class, sizeof (NaTrayAppletPrivate));
-#if GTK_CHECK_VERSION (3, 20, 0)
gtk_widget_class_set_css_name (widget_class, "na-tray-applet");
-#endif
}
static void
@@ -390,10 +364,6 @@ na_tray_applet_init (NaTrayApplet *applet)
mate_panel_applet_set_flags (MATE_PANEL_APPLET (applet),
MATE_PANEL_APPLET_HAS_HANDLE|MATE_PANEL_APPLET_EXPAND_MINOR);
-
-#if !GTK_CHECK_VERSION (3, 20, 0)
- force_no_focus_padding (GTK_WIDGET (applet));
-#endif
}
static gboolean
diff --git a/applets/notification_area/status-notifier/sn-dbus-menu.c b/applets/notification_area/status-notifier/sn-dbus-menu.c
index 28633990..5b73db00 100644
--- a/applets/notification_area/status-notifier/sn-dbus-menu.c
+++ b/applets/notification_area/status-notifier/sn-dbus-menu.c
@@ -187,11 +187,11 @@ get_layout_cb (GObject *source_object,
g_hash_table_remove_all (menu->items);
layout_parse (menu, layout, GTK_MENU (menu));
-#if GTK_CHECK_VERSION (3, 22, 0)
+
/* Reposition menu to accomodate any size changes */
/* Menu size never changes with GTK 3.20 or earlier */
gtk_menu_reposition(GTK_MENU(menu));
-#endif
+
g_variant_unref (layout);
}
diff --git a/applets/notification_area/status-notifier/sn-item-v0.c b/applets/notification_area/status-notifier/sn-item-v0.c
index dec9bdf1..46a4c064 100644
--- a/applets/notification_area/status-notifier/sn-item-v0.c
+++ b/applets/notification_area/status-notifier/sn-item-v0.c
@@ -1372,9 +1372,7 @@ sn_item_v0_class_init (SnItemV0Class *v0_class)
widget_class->size_allocate = sn_item_v0_size_allocate;
-#if GTK_CHECK_VERSION (3, 20, 0)
gtk_widget_class_set_css_name (widget_class, "sn-item");
-#endif
install_properties (object_class);
}
diff --git a/applets/notification_area/status-notifier/sn-item.c b/applets/notification_area/status-notifier/sn-item.c
index d2d86ec0..a7fa6fea 100644
--- a/applets/notification_area/status-notifier/sn-item.c
+++ b/applets/notification_area/status-notifier/sn-item.c
@@ -182,49 +182,6 @@ sn_item_get_action_coordinates (SnItem *item,
*x += width;
}
-#if ! GTK_CHECK_VERSION (3, 22, 0)
-static void
-sn_item_popup_menu_position_func (GtkMenu *menu,
- gint *x,
- gint *y,
- gboolean *push_in,
- gpointer widget)
-{
- GtkAllocation widget_alloc;
- GtkRequisition menu_req;
- GdkWindow *window;
- GdkScreen *screen;
- gint monitor_num;
- GdkRectangle monitor;
-
- gtk_widget_get_allocation (widget, &widget_alloc);
- gtk_widget_get_preferred_size (GTK_WIDGET (menu), &menu_req, NULL);
-
- window = gtk_widget_get_window (widget);
- gdk_window_get_origin (window, x, y);
-
- *x += widget_alloc.x;
- *y += widget_alloc.y;
-
- screen = gtk_widget_get_screen (widget);
- monitor_num = gdk_screen_get_monitor_at_point (screen, *x, *y);
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
-
- /* put the menu on the left if we can't put it on the right */
- if (*x + menu_req.width > monitor.x + monitor.width)
- *x -= menu_req.width - widget_alloc.width;
- /* and push it back in if all else failed */
- if (*x < monitor.x)
- *x = monitor.x;
-
- /* put the menu above if we can't put it below */
- if (*y + widget_alloc.height + menu_req.height > monitor.y + monitor.height)
- *y -= menu_req.height;
- else
- *y += widget_alloc.height;
-}
-#endif
-
static gboolean
sn_item_button_press_event (GtkWidget *widget,
GdkEventButton *event)
@@ -244,39 +201,23 @@ sn_item_button_press_event (GtkWidget *widget,
if (event->button == 2)
{
-#if GTK_CHECK_VERSION (3, 20, 0)
gdk_seat_ungrab (gdk_device_get_seat (event->device));
-#else
- gdk_device_ungrab (event->device, GDK_CURRENT_TIME);
-#endif
SN_ITEM_GET_CLASS (item)->secondary_activate (item, x, y);
}
else if (event->button == 3)
{
if (priv->menu != NULL)
{
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_menu_popup_at_widget (priv->menu, widget,
GDK_GRAVITY_SOUTH_WEST,
GDK_GRAVITY_NORTH_WEST,
(GdkEvent *) event);
/*Fix positioning if size changed since last shown*/
gtk_menu_reposition(priv->menu);
-#else
- gtk_menu_popup (priv->menu, NULL, NULL,
- sn_item_popup_menu_position_func, widget,
- event->button, event->time);
- /*Fix positioning if size changed since last shown*/
- gtk_menu_reposition(priv->menu);
-#endif
}
else
{
-#if GTK_CHECK_VERSION (3, 20, 0)
gdk_seat_ungrab (gdk_device_get_seat (event->device));
-#else
- gdk_device_ungrab (event->device, GDK_CURRENT_TIME);
-#endif
SN_ITEM_GET_CLASS (item)->context_menu (item, x, y);
}
}
@@ -299,30 +240,12 @@ sn_item_popup_menu (GtkWidget *widget)
if (priv->menu != NULL)
{
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_menu_popup_at_widget (priv->menu, widget,
GDK_GRAVITY_SOUTH_WEST,
GDK_GRAVITY_NORTH_WEST,
NULL);
/*Fix positioning if size changed since last shown*/
gtk_menu_reposition(priv->menu);
-#else
- guint button = 0;
- guint32 active_time = GDK_CURRENT_TIME;
- GdkEvent *event = gtk_get_current_event ();
-
- if (event)
- {
- gdk_event_get_button (event, &button);
- active_time = gdk_event_get_time (event);
- }
-
- gtk_menu_popup (priv->menu, NULL, NULL,
- sn_item_popup_menu_position_func, widget,
- button, active_time);
- /*Fix positioning if size changed since last shown*/
- gtk_menu_reposition(priv->menu);
-#endif
}
else
{
diff --git a/applets/notification_area/system-tray/fixedtip.c b/applets/notification_area/system-tray/fixedtip.c
index d233424e..2278e9ca 100644
--- a/applets/notification_area/system-tray/fixedtip.c
+++ b/applets/notification_area/system-tray/fixedtip.c
@@ -117,12 +117,8 @@ na_fixed_tip_init (NaFixedTip *fixedtip)
label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.5);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
-#endif
gtk_widget_show (label);
gtk_container_add (GTK_CONTAINER (fixedtip), label);
fixedtip->priv->label = label;
diff --git a/applets/notification_area/testtray.c b/applets/notification_area/testtray.c
index cc36c02f..80f8fba0 100644
--- a/applets/notification_area/testtray.c
+++ b/applets/notification_area/testtray.c
@@ -164,13 +164,10 @@ create_tray_on_screen (GdkScreen *screen,
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic ("_Orientation:");
-#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);
+
combo = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Horizontal");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Vertical");
@@ -180,12 +177,8 @@ create_tray_on_screen (GdkScreen *screen,
label = gtk_label_new (NULL);
data->count_label = GTK_LABEL (label);
-#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 (vbox), label, FALSE, FALSE, 0);
data->traybox = na_box_new (GTK_ORIENTATION_HORIZONTAL);
diff --git a/applets/wncklet/showdesktop.c b/applets/wncklet/showdesktop.c
index 57818774..c1ab01ca 100644
--- a/applets/wncklet/showdesktop.c
+++ b/applets/wncklet/showdesktop.c
@@ -138,10 +138,6 @@ static void update_icon(ShowDesktopData* sdd)
GdkPixbuf* scaled;
int icon_size;
GError* error;
-#if !GTK_CHECK_VERSION (3, 20, 0)
- int focus_width = 0;
- int focus_pad = 0;
-#endif
int thickness = 0;
if (!sdd->icon_theme)
@@ -150,12 +146,6 @@ static void update_icon(ShowDesktopData* sdd)
state = gtk_widget_get_state_flags (sdd->button);
context = gtk_widget_get_style_context (sdd->button);
gtk_style_context_get_padding (context, state, &padding);
-#if !GTK_CHECK_VERSION (3, 20, 0)
- gtk_style_context_get_style (context,
- "focus-line-width", &focus_width,
- "focus-padding", &focus_pad,
- NULL);
-#endif
switch (sdd->orient) {
case GTK_ORIENTATION_HORIZONTAL:
@@ -165,11 +155,8 @@ static void update_icon(ShowDesktopData* sdd)
thickness = padding.left + padding.right;
break;
}
-#if GTK_CHECK_VERSION (3, 20, 0)
+
icon_size = sdd->size - thickness;
-#else
- icon_size = sdd->size - 2 * (focus_width + focus_pad) - thickness;
-#endif
if (icon_size < 22)
icon_size = 16;
@@ -418,7 +405,6 @@ gboolean show_desktop_applet_fill(MatePanelApplet* applet)
gtk_widget_set_name (sdd->button, "showdesktop-button");
provider = gtk_css_provider_new ();
-#if GTK_CHECK_VERSION (3, 20, 0)
gtk_css_provider_load_from_data (provider,
"#showdesktop-button {\n"
"border-width: 0px; \n" /*a border here causes GTK warnings */
@@ -430,18 +416,6 @@ gboolean show_desktop_applet_fill(MatePanelApplet* applet)
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref (provider);
-#else
- gtk_css_provider_load_from_data (provider,
- "#showdesktop-button {\n"
- " -GtkWidget-focus-line-width: 0px;\n"
- " -GtkWidget-focus-padding: 0px; }",
- -1, NULL);
-
- gtk_style_context_add_provider (gtk_widget_get_style_context (sdd->button),
- GTK_STYLE_PROVIDER (provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- g_object_unref (provider);
-#endif
atk_obj = gtk_widget_get_accessible(sdd->button);
atk_object_set_name (atk_obj, _("Show Desktop Button"));
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index 9cbe97f5..c7810588 100644
--- a/applets/wncklet/window-list.c
+++ b/applets/wncklet/window-list.c
@@ -373,14 +373,13 @@ gboolean window_list_applet_fill(MatePanelApplet* applet)
TasklistData* tasklist;
GtkActionGroup* action_group;
gchar* ui_path;
-#if GTK_CHECK_VERSION (3, 20, 0)
GtkCssProvider *provider;
GdkScreen *screen;
-#endif
+
tasklist = g_new0(TasklistData, 1);
tasklist->applet = GTK_WIDGET(applet);
-#if GTK_CHECK_VERSION (3, 20, 0)
+
provider = gtk_css_provider_new ();
screen = gdk_screen_get_default ();
gtk_css_provider_load_from_data (provider,
@@ -393,7 +392,7 @@ gboolean window_list_applet_fill(MatePanelApplet* applet)
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref (provider);
-#endif
+
mate_panel_applet_set_flags(MATE_PANEL_APPLET(tasklist->applet), MATE_PANEL_APPLET_EXPAND_MAJOR | MATE_PANEL_APPLET_EXPAND_MINOR | MATE_PANEL_APPLET_HAS_HANDLE);
setup_gsettings(tasklist);
diff --git a/applets/wncklet/window-menu.c b/applets/wncklet/window-menu.c
index 0db9fee2..5deb32e9 100644
--- a/applets/wncklet/window-menu.c
+++ b/applets/wncklet/window-menu.c
@@ -145,27 +145,6 @@ static gboolean window_menu_on_draw (GtkWidget* widget,
return FALSE;
}
-#if !GTK_CHECK_VERSION (3, 20, 0)
-static inline void force_no_focus_padding(GtkWidget* widget)
-{
- GtkCssProvider *provider;
-
- provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_data (provider,
- "#PanelApplet-window-menu-applet-button {\n"
- " border-width: 0px;\n"
- " -GtkWidget-focus-line-width: 0px;\n"
- " -GtkWidget-focus-padding: 0px; }",
- -1, NULL);
- gtk_style_context_add_provider (gtk_widget_get_style_context (widget),
- GTK_STYLE_PROVIDER (provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- g_object_unref (provider);
-
- gtk_widget_set_name(widget, "PanelApplet-window-menu-applet-button");
-}
-#endif
-
static void window_menu_size_allocate(MatePanelApplet* applet, GtkAllocation* allocation, WindowMenu* window_menu)
{
MatePanelAppletOrient orient;
@@ -247,11 +226,7 @@ gboolean window_menu_applet_fill(MatePanelApplet* applet)
window_menu = g_new0(WindowMenu, 1);
window_menu->applet = GTK_WIDGET(applet);
-#if GTK_CHECK_VERSION (3, 20, 0)
gtk_widget_set_name (window_menu->applet, "window-menu-applet-button");
-#else
- force_no_focus_padding(window_menu->applet);
-#endif
gtk_widget_set_tooltip_text(window_menu->applet, _("Window Selector"));
mate_panel_applet_set_flags(applet, MATE_PANEL_APPLET_EXPAND_MINOR);
diff --git a/applets/wncklet/wncklet.c b/applets/wncklet/wncklet.c
index 9d863081..dafdcb8f 100644
--- a/applets/wncklet/wncklet.c
+++ b/applets/wncklet/wncklet.c
@@ -49,11 +49,8 @@ void wncklet_display_help(GtkWidget* widget, const char* doc_id, const char* lin
uri = g_strdup_printf("help:%s/%s", doc_id, link_id);
else
uri = g_strdup_printf("help:%s", doc_id);
-#if GTK_CHECK_VERSION (3, 22, 0)
+
gtk_show_uri_on_window (NULL, uri, gtk_get_current_event_time (), &error);
-#else
- gtk_show_uri(gtk_widget_get_screen(widget), uri, gtk_get_current_event_time(), &error);
-#endif
g_free(uri);
if (error && g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))