summaryrefslogtreecommitdiff
path: root/applets/wncklet
diff options
context:
space:
mode:
Diffstat (limited to 'applets/wncklet')
-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
4 files changed, 5 insertions, 60 deletions
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))