[Xfce4-commits] <xfdesktop:master> Add a tabs width of padding for tooltip text (Bug #9162)

Eric Koegel noreply at xfce.org
Fri Jan 25 12:36:05 CET 2013


Updating branch refs/heads/master
         to 969b882a7b9694b59ccf5568e889131747dcd827 (commit)
       from 7d3a73bb593f34eef059b44d063285e0ffdada91 (commit)

commit 969b882a7b9694b59ccf5568e889131747dcd827
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Fri Jan 18 05:35:47 2013 +0300

    Add a tabs width of padding for tooltip text (Bug #9162)

 src/xfdesktop-icon-view.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index 5c62478..d7b3013 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -1040,6 +1040,7 @@ xfdesktop_icon_view_show_tooltip(GtkWidget *widget,
 {
     XfdesktopIconView *icon_view = XFDESKTOP_ICON_VIEW(widget);
     const gchar *tip_text;
+    gchar *padded_tip_text = NULL;
     
     if(!icon_view->priv->item_under_pointer
        || icon_view->priv->definitely_dragging)
@@ -1051,13 +1052,17 @@ xfdesktop_icon_view_show_tooltip(GtkWidget *widget,
     if(!tip_text)
         return FALSE;
 
+    padded_tip_text = g_strdup_printf("%s\t", tip_text);
+
     if(icon_view->priv->tooltip_size > 0) {
         gtk_tooltip_set_icon(tooltip,
                 xfdesktop_icon_peek_pixbuf(icon_view->priv->item_under_pointer,
                                            icon_view->priv->tooltip_size));
     }
 
-    gtk_tooltip_set_text(tooltip, tip_text);
+    gtk_tooltip_set_text(tooltip, padded_tip_text);
+
+    g_free(padded_tip_text);
 
     return TRUE;
 }


More information about the Xfce4-commits mailing list