[gthumb/ext] use the parse_name instead of the uri



commit 83c81c4f2d9eea94e709b22074e1a5a0b67e4511
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Oct 11 21:24:44 2009 +0200

    use the parse_name instead of the uri
    
    to make the local paths more readable

 gthumb/gth-browser.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index 65b9942..5b0094b 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -324,17 +324,21 @@ _gth_browser_add_file_menu_item_full (GthBrowser *browser,
 		gtk_menu_shell_insert (GTK_MENU_SHELL (menu), menu_item, position);
 
 	if (action == GTH_ACTION_GO_TO) {
-		char *uri = g_file_get_uri (file);
-		gtk_widget_set_tooltip_text (GTK_WIDGET (menu_item), uri);
+		char *parse_name;
+
+		parse_name = g_file_get_parse_name (file);
+		gtk_widget_set_tooltip_text (GTK_WIDGET (menu_item), parse_name);
 
 		g_object_set_data_full (G_OBJECT (menu_item),
 					"uri",
-					uri,
+					g_file_get_uri (file),
 					(GDestroyNotify) g_free);
 		g_signal_connect (menu_item,
 				  "activate",
 				  G_CALLBACK (activate_go_to_menu_item),
 			  	  browser);
+
+		g_free (parse_name);
 	}
 	else {
 		g_object_set_data (G_OBJECT (menu_item),



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