diff options
-rw-r--r-- | libdbusmenu-glib/Makefile.am | 2 | ||||
-rw-r--r-- | libdbusmenu-glib/client.c | 15 | ||||
-rw-r--r-- | libdbusmenu-glib/server.c | 13 | ||||
-rw-r--r-- | libdbusmenu-gtk/Makefile.am | 4 | ||||
-rw-r--r-- | libdbusmenu-gtk/client.c | 2 |
5 files changed, 26 insertions, 10 deletions
diff --git a/libdbusmenu-glib/Makefile.am b/libdbusmenu-glib/Makefile.am index a1247a3..f502fb3 100644 --- a/libdbusmenu-glib/Makefile.am +++ b/libdbusmenu-glib/Makefile.am @@ -143,7 +143,7 @@ Dbusmenu_Glib_0_4_gir_LIBS = libdbusmenu-glib.la Dbusmenu_Glib_0_4_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources)) Dbusmenu_Glib_0_4_gir_NAMESPACE = Dbusmenu Dbusmenu_Glib_0_4_gir_VERSION = Glib-0.4 -Dbusmenu_Glib_0_4_gir_PACKAGES = dbusmenu-glib-0.4 +Dbusmenu_Glib_0_4_gir_EXPORT_PACKAGES = dbusmenu-glib-0.4 Dbusmenu_Glib_0_4_gir_SCANNER_FLAGS = $(INTROSPECTION_SCANNER_ARGS) INTROSPECTION_GIRS += Dbusmenu-Glib-0.4.gir diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 58d6360..29ed4a0 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -1538,6 +1538,14 @@ parse_layout (DbusmenuClient * client, const gchar * layout) static void update_layout_cb (GObject * proxy, GAsyncResult * res, gpointer data) { + DbusmenuClient * client = DBUSMENU_CLIENT(data); + DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client); + + if (priv->layoutcall != NULL) { + g_object_unref(priv->layoutcall); + priv->layoutcall = NULL; + } + GError * error = NULL; GVariant * params = NULL; @@ -1554,9 +1562,6 @@ update_layout_cb (GObject * proxy, GAsyncResult * res, gpointer data) g_variant_get(params, "(us)", &rev, &xml); g_variant_unref(params); - DbusmenuClient * client = DBUSMENU_CLIENT(data); - DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client); - guint parseable = parse_layout(client, xml); g_free(xml); @@ -1567,10 +1572,6 @@ update_layout_cb (GObject * proxy, GAsyncResult * res, gpointer data) priv->my_revision = rev; /* g_debug("Root is now: 0x%X", (unsigned int)priv->root); */ - if (priv->layoutcall != NULL) { - g_object_unref(priv->layoutcall); - priv->layoutcall = NULL; - } #ifdef MASSIVEDEBUGGING g_debug("Client signaling layout has changed."); #endif diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index 6be2a60..095f333 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -506,6 +506,19 @@ register_object (DbusmenuServer * server) if (error != NULL) { g_warning("Unable to register object on bus: %s", error->message); g_error_free(error); + return; + } + + /* If we've got it registered let's tell everyone about it */ + g_signal_emit(G_OBJECT(server), signals[LAYOUT_UPDATED], 0, priv->layout_revision, 0, TRUE); + if (priv->dbusobject != NULL && priv->bus != NULL) { + g_dbus_connection_emit_signal(priv->bus, + NULL, + priv->dbusobject, + DBUSMENU_INTERFACE, + "LayoutUpdated", + g_variant_new("(ui)", priv->layout_revision, 0), + NULL); } return; diff --git a/libdbusmenu-gtk/Makefile.am b/libdbusmenu-gtk/Makefile.am index 1957820..0b939c0 100644 --- a/libdbusmenu-gtk/Makefile.am +++ b/libdbusmenu-gtk/Makefile.am @@ -95,7 +95,7 @@ DbusmenuGtk_0_4_gir_LIBS = libdbusmenu-gtk$(VER).la DbusmenuGtk_0_4_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources)) DbusmenuGtk_0_4_gir_NAMESPACE = DbusmenuGtk$(VER) DbusmenuGtk_0_4_gir_SCANNERFLAGS = $(INTROSPECTION_SCANNER_ARGS) -DbusmenuGtk_0_4_gir_PACKAGES = dbusmenu-gtk$(VER)-0.4 +DbusmenuGtk_0_4_gir_EXPORT_PACKAGES = dbusmenu-gtk$(VER)-0.4 # We duplicate these for the same reason as libdbusmenu_gtk3includedir above DbusmenuGtk3_0_4_gir_INCLUDES = $(DbusmenuGtk_0_4_gir_INCLUDES) @@ -104,7 +104,7 @@ DbusmenuGtk3_0_4_gir_LIBS = $(DbusmenuGtk_0_4_gir_LIBS) DbusmenuGtk3_0_4_gir_FILES = $(DbusmenuGtk_0_4_gir_FILES) DbusmenuGtk3_0_4_gir_NAMESPACE = $(DbusmenuGtk_0_4_gir_NAMESPACE) DbusmenuGtk3_0_4_gir_SCANNERFLAGS = $(DbusmenuGtk_0_4_gir_SCANNERFLAGS) -DbusmenuGtk3_0_4_gir_PACKAGES = $(DbusmenuGtk_0_4_gir_PACKAGES) +DbusmenuGtk3_0_4_gir_EXPORT_PACKAGES = $(DbusmenuGtk_0_4_gir_EXPORT_PACKAGES) INTROSPECTION_GIRS += DbusmenuGtk$(VER)-0.4.gir diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index b01156f..18a2cdd 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -789,6 +789,7 @@ image_property_handle (DbusmenuMenuitem * item, const gchar * property, GVariant gtkimage = NULL; } else if (g_strcmp0(iconname, DBUSMENU_MENUITEM_ICON_NAME_BLANK) == 0) { gtkimage = gtk_image_new(); + g_object_set(G_OBJECT(gtkimage), "use-fallback", TRUE, NULL); } else { /* Look to see if we want to have an icon with the 'ltr' or 'rtl' depending on what we're doing. */ @@ -807,6 +808,7 @@ image_property_handle (DbusmenuMenuitem * item, const gchar * property, GVariant can just convert it to this name. */ if (gtkimage == NULL) { gtkimage = gtk_image_new_from_icon_name(finaliconname, GTK_ICON_SIZE_MENU); + g_object_set(G_OBJECT(gtkimage), "use-fallback", TRUE, NULL); } else { gtk_image_set_from_icon_name(GTK_IMAGE(gtkimage), finaliconname, GTK_ICON_SIZE_MENU); } |