From e9d9a37e1ef80709d1ccac1807d46acfbc4f26ac Mon Sep 17 00:00:00 2001 From: Elias Aebi Date: Sun, 8 Dec 2013 16:47:50 +0100 Subject: make it build with GSEAL_ENABLE --- src/applet-main.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/applet-main.c b/src/applet-main.c index 06a17c1..4126607 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -554,12 +554,6 @@ hotkey_filter (char * keystring G_GNUC_UNUSED, gpointer data) return; } - if (!GTK_MENU_SHELL(data)->active) { - gtk_grab_add (GTK_WIDGET(data)); - GTK_MENU_SHELL(data)->have_grab = TRUE; - GTK_MENU_SHELL(data)->active = TRUE; - } - gtk_menu_shell_select_item(GTK_MENU_SHELL(data), GTK_WIDGET(g_list_last(children)->data)); g_list_free(children); return; @@ -582,8 +576,8 @@ menubar_on_expose (GtkWidget * widget, GdkEventExpose *event G_GNUC_UNUSED, GtkWidget * menubar) { - if (GTK_WIDGET_HAS_FOCUS(menubar)) - gtk_paint_focus(widget->style, widget->window, GTK_WIDGET_STATE(menubar), + if (gtk_widget_has_focus(menubar)) + gtk_paint_focus(gtk_widget_get_style(widget), gtk_widget_get_window(widget), gtk_widget_get_state(menubar), NULL, widget, "menubar-applet", 0, 0, -1, -1); return FALSE; @@ -859,7 +853,7 @@ applet_fill_cb (MatePanelApplet * applet, const gchar * iid G_GNUC_UNUSED, GTK_PACK_DIRECTION_LTR : GTK_PACK_DIRECTION_TTB; gtk_menu_bar_set_pack_direction(GTK_MENU_BAR(menubar), packdirection); - GTK_WIDGET_SET_FLAGS (menubar, GTK_WIDGET_FLAGS(menubar) | GTK_CAN_FOCUS); + gtk_widget_set_can_focus (menubar, TRUE); gtk_widget_set_name(GTK_WIDGET (menubar), "fast-user-switch-menubar"); g_signal_connect(menubar, "button-press-event", G_CALLBACK(menubar_press), NULL); g_signal_connect_after(menubar, "expose-event", G_CALLBACK(menubar_on_expose), menubar); @@ -949,7 +943,7 @@ cw_panel_background_changed (MatePanelApplet *applet, break; case PANEL_PIXMAP_BACKGROUND: - style = gtk_style_copy(GTK_WIDGET (applet)->style); + style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(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); -- cgit v1.2.1 From 9ea434156930d3a1e9c74f239f34a76a19d2bde8 Mon Sep 17 00:00:00 2001 From: Elias Aebi Date: Sat, 14 Dec 2013 15:37:52 +0100 Subject: replace deprecated header includes and deprecated symbols --- src/eggaccelerators.c | 4 ++++ src/eggaccelerators.h | 3 +-- src/tomboykeybinder.c | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/eggaccelerators.c b/src/eggaccelerators.c index 5410259..804615e 100644 --- a/src/eggaccelerators.c +++ b/src/eggaccelerators.c @@ -21,7 +21,11 @@ #include #include +#if GTK_CHECK_VERSION(3,0,0) +#include +#else #include +#endif enum { diff --git a/src/eggaccelerators.h b/src/eggaccelerators.h index 18e3ae0..1da4a07 100644 --- a/src/eggaccelerators.h +++ b/src/eggaccelerators.h @@ -20,8 +20,7 @@ #ifndef __EGG_ACCELERATORS_H__ #define __EGG_ACCELERATORS_H__ -#include -#include +#include G_BEGIN_DECLS diff --git a/src/tomboykeybinder.c b/src/tomboykeybinder.c index 7aa7168..29a8e27 100644 --- a/src/tomboykeybinder.c +++ b/src/tomboykeybinder.c @@ -86,7 +86,7 @@ grab_ungrab_with_ignorable_modifiers (GdkWindow *rootwin, XGrabKey (GDK_WINDOW_XDISPLAY (rootwin), binding->keycode, binding->modifiers | mod_masks [i], - GDK_WINDOW_XWINDOW (rootwin), + GDK_WINDOW_XID (rootwin), False, GrabModeAsync, GrabModeAsync); @@ -94,7 +94,7 @@ grab_ungrab_with_ignorable_modifiers (GdkWindow *rootwin, XUngrabKey (GDK_WINDOW_XDISPLAY (rootwin), binding->keycode, binding->modifiers | mod_masks [i], - GDK_WINDOW_XWINDOW (rootwin)); + GDK_WINDOW_XID (rootwin)); } } } @@ -312,7 +312,7 @@ tomboy_keybinder_is_modifier (guint keycode) XModifierKeymap *mod_keymap; gboolean retval = FALSE; - mod_keymap = XGetModifierMapping (gdk_display); + mod_keymap = XGetModifierMapping (gdk_x11_get_default_xdisplay()); map_size = 8 * mod_keymap->max_keypermod; -- cgit v1.2.1 From edcac6e05b70c25ddc5288c48c11b317f45521c1 Mon Sep 17 00:00:00 2001 From: Elias Aebi Date: Sat, 21 Dec 2013 21:19:15 +0100 Subject: make the hotkey support work again for GTK2 --- src/applet-main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/applet-main.c b/src/applet-main.c index 4126607..995552c 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -554,6 +554,14 @@ hotkey_filter (char * keystring G_GNUC_UNUSED, gpointer data) return; } +#if !GTK_CHECK_VERSION(3,0,0) + if (!GTK_MENU_SHELL(data)->active) { + gtk_grab_add (GTK_WIDGET(data)); + GTK_MENU_SHELL(data)->have_grab = TRUE; + GTK_MENU_SHELL(data)->active = TRUE; + } +#endif + gtk_menu_shell_select_item(GTK_MENU_SHELL(data), GTK_WIDGET(g_list_last(children)->data)); g_list_free(children); return; -- cgit v1.2.1