diff options
-rw-r--r-- | debian/changelog | 65 | ||||
-rw-r--r-- | debian/control | 4 | ||||
-rw-r--r-- | libdbusmenu-glib/menuitem.c | 27 |
3 files changed, 56 insertions, 40 deletions
diff --git a/debian/changelog b/debian/changelog index 2721315..22ee67b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,56 +1,45 @@ -libdbusmenu (0.3.98-0ubuntu2~ppa6) natty; urgency=low +libdbusmenu (0.3.98-0ubuntu5~ppa1) UNRELEASED; urgency=low - * Fix - * Adding a generated .c file - - -- Ted Gould <ted@ubuntu.com> Thu, 24 Feb 2011 08:51:18 -0600 - -libdbusmenu (0.3.98-0ubuntu2~ppa5) natty; urgency=low - - * Upstream merge + * Upstream Merge + * Add a signal on the menuitem for generic event support * Handle the case of a single NULL entry as well. * Not checking defaults when value is NULL * Add the 'type' variable first when processing new menuitems - * When requesting new layouts get 'enabled' and 'visible' - as well - - -- Ted Gould <ted@ubuntu.com> Wed, 23 Feb 2011 13:36:34 -0600 - -libdbusmenu (0.3.98-0ubuntu2~ppa4) natty; urgency=low - - * Upstream merge - * Fixing fixed recursion states + * Protection from unref'ing NULL variants + * Only send the requested properties and request fewer + * Add in a defaults database + * Only send property updates if the menu item has been + seen on the bus. + * Add a property for text direction. + * Add a property for needing attention. - -- Ted Gould <ted@ubuntu.com> Wed, 23 Feb 2011 11:08:22 -0600 + -- Ted Gould <ted@ubuntu.com> Thu, 24 Feb 2011 12:38:30 -0600 -libdbusmenu (0.3.98-0ubuntu2~ppa3) natty; urgency=low +libdbusmenu (0.3.98-0ubuntu4) natty; urgency=low - * Upstream Merge - * Add a signal on the menuitem for generic event support - * Memory handling fixes in the parser - * Fix dbus-menu.xml to have more consistent signatures. + * Merged from trunk (rev 220) + - Cleaning up cleaning up so we don't unref twice and crash + - Fixing the signatures to make them more consistent + - Adding defaults to translatable files + - Support a set of defaults and not sending them over the bus. + - Fixing annotations and adding tests with python. - -- Ted Gould <ted@ubuntu.com> Wed, 23 Feb 2011 10:09:31 -0600 + -- Ken VanDine <ken.vandine@canonical.com> Wed, 23 Feb 2011 11:34:57 -0500 -libdbusmenu (0.3.98-0ubuntu2~ppa2) natty; urgency=low +libdbusmenu (0.3.98-0ubuntu3) natty; urgency=low - * Upstream Merge - * Protection from unref'ing NULL variants + * debian/control: + - Use new libgtk-3-dev build-depends - -- Ted Gould <ted@ubuntu.com> Mon, 21 Feb 2011 23:09:02 -0600 + -- Robert Ancell <robert.ancell@canonical.com> Tue, 22 Feb 2011 16:16:44 +1100 -libdbusmenu (0.3.98-0ubuntu2~ppa1) natty; urgency=low +libdbusmenu (0.3.98-0ubuntu2) natty; urgency=low - * Upstream Merge - * Only send the requested properties and request fewer - * Add in a defaults database - * Only send property updates if the menu item has been - seen on the bus. - * Add a property for text direction. - * Add a property for needing attention. + * libdbusmenu-glib/{client,menuitem,server}.c + * Be more selective on unref - -- Ted Gould <ted@ubuntu.com> Mon, 21 Feb 2011 22:40:36 -0600 + -- Ken VanDine <ken.vandine@canonical.com> Tue, 22 Feb 2011 09:23:38 -0500 libdbusmenu (0.3.98-0ubuntu1) natty; urgency=low diff --git a/debian/control b/debian/control index 3b01816..0703fed 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Uploaders: Evgeni Golov <evgeni@debian.org> Build-Depends: debhelper (>= 5.0), cdbs (>= 0.4.41), libgtk2.0-dev (>= 2.23.2-0ubuntu2), - libgtk3.0-dev (>= 2.99.2-1ubuntu2), + libgtk-3-dev (>= 2.99.2-1ubuntu2), libgdk-pixbuf2.0-dev (>= 2.22.1-0ubuntu4), libdbus-glib-1-dev, gnome-doc-utils, @@ -199,7 +199,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, libdbusmenu-gtk3-3 (= ${binary:Version}), libdbus-glib-1-dev (>= 0.76), - libgtk3.0-dev (>= 2.91.4-0ubuntu1), + libgtk-3-dev (>= 2.91.4-0ubuntu1), libdbusmenu-glib-dev Description: library for passing menus over DBus - GTK+ version developement files libdbusmenu passes a menu structure across DBus so that a program can diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index 4901e46..9fa0e1a 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -1076,6 +1076,33 @@ dbusmenu_menuitem_property_set_variant (DbusmenuMenuitem * mi, const gchar * pro } } + const gchar * type = menuitem_get_type(mi); + + /* Check the expected type to see if we want to have a warning */ + GVariantType * default_type = dbusmenu_defaults_default_get_type(priv->defaults, type, property); + if (default_type != NULL) { + /* If we have an expected type we should check to see if + the value we've been given is of the same type and generate + a warning if it isn't */ + if (!g_variant_is_of_type(value, default_type)) { + g_warning("Setting menuitem property '%s' with value of type '%s' when expecting '%s'", property, g_variant_get_type_string(value), g_variant_type_peek_string(default_type)); + } + } + + /* Check the defaults database to see if we have a default + for this property. */ + GVariant * default_value = dbusmenu_defaults_default_get(priv->defaults, type, property); + if (default_value != NULL) { + /* Now see if we're setting this to the same value as the + default. If we are then we just want to swallow this variant + and make the function behave like we're clearing it. */ + if (g_variant_equal(default_value, value)) { + g_variant_ref_sink(value); + g_variant_unref(value); + value = NULL; + } + } + gboolean replaced = FALSE; gpointer currentval = g_hash_table_lookup(priv->properties, property); |