[gimp] app: Update default export filename precedences



commit 531c3d6253a4147ded270f6564ed1128f5506315
Author: Martin Nordholts <martinn src gnome org>
Date:   Mon Sep 14 23:23:10 2009 +0200

    app: Update default export filename precedences
    
    Update export filename priorities according to changes in spec. Also
    consistently use GIMP_FILE_EXPORT_URI_KEY instead of
    GIMP_FILE_EXPORT_TO_URI_KEY. They have the same value.

 app/widgets/gimpfiledialog.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/app/widgets/gimpfiledialog.c b/app/widgets/gimpfiledialog.c
index 349d724..ce0eea5 100644
--- a/app/widgets/gimpfiledialog.c
+++ b/app/widgets/gimpfiledialog.c
@@ -558,7 +558,7 @@ gimp_file_dialog_set_save_image (GimpFileDialog *dialog,
 
       if (! name_uri)
         name_uri = g_object_get_data (G_OBJECT (image),
-                                      GIMP_FILE_EXPORT_TO_URI_KEY);
+                                      GIMP_FILE_EXPORT_URI_KEY);
 
       if (! name_uri)
         name_uri = g_object_get_data (G_OBJECT (image),
@@ -620,8 +620,8 @@ gimp_file_dialog_set_save_image (GimpFileDialog *dialog,
       /* Priority of default basenames for Export:
        *
        *   1. Last Export name
-       *   2. Source file name
        *   3. Save URI
+       *   2. Source file name
        *   3. 'Untitled'
        */
 
@@ -629,15 +629,11 @@ gimp_file_dialog_set_save_image (GimpFileDialog *dialog,
                                     GIMP_FILE_EXPORT_URI_KEY);
 
       if (! name_uri)
-        name_uri = g_object_get_data (G_OBJECT (image),
-                                      GIMP_FILE_IMPORT_SOURCE_URI_KEY);
+        name_uri = gimp_object_get_name (image);
 
       if (! name_uri)
         name_uri = g_object_get_data (G_OBJECT (image),
-                                      GIMP_FILE_EXPORT_TO_URI_KEY);
-
-      if (! name_uri)
-        name_uri = gimp_object_get_name (image);
+                                      GIMP_FILE_IMPORT_SOURCE_URI_KEY);
 
       if (! name_uri)
         name_uri = gimp_image_get_uri (image); /* Untitled */



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