diff options
author | Evgeni Golov <evgeni@debian.org> | 2010-07-01 11:24:43 +0200 |
---|---|---|
committer | Evgeni Golov <evgeni@debian.org> | 2010-07-01 11:24:43 +0200 |
commit | 6830905830ac78271515c586442a090cf7a0e3ff (patch) | |
tree | 9f5ef29e46f14d553df2622d38df80ea6ee1f0ac /libdbusmenu-glib | |
parent | c6d95ac4d53118c0a2f4b05c760bd03cc55e8c67 (diff) | |
parent | 01780416e8c1267838892fb6d114a84fe33dc590 (diff) | |
download | libdbusmenu-6830905830ac78271515c586442a090cf7a0e3ff.tar.gz libdbusmenu-6830905830ac78271515c586442a090cf7a0e3ff.tar.bz2 libdbusmenu-6830905830ac78271515c586442a090cf7a0e3ff.zip |
Merging lp:~ubuntu-desktop/dbusmenu/ubuntu
* New upstream release.
* Adding support for menu shortcuts (LP: #591293)
* Fixing distcheck of documentation builds
* Autogen.sh fix for adding custom prefix (LP: #595565)
* Fixing children property name to match spec (LP: #597321)
* Merging in Debian branch
* debian/control: Switching branch on this branch to be the
dbusmenu-team.
* debian/rules: Updating shlibs to 0.3.3 for shortcut API additions
* Merge from Ubuntu.
Closes: #586069
* debian/control:
- Set Maintainer to pkg-ayatana.
- Add myself as Uploader.
- Update package descriptions.
- Standards-Version: 3.8.4
- Fix Homepage URL.
- Update Vcs-* fields.
* debian/copyright:
- Convert to DEP5 format.
- Add Ken and Sebastien, according to changelog.
- Add Aurélien Gâteau, according to headers.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r-- | libdbusmenu-glib/client.c | 28 | ||||
-rw-r--r-- | libdbusmenu-glib/menuitem.h | 8 |
2 files changed, 35 insertions, 1 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index c0d3b7a..fa233a4 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -30,6 +30,8 @@ License version 3 and version 2.1 along with this program. If not, see #include "config.h" #endif +#include <dbus/dbus-glib-bindings.h> + #include <libxml/parser.h> #include <libxml/tree.h> @@ -397,6 +399,25 @@ dbus_owner_change (DBusGProxy * proxy, const gchar * name, const gchar * prev, c return build_proxies(client); } +/* This is the response to see if the name has an owner. If + it does, then we should build the proxies here. Race condition + check. */ +static void +name_owner_check (DBusGProxy *proxy, gboolean has_owner, GError *error, gpointer userdata) +{ + if (error != NULL) { + return; + } + + if (!has_owner) { + return; + } + + DbusmenuClient * client = DBUSMENU_CLIENT(userdata); + build_proxies(client); + return; +} + /* This function builds the DBus proxy which will look out for the service coming up. */ static void @@ -426,6 +447,13 @@ build_dbus_proxy (DbusmenuClient * client) dbus_g_proxy_connect_signal(priv->dbusproxy, "NameOwnerChanged", G_CALLBACK(dbus_owner_change), client, NULL); + /* Now let's check to make sure we're not in some race + condition case. */ + org_freedesktop_DBus_name_has_owner_async(priv->dbusproxy, + priv->dbus_name, + name_owner_check, + client); + return; } diff --git a/libdbusmenu-glib/menuitem.h b/libdbusmenu-glib/menuitem.h index 39d257e..e17d851 100644 --- a/libdbusmenu-glib/menuitem.h +++ b/libdbusmenu-glib/menuitem.h @@ -58,7 +58,8 @@ G_BEGIN_DECLS #define DBUSMENU_MENUITEM_PROP_ICON_DATA "icon-data" #define DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE "toggle-type" #define DBUSMENU_MENUITEM_PROP_TOGGLE_STATE "toggle-state" -#define DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY "child-display" +#define DBUSMENU_MENUITEM_PROP_SHORTCUT "shortcut" +#define DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY "children-display" #define DBUSMENU_MENUITEM_TOGGLE_CHECK "checkmark" #define DBUSMENU_MENUITEM_TOGGLE_RADIO "radio" @@ -69,6 +70,11 @@ G_BEGIN_DECLS #define DBUSMENU_MENUITEM_ICON_NAME_BLANK "blank-icon" +#define DBUSMENU_MENUITEM_SHORTCUT_CONTROL "Control" +#define DBUSMENU_MENUITEM_SHORTCUT_ALT "Alt" +#define DBUSMENU_MENUITEM_SHORTCUT_SHIFT "Shift" +#define DBUSMENU_MENUITEM_SHORTCUT_SUPER "Super" + #define DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU "submenu" /** |