[gimp] app: Remove GIMP_FILE_EXPORT_TO_URI_KEY



commit 8d61a61c0eb53c0c9e7095afad34a4e3f013faaf
Author: Martin Nordholts <martinn src gnome org>
Date:   Wed Jan 26 20:07:35 2011 +0100

    app: Remove GIMP_FILE_EXPORT_TO_URI_KEY
    
    Remove GIMP_FILE_EXPORT_TO_URI_KEY which is always identical to
    GIMP_FILE_EXPORT_URI_KEY.

 app/actions/file-actions.c           |   14 +++++++-------
 app/actions/file-commands.c          |    2 +-
 app/dialogs/file-save-dialog.c       |    5 -----
 app/display/gimpdisplayshell-title.c |    2 +-
 app/file/gimp-file.h                 |    1 -
 5 files changed, 9 insertions(+), 15 deletions(-)
---
diff --git a/app/actions/file-actions.c b/app/actions/file-actions.c
index 9e15422..372405c 100644
--- a/app/actions/file-actions.c
+++ b/app/actions/file-actions.c
@@ -254,7 +254,7 @@ file_actions_update (GimpActionGroup *group,
   GimpImage    *image          = action_data_get_image (data);
   GimpDrawable *drawable       = NULL;
   const gchar  *source         = NULL;
-  const gchar  *export_to      = NULL;
+  const gchar  *export         = NULL;
   gboolean      show_overwrite = FALSE;
 
   if (image)
@@ -262,8 +262,8 @@ file_actions_update (GimpActionGroup *group,
       drawable  = gimp_image_get_active_drawable (image);
       source    = g_object_get_data (G_OBJECT (image),
                                      GIMP_FILE_IMPORT_SOURCE_URI_KEY);
-      export_to = g_object_get_data (G_OBJECT (image),
-                                     GIMP_FILE_EXPORT_TO_URI_KEY);
+      export    = g_object_get_data (G_OBJECT (image),
+                                     GIMP_FILE_EXPORT_URI_KEY);
     }
 
   show_overwrite =
@@ -280,16 +280,16 @@ file_actions_update (GimpActionGroup *group,
   SET_SENSITIVE ("file-save-as",         image && drawable);
   SET_SENSITIVE ("file-save-a-copy",     image && drawable);
   SET_SENSITIVE ("file-revert",          image && (gimp_image_get_uri (image) || source));
-  SET_SENSITIVE ("file-export-to",       export_to);
-  SET_VISIBLE   ("file-export-to",       export_to || ! show_overwrite);
+  SET_SENSITIVE ("file-export-to",       export);
+  SET_VISIBLE   ("file-export-to",       export || ! show_overwrite);
   SET_SENSITIVE ("file-overwrite",       show_overwrite);
   SET_VISIBLE   ("file-overwrite",       show_overwrite);
   SET_SENSITIVE ("file-export",          image && drawable);
   SET_SENSITIVE ("file-create-template", image);
 
-  if (export_to)
+  if (export)
     {
-      gchar *label = file_actions_create_label (_("Export to %s"), export_to);
+      gchar *label = file_actions_create_label (_("Export to %s"), export);
       gimp_action_group_set_action_label (group, "file-export-to", label);
       g_free (label);
     }
diff --git a/app/actions/file-commands.c b/app/actions/file-commands.c
index 5179d15..e160c68 100644
--- a/app/actions/file-commands.c
+++ b/app/actions/file-commands.c
@@ -289,7 +289,7 @@ file_save_cmd_callback (GtkAction *action,
         GimpPlugInProcedure *export_proc;
 
         uri = g_object_get_data (G_OBJECT (image),
-                                 GIMP_FILE_EXPORT_TO_URI_KEY);
+                                 GIMP_FILE_EXPORT_URI_KEY);
 
         if (!uri)
           {
diff --git a/app/dialogs/file-save-dialog.c b/app/dialogs/file-save-dialog.c
index 1779782..48ffc61 100644
--- a/app/dialogs/file-save-dialog.c
+++ b/app/dialogs/file-save-dialog.c
@@ -231,11 +231,6 @@ file_save_dialog_response (GtkWidget *save_dialog,
               g_object_set_data_full (G_OBJECT (dialog->image),
                                       GIMP_FILE_EXPORT_URI_KEY,
                                       g_strdup (uri), (GDestroyNotify) g_free);
-
-              /* Update 'Export to' to the last exported URI */
-              g_object_set_data_full (G_OBJECT (dialog->image),
-                                      GIMP_FILE_EXPORT_TO_URI_KEY,
-                                      g_strdup (uri), (GDestroyNotify) g_free);
             }
 
           g_object_set_data_full (G_OBJECT (dialog->image->gimp),
diff --git a/app/display/gimpdisplayshell-title.c b/app/display/gimpdisplayshell-title.c
index 5dfe162..487228c 100644
--- a/app/display/gimpdisplayshell-title.c
+++ b/app/display/gimpdisplayshell-title.c
@@ -499,7 +499,7 @@ gimp_display_shell_format_filename (gchar       *buf,
     {
       gboolean is_exported;
       is_exported = (g_object_get_data (G_OBJECT (image),
-                                        GIMP_FILE_EXPORT_TO_URI_KEY) != NULL);
+                                        GIMP_FILE_EXPORT_URI_KEY) != NULL);
       if (is_exported)
         export_status = _(" (exported)");
       else if (is_imported)
diff --git a/app/file/gimp-file.h b/app/file/gimp-file.h
index 072f0c5..351e5f6 100644
--- a/app/file/gimp-file.h
+++ b/app/file/gimp-file.h
@@ -29,7 +29,6 @@
 /* Data keys for GimpImage */
 #define GIMP_FILE_EXPORT_URI_KEY        "gimp-file-export-uri"
 #define GIMP_FILE_SAVE_A_COPY_URI_KEY   "gimp-file-save-a-copy-uri"
-#define GIMP_FILE_EXPORT_TO_URI_KEY     "gimp-file-export-to-uri"
 #define GIMP_FILE_IMPORT_SOURCE_URI_KEY "gimp-file-import-source-uri"
 
 



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