[gimp] app: Put "[<filename>] (imported)" in window title for imported files



commit ed9c12d1e7a7462af1747ba9b50c35781beaadec
Author: Martin Nordholts <martinn src gnome org>
Date:   Thu Jul 2 20:46:52 2009 +0200

    app: Put "[<filename>] (imported)" in window title for imported files
    
    Put "[<filename>] (imported)" in window title for imported files
    instead of "Untitled (imported from <filename>)".

 app/display/gimpdisplayshell-title.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-title.c b/app/display/gimpdisplayshell-title.c
index ab2da0a..8c4220e 100644
--- a/app/display/gimpdisplayshell-title.c
+++ b/app/display/gimpdisplayshell-title.c
@@ -445,15 +445,17 @@ gimp_display_shell_format_filename (gchar       *buf,
                                            GIMP_FILE_IMPORT_SOURCE_URI_KEY);
   if (source)
     {
-      gchar *source_basename = file_utils_uri_display_basename (source);
+      gchar *source_no_ext   = file_utils_uri_with_new_ext (source, NULL);
+      gchar *source_basename = file_utils_uri_display_basename (source_no_ext);
       gint   incr;
 
       incr = print (buf, len, start,
-                    /*  image name and source as shown in the title of
+                    /*  image import source as shown in the title of
                         the image window */
-                    _("%s (imported from %s)"), filename, source_basename);
+                    _("[%s] (imported)"), source_basename);
 
       g_free (source_basename);
+      g_free (source_no_ext);
 
       return incr;
     }



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