summaryrefslogtreecommitdiff
path: root/charpick/charpick.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-01-19 20:01:03 +0100
committerStefano Karapetsas <[email protected]>2014-01-19 20:01:03 +0100
commitc2ef8063f9353b4e9fa315a35ce47f7bc7fefe53 (patch)
treea9ecab6e68ce3e4f0135d8c2f959b781dbbaf265 /charpick/charpick.c
parent83e7a0b1bd79765e8126ab81c19ccc62a07588b6 (diff)
downloadmate-applets-c2ef8063f9353b4e9fa315a35ce47f7bc7fefe53.tar.bz2
mate-applets-c2ef8063f9353b4e9fa315a35ce47f7bc7fefe53.tar.xz
charpick: Add GTK3 support
Diffstat (limited to 'charpick/charpick.c')
-rw-r--r--charpick/charpick.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/charpick/charpick.c b/charpick/charpick.c
index 6f5e766e..88f1bc83 100644
--- a/charpick/charpick.c
+++ b/charpick/charpick.c
@@ -11,6 +11,10 @@
#endif
#include "charpick.h"
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define GTK_OBJECT(x) G_OBJECT(x)
+#endif
+
/* The comment for each char list has the html entity names of the chars */
/* All gunicar codes should end in 0 */
@@ -325,8 +329,12 @@ get_menu_pos (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data)
gtk_widget_size_request (GTK_WIDGET (menu), &reqmenu);
gdk_window_get_origin (GDK_WINDOW (gtk_widget_get_window(curr_data->applet)), &tempx, &tempy);
- gdk_window_get_geometry (GDK_WINDOW (gtk_widget_get_window(curr_data->applet)), NULL, NULL,
- &width, &height, NULL);
+ gdk_window_get_geometry (GDK_WINDOW (gtk_widget_get_window(curr_data->applet)), NULL, NULL,
+ &width, &height
+#if !GTK_CHECK_VERSION (3, 0, 0)
+ , NULL
+#endif
+ );
switch (mate_panel_applet_get_orient (MATE_PANEL_APPLET (curr_data->applet))) {
case MATE_PANEL_APPLET_ORIENT_DOWN: