aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac9
-rw-r--r--libdbusmenu-glib/Makefile.am4
-rw-r--r--libdbusmenu-gtk/Makefile.am5
-rw-r--r--libdbusmenu-gtk/parser.c35
4 files changed, 30 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac
index ba5cd4b..fd69595 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,15 +23,6 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
-AC_ARG_ENABLE([deprecations],
- [AS_HELP_STRING([--enable-deprecations],
- [allow deprecated API usage @<:@default=yes@:>@])],
- [],
- [enable_deprecations=yes])
-AS_IF([test "x$enable_deprecations" = xno],
- [CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE -DGTK_DISABLE_SINGLE_INCLUDES"]
-)
-
###########################
# GTK Doc
###########################
diff --git a/libdbusmenu-glib/Makefile.am b/libdbusmenu-glib/Makefile.am
index 71dce6d..6fc3fb8 100644
--- a/libdbusmenu-glib/Makefile.am
+++ b/libdbusmenu-glib/Makefile.am
@@ -62,7 +62,9 @@ libdbusmenu_glib_la_LDFLAGS = \
-export-symbols-regex "^[^_].*"
libdbusmenu_glib_la_CFLAGS = \
- $(DBUSMENUGLIB_CFLAGS) -Wall -Werror -DG_DISABLE_DEPRECATED -DG_LOG_DOMAIN="\"LIBDBUSMENU-GLIB\""
+ $(DBUSMENUGLIB_CFLAGS) \
+ -Wall -Werror -Wno-error=deprecated-declarations \
+ -DG_LOG_DOMAIN="\"LIBDBUSMENU-GLIB\""
libdbusmenu_glib_la_LIBADD = \
$(DBUSMENUGLIB_LIBS)
diff --git a/libdbusmenu-gtk/Makefile.am b/libdbusmenu-gtk/Makefile.am
index 2b3075f..b1ee91a 100644
--- a/libdbusmenu-gtk/Makefile.am
+++ b/libdbusmenu-gtk/Makefile.am
@@ -62,7 +62,10 @@ libdbusmenu_gtk_la_LDFLAGS = \
-export-symbols-regex "^[^_].*"
libdbusmenu_gtk_la_CFLAGS = \
- $(DBUSMENUGTK_CFLAGS) -I$(top_srcdir) -Wall -Werror -DG_DISABLE_DEPRECATED -DG_LOG_DOMAIN="\"LIBDBUSMENU-GTK\""
+ $(DBUSMENUGTK_CFLAGS) \
+ -I$(top_srcdir) \
+ -Wall -Werror -Wno-error=deprecated-declarations \
+ -DG_LOG_DOMAIN="\"LIBDBUSMENU-GTK\""
libdbusmenu_gtk_la_LIBADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c
index 92932c5..d222f10 100644
--- a/libdbusmenu-gtk/parser.c
+++ b/libdbusmenu-gtk/parser.c
@@ -66,10 +66,13 @@ static void image_notify_cb (GtkWidget * widget,
static void action_notify_cb (GtkAction * action,
GParamSpec * pspec,
gpointer data);
-static void child_added_cb (GtkContainer * menu,
+static void item_inserted_cb (GtkContainer * menu,
GtkWidget * widget,
+#ifdef HAVE_GTK3
+ gint position,
+#endif
gpointer data);
-static void child_removed_cb (GtkContainer * menu,
+static void item_removed_cb (GtkContainer * menu,
GtkWidget * widget,
gpointer data);
static void theme_changed_cb (GtkIconTheme * theme,
@@ -184,9 +187,9 @@ parse_data_free (gpointer data)
if (pdata != NULL && pdata->shell != NULL) {
g_signal_handlers_disconnect_matched(pdata->shell, (GSignalMatchType)G_SIGNAL_MATCH_FUNC,
- 0, 0, NULL, G_CALLBACK(child_added_cb), NULL);
+ 0, 0, NULL, G_CALLBACK(item_inserted_cb), NULL);
g_signal_handlers_disconnect_matched(pdata->shell, (GSignalMatchType)G_SIGNAL_MATCH_FUNC,
- 0, 0, NULL, G_CALLBACK(child_removed_cb), NULL);
+ 0, 0, NULL, G_CALLBACK(item_removed_cb), NULL);
g_object_remove_weak_pointer(G_OBJECT(pdata->shell), (gpointer*)&pdata->shell);
}
@@ -290,12 +293,16 @@ watch_submenu(DbusmenuMenuitem * mi, GtkWidget * menu)
pdata->shell = menu;
g_signal_connect (G_OBJECT (menu),
- "child-added",
- G_CALLBACK (child_added_cb),
+#ifdef HAVE_GTK3
+ "insert",
+#else
+ "child-added"
+#endif
+ G_CALLBACK (item_inserted_cb),
mi);
g_signal_connect (G_OBJECT (menu),
- "child-removed",
- G_CALLBACK (child_removed_cb),
+ "remove",
+ G_CALLBACK (item_removed_cb),
mi);
g_object_add_weak_pointer(G_OBJECT (menu), (gpointer*)&pdata->shell);
@@ -1137,7 +1144,12 @@ widget_add_cb (GtkWidget *widget,
/* A child item was added to a menu we're watching. Let's try to integrate it. */
static void
-child_added_cb (GtkContainer *menu, GtkWidget *widget, gpointer data)
+item_inserted_cb (GtkContainer *menu,
+ GtkWidget *widget,
+#ifdef HAVE_GTK3
+ gint position,
+#endif
+ gpointer data)
{
DbusmenuMenuitem *menuitem = (DbusmenuMenuitem *)data;
@@ -1152,9 +1164,9 @@ child_added_cb (GtkContainer *menu, GtkWidget *widget, gpointer data)
parse_menu_structure_helper(widget, &recurse);
}
-/* A child item was added to a menu we're watching. Let's try to integrate it. */
+/* A child item was removed from a menu we're watching. */
static void
-child_removed_cb (GtkContainer *menu, GtkWidget *widget, gpointer data)
+item_removed_cb (GtkContainer *menu, GtkWidget *widget, gpointer data)
{
gpointer pmi = g_object_get_data(G_OBJECT(widget), CACHED_MENUITEM);
if (pmi == NULL) {
@@ -1216,4 +1228,3 @@ should_show_image (GtkImage *image)
return FALSE;
}
-