[gnome-menus] libmenu: Clear cache of desktop entries set when files are added/removed
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-menus] libmenu: Clear cache of desktop entries set when files are added/removed
- Date: Thu, 23 Sep 2010 17:45:32 +0000 (UTC)
commit fbd3e2c9f8fb8de4c975367f30b84121478da7d2
Author: Vincent Untz <vuntz gnome org>
Date: Thu Sep 23 19:40:47 2010 +0200
libmenu: Clear cache of desktop entries set when files are added/removed
When installing or removing an application, we get a notification of
change. However, the menu tree still contained the same content.
We were simply not clearing the cache containing the list of desktop
entries when a file got added or removed, meaning that we always got the
same list of desktop entries.
(Note that it didn't affect gnome-panel, it's unclear why)
https://bugzilla.gnome.org/show_bug.cgi?id=630410
libmenu/entry-directories.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libmenu/entry-directories.c b/libmenu/entry-directories.c
index c459ff5..b96b845 100644
--- a/libmenu/entry-directories.c
+++ b/libmenu/entry-directories.c
@@ -451,6 +451,12 @@ handle_cached_dir_changed (MenuMonitor *monitor,
if (handled)
{
+ /* CHANGED events don't change the set of desktop entries */
+ if (event == MENU_MONITOR_EVENT_CREATED || event == MENU_MONITOR_EVENT_DELETED)
+ {
+ _entry_directory_list_empty_desktop_cache ();
+ }
+
cached_dir_invoke_monitors (dir);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]