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

noreply at xfce.org noreply at xfce.org
Sun Nov 9 15:36:59 CET 2014


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

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

commit 83b18f3a8721d018465e84595c0be3b9db76840e
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 345af73..79f7288 100644
--- a/src/xfdesktop-special-file-icon.c
+++ b/src/xfdesktop-special-file-icon.c
@@ -575,6 +575,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