From 29533cba681eecdc4581f8398fe47746c0b8714d Mon Sep 17 00:00:00 2001 From: Eric Koegel Date: Sun, 30 Mar 2014 20:27:57 +0300 Subject: [PATCH] Filter out changed events for special icons (Bug 10755) Special file icons are the trash, home, and filesystem icons. The only events that would require a refesh would be an add/delete event for the trash can. This patch filters out all the change, attribute change, and changes done hints to prevent the icons from being reloaded due to those events. --- src/xfdesktop-special-file-icon.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xfdesktop-special-file-icon.c b/src/xfdesktop-special-file-icon.c index f694257..0cf7d37 100644 --- a/src/xfdesktop-special-file-icon.c +++ b/src/xfdesktop-special-file-icon.c @@ -608,6 +608,12 @@ xfdesktop_special_file_icon_changed(GFileMonitor *monitor, g_return_if_fail(G_IS_FILE(file)); g_return_if_fail(XFDESKTOP_IS_SPECIAL_FILE_ICON(special_file_icon)); + /* We don't care about change events only created/deleted */ + if(event == G_FILE_MONITOR_EVENT_CHANGED || + event == G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED || + event == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT) + return; + /* release the old file information */ if(special_file_icon->priv->file_info) { g_object_unref(special_file_icon->priv->file_info); -- 1.9.1