summaryrefslogtreecommitdiff
path: root/mateweather/mateweather-applet.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-01-20 10:13:52 +0100
committerStefano Karapetsas <[email protected]>2014-01-20 10:13:52 +0100
commit418755ff4823a6b62fa64970b4fa715eb4e92eb2 (patch)
tree4b6b1ca13023c78039acc34082a13d61ee43aa0f /mateweather/mateweather-applet.c
parent7ca1965de675c694a0a811c6d075b67a114edd3a (diff)
downloadmate-applets-418755ff4823a6b62fa64970b4fa715eb4e92eb2.tar.bz2
mate-applets-418755ff4823a6b62fa64970b4fa715eb4e92eb2.tar.xz
mateweather: Add GTK3 support
Bump minimum GTK2 version to 2.24 to use GtkComboBoxText with both GTK versions
Diffstat (limited to 'mateweather/mateweather-applet.c')
-rw-r--r--mateweather/mateweather-applet.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mateweather/mateweather-applet.c b/mateweather/mateweather-applet.c
index d3d4f150..6383626b 100644
--- a/mateweather/mateweather-applet.c
+++ b/mateweather/mateweather-applet.c
@@ -26,6 +26,9 @@
#include <mate-panel-applet-gsettings.h>
#include <gdk/gdkkeysyms.h>
+#if GTK_CHECK_VERSION (3, 0, 0)
+#include <gdk/gdkkeysyms-compat.h>
+#endif
#ifdef HAVE_LIBNOTIFY
#include <libnotify/notify.h>
@@ -340,7 +343,11 @@ void mateweather_applet_create (MateWeatherApplet *gw_applet)
G_CALLBACK(size_allocate_cb), gw_applet);
g_signal_connect (G_OBJECT(gw_applet->applet), "destroy",
G_CALLBACK (applet_destroy), gw_applet);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ g_signal_connect (G_OBJECT(gw_applet->applet), "button_press_event",
+#else
g_signal_connect (GTK_OBJECT(gw_applet->applet), "button_press_event",
+#endif
G_CALLBACK(clicked_cb), gw_applet);
g_signal_connect (G_OBJECT(gw_applet->applet), "key_press_event",
G_CALLBACK(key_press_cb), gw_applet);