[brasero] Display the URI as a tooltip for the image file selector



commit 604e4ebb11a352455aa3924547b80ae6fccad873
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Sat Nov 14 13:19:04 2009 +0100

    Display the URI as a tooltip for the image file selector

 libbrasero-burn/brasero-src-image.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/libbrasero-burn/brasero-src-image.c b/libbrasero-burn/brasero-src-image.c
index 40a7e48..3e4d925 100644
--- a/libbrasero-burn/brasero-src-image.c
+++ b/libbrasero-burn/brasero-src-image.c
@@ -173,9 +173,9 @@ brasero_src_image_update (BraseroSrcImage *self)
 {
 	gchar *uri;
 	gchar *name;
-	GFile *file;
 	gchar *string;
 	goffset bytes = 0;
+	GFile *file = NULL;
 	GError *error = NULL;
 	BraseroStatus *status;
 	BraseroBurnResult result;
@@ -214,9 +214,11 @@ brasero_src_image_update (BraseroSrcImage *self)
 	g_free (uri);
 
 	name = g_file_get_basename (file);
-	g_object_unref (file);
-	if (!name)
+	if (!name) {
+		if (file)
+			g_object_unref (file);
 		return;
+	}
 
 	/* See if information retrieval went fine and/or is ready */
 	status = brasero_status_new ();
@@ -243,7 +245,8 @@ brasero_src_image_update (BraseroSrcImage *self)
 		goto end;
 	}
 
-	gtk_widget_set_tooltip_text (GTK_WIDGET (self), NULL);
+	uri = g_file_get_uri (file);
+	gtk_widget_set_tooltip_text (GTK_WIDGET (self), uri);
 
 	/* Deal with size */
 	brasero_track_get_size (BRASERO_TRACK (priv->track), NULL, &bytes);
@@ -257,6 +260,9 @@ brasero_src_image_update (BraseroSrcImage *self)
 
 end:
 
+	if (file)
+		g_object_unref (file);
+
 	g_object_unref (status);
 	if (string) {
 		/* This is hackish and meant to avoid ellipsization to make the



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]