diff options
author | Ted Gould <ted@canonical.com> | 2009-09-21 15:20:07 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-09-21 15:20:07 -0500 |
commit | d8e66642e25a08bb4096b96ab101b34305ba4f84 (patch) | |
tree | 4506e85b66c5ad8ac54d028df7217398584351e3 | |
parent | be2f874303bfab096b4f06cf535637c14393ee18 (diff) | |
download | libdbusmenu-d8e66642e25a08bb4096b96ab101b34305ba4f84.tar.gz libdbusmenu-d8e66642e25a08bb4096b96ab101b34305ba4f84.tar.bz2 libdbusmenu-d8e66642e25a08bb4096b96ab101b34305ba4f84.zip |
Save the 'current' version and track whether we need to request an update.
-rw-r--r-- | libdbusmenu-glib/client.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 271483d..d4582a9 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -94,7 +94,7 @@ static void dbusmenu_client_finalize (GObject *object); static void set_property (GObject * obj, guint id, const GValue * value, GParamSpec * pspec); static void get_property (GObject * obj, guint id, GValue * value, GParamSpec * pspec); /* Private Funcs */ -static void layout_update (DBusGProxy * proxy, DbusmenuClient * client); +static void layout_update (DBusGProxy * proxy, gint revision, DbusmenuClient * client); static void id_prop_update (DBusGProxy * proxy, guint id, gchar * property, gchar * value, DbusmenuClient * client); static void id_update (DBusGProxy * proxy, guint id, DbusmenuClient * client); static void build_proxies (DbusmenuClient * client); @@ -307,9 +307,13 @@ get_property (GObject * obj, guint id, GValue * value, GParamSpec * pspec) /* Annoying little wrapper to make the right function update */ static void -layout_update (DBusGProxy * proxy, DbusmenuClient * client) +layout_update (DBusGProxy * proxy, gint revision, DbusmenuClient * client) { - update_layout(client); + DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client); + priv->current_revision = revision; + if (priv->current_revision > priv->my_revision) { + update_layout(client); + } return; } |