summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-01-17 15:16:45 +0100
committerStefano Karapetsas <[email protected]>2014-01-17 15:16:45 +0100
commit5285395fd5db277c9f226efd4ae80ed9b5ae33e7 (patch)
tree85023d171e1a4a726f511dfdf2970aa5c3af3787 /applets
parenta71d41f59f6525f14dc82c20087c92ce8c4a7e50 (diff)
downloadmate-power-manager-5285395fd5db277c9f226efd4ae80ed9b5ae33e7.tar.bz2
mate-power-manager-5285395fd5db277c9f226efd4ae80ed9b5ae33e7.tar.xz
Use draw signal for GTK3
Diffstat (limited to 'applets')
-rw-r--r--applets/brightness/brightness-applet.c5
-rw-r--r--applets/inhibit/inhibit-applet.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/applets/brightness/brightness-applet.c b/applets/brightness/brightness-applet.c
index 997d57d..6041fb2 100644
--- a/applets/brightness/brightness-applet.c
+++ b/applets/brightness/brightness-applet.c
@@ -1030,8 +1030,13 @@ gpm_brightness_applet_init (GpmBrightnessApplet *applet)
/* We use g_signal_connect_after because letting the panel draw
* the background is the only way to have the correct
* background when a theme defines a background picture. */
+#if GTK_CHECK_VERSION (3, 0, 0)
+ g_signal_connect_after (G_OBJECT(applet), "draw",
+ G_CALLBACK(gpm_applet_draw_cb), NULL);
+#else
g_signal_connect_after (G_OBJECT(applet), "expose-event",
G_CALLBACK(gpm_applet_draw_cb), NULL);
+#endif
g_signal_connect (G_OBJECT(applet), "change-background",
G_CALLBACK(gpm_applet_change_background_cb), NULL);
diff --git a/applets/inhibit/inhibit-applet.c b/applets/inhibit/inhibit-applet.c
index b8c8823..2421cef 100644
--- a/applets/inhibit/inhibit-applet.c
+++ b/applets/inhibit/inhibit-applet.c
@@ -675,8 +675,13 @@ gpm_inhibit_applet_init (GpmInhibitApplet *applet)
g_signal_connect (G_OBJECT(applet), "button-press-event",
G_CALLBACK(gpm_applet_click_cb), NULL);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ g_signal_connect (G_OBJECT(applet), "draw",
+ G_CALLBACK(gpm_applet_draw_cb), NULL);
+#else
g_signal_connect (G_OBJECT(applet), "expose-event",
G_CALLBACK(gpm_applet_draw_cb), NULL);
+#endif
/* We use g_signal_connect_after because letting the panel draw
* the background is the only way to have the correct