summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-08-31 15:49:52 +0300
committerMonsta <[email protected]>2015-08-31 15:49:52 +0300
commit6bfc67fc80ba929a740d20edd9ba34927dfefafe (patch)
tree5a00806f96b7f4cf31fa332058a66a0e0c8a04f8
parente6e51a29a89cc95019d5e97b36ba48803c5cd58b (diff)
downloadmate-applets-6bfc67fc80ba929a740d20edd9ba34927dfefafe.tar.bz2
mate-applets-6bfc67fc80ba929a740d20edd9ba34927dfefafe.tar.xz
accessx-status: have applet background automatically painted
-rw-r--r--accessx-status/applet.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/accessx-status/applet.c b/accessx-status/applet.c
index 3fb530c5..a00a1a71 100644
--- a/accessx-status/applet.c
+++ b/accessx-status/applet.c
@@ -1208,46 +1208,6 @@ static void accessx_status_applet_resize(GtkWidget* widget, int size, gpointer u
/* TODO: either rescale icons to fit panel, or tile them when possible */
}
-#if !GTK_CHECK_VERSION (3, 0, 0)
-static void accessx_status_applet_background(MatePanelApplet* a, MatePanelAppletBackgroundType type, GdkColor* color, GdkPixmap* pixmap, gpointer user_data)
-{
- AccessxStatusApplet* sapplet = user_data;
-
- GtkRcStyle* rc_style;
- GtkStyle* style;
-
- /* reset style */
- gtk_widget_set_style(GTK_WIDGET(sapplet->applet), NULL);
- rc_style = gtk_rc_style_new();
- gtk_widget_modify_style(GTK_WIDGET(sapplet->applet), rc_style);
- g_object_unref(rc_style);
-
- switch (type)
- {
- case PANEL_COLOR_BACKGROUND:
- gtk_widget_modify_bg(GTK_WIDGET(sapplet->applet), GTK_STATE_NORMAL, color);
- break;
-
- case PANEL_PIXMAP_BACKGROUND:
- style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(sapplet->applet)));
-
- if (style->bg_pixmap[GTK_STATE_NORMAL])
- {
- g_object_unref(style->bg_pixmap[GTK_STATE_NORMAL]);
- }
-
- style->bg_pixmap[GTK_STATE_NORMAL] = g_object_ref(pixmap);
- gtk_widget_set_style(GTK_WIDGET(sapplet->applet), style);
- g_object_unref(style);
- break;
-
- case PANEL_NO_BACKGROUND:
- default:
- break;
- }
-}
-#endif
-
static gboolean button_press_cb(GtkWidget* widget, GdkEventButton* event, AccessxStatusApplet* sapplet)
{
if (event->button == 1 && event->type == GDK_BUTTON_PRESS)
@@ -1347,9 +1307,6 @@ static gboolean accessx_status_applet_fill(MatePanelApplet* applet)
"signal::destroy", accessx_status_applet_destroy, sapplet,
"signal::change_orient", accessx_status_applet_reorient, sapplet,
"signal::change_size", accessx_status_applet_resize, sapplet,
-#if !GTK_CHECK_VERSION (3, 0, 0)
- "signal::change_background", accessx_status_applet_background, sapplet,
-#endif
NULL);
g_signal_connect(sapplet->applet, "button_press_event", G_CALLBACK(button_press_cb), sapplet);