[Xfce4-commits] <ristretto:ristretto-0.0> Thumbnail in thumbnailbar has filename as tooltip
Stephan Arts
noreply at xfce.org
Sun Oct 23 19:16:12 CEST 2011
Updating branch refs/heads/ristretto-0.0
to 7e5c0cc2954ae3939f129354bfac5815f782a296 (commit)
from a4263e79c9584f93191391403f075f4c93d05f0d (commit)
commit 7e5c0cc2954ae3939f129354bfac5815f782a296
Author: Stephan Arts <stephan at xfce.org>
Date: Mon Jun 1 10:47:34 2009 +0200
Thumbnail in thumbnailbar has filename as tooltip
src/thumbnail.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/src/thumbnail.c b/src/thumbnail.c
index 28129ef..be04e09 100644
--- a/src/thumbnail.c
+++ b/src/thumbnail.c
@@ -201,6 +201,9 @@ rstto_thumbnail_paint(RsttoThumbnail *thumb)
GtkWidget *
rstto_thumbnail_new (RsttoImage *image)
{
+ gchar *path, *basename, *title;
+ GFile *file = NULL;
+
g_return_val_if_fail (image != NULL, NULL);
RsttoThumbnail *thumb = g_object_new(RSTTO_TYPE_THUMBNAIL, NULL);
@@ -208,8 +211,16 @@ rstto_thumbnail_new (RsttoImage *image)
thumb->priv->image = image;
g_object_ref (image);
- gtk_widget_set_tooltip_text(GTK_WIDGET(thumb), "AAAAAAAAAAAA");
+ file = rstto_image_get_file (image);
+
+ path = g_file_get_path (file);
+ basename = g_path_get_basename (path);
+
+
+ gtk_widget_set_tooltip_text(GTK_WIDGET(thumb), basename);
+ g_free (basename);
+ g_free (path);
return GTK_WIDGET(thumb);
}
More information about the Xfce4-commits
mailing list