[Xfce4-commits] <xfdesktop:master> Properly invalidate tooltips on file changes.

Jannis Pohlmann noreply at xfce.org
Sun Jan 30 14:36:01 CET 2011


Updating branch refs/heads/master
         to 857cb8a6f420f0f5cf6cf7fece7301c9351dca09 (commit)
       from 171e0d79266b1ad6faedb7e7aee8dffb89b684e5 (commit)

commit 857cb8a6f420f0f5cf6cf7fece7301c9351dca09
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Sun Jan 30 14:34:52 2011 +0100

    Properly invalidate tooltips on file changes.

 NEWS                              |    1 +
 src/xfdesktop-regular-file-icon.c |    4 ++++
 src/xfdesktop-special-file-icon.c |    1 +
 3 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index b6f919b..a7c9be3 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ Xfdesktop 4.x.y
   * Implement monitoring for special file icons (bug #6986).
   * Implement open and empty actions for the trash.
   * Fix crash when cancelling a file download (bug #6876).
+  * Properly invalidate tooltips on file changes.
 
 
 Xfdesktop 4.8.0
diff --git a/src/xfdesktop-regular-file-icon.c b/src/xfdesktop-regular-file-icon.c
index 8f30c2c..e14256a 100644
--- a/src/xfdesktop-regular-file-icon.c
+++ b/src/xfdesktop-regular-file-icon.c
@@ -576,6 +576,10 @@ xfdesktop_regular_file_icon_update_file_info(XfdesktopFileIcon *icon,
         /* no change, release the new display name */
         g_free (new_display_name);
     }
+
+    /* invalidate the tooltip */
+    g_free(regular_file_icon->priv->tooltip);
+    regular_file_icon->priv->tooltip = NULL;
     
     /* not really easy to check if this changed or not, so just invalidate it */
     xfdesktop_regular_file_icon_invalidate_pixbuf(regular_file_icon);
diff --git a/src/xfdesktop-special-file-icon.c b/src/xfdesktop-special-file-icon.c
index 8f0990c..1226adf 100644
--- a/src/xfdesktop-special-file-icon.c
+++ b/src/xfdesktop-special-file-icon.c
@@ -583,6 +583,7 @@ xfdesktop_special_file_icon_changed(GFileMonitor *monitor,
     }
 
     /* invalidate the tooltip */
+    g_free(special_file_icon->priv->tooltip);
     special_file_icon->priv->tooltip = NULL;
 
     /* update the icon */



More information about the Xfce4-commits mailing list