[Xfce4-commits] [xfce/xfdesktop] 01/02: Filter out changed events for special icons (Bug 10755)

noreply at xfce.org noreply at xfce.org
Mon Mar 31 19:35:06 CEST 2014


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfdesktop.

commit f3f876d5dd501dba794153341b8f7747037f9c32
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Sun Mar 30 20:27:57 2014 +0300

    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);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list