[Xfce4-commits] <garcon:master> Take and notify file if reloaded with another file.
Nick Schermer
nick at xfce.org
Sat Aug 29 19:02:08 CEST 2009
Updating branch refs/heads/master
to 2e8a4f4ff2cd09f2fe2816faf55e52b0082ddf19 (commit)
from 55fe07b1a59b4ccd4c482d0a70177b02a40a5a26 (commit)
commit 2e8a4f4ff2cd09f2fe2816faf55e52b0082ddf19
Author: Nick Schermer <nick at xfce.org>
Date: Sat Aug 29 18:24:26 2009 +0200
Take and notify file if reloaded with another file.
garcon/garcon-menu-item.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/garcon/garcon-menu-item.c b/garcon/garcon-menu-item.c
index 6707485..8490c4b 100644
--- a/garcon/garcon-menu-item.c
+++ b/garcon/garcon-menu-item.c
@@ -816,6 +816,16 @@ garcon_menu_item_reload_from_file (GarconMenuItem *item,
/* Queue property notifications */
g_object_freeze_notify (G_OBJECT (item));
+ /* Set the new file if needed */
+ if (!g_file_equal (file, item->priv->file))
+ {
+ if (G_LIKELY (item->priv->file != NULL))
+ g_object_unref (G_OBJECT (item->priv->file));
+ item->priv->file = g_object_ref (G_OBJECT (file));
+
+ g_object_notify (G_OBJECT (item), "file");
+ }
+
/* Update properties */
string = GET_LOCALE_KEY (string, G_KEY_FILE_DESKTOP_KEY_NAME);
garcon_menu_item_set_name (item, string);
More information about the Xfce4-commits
mailing list