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.
This commit is contained in:
Martin Nordholts 2011-01-26 20:07:35 +01:00
parent d449317501
commit 8d61a61c0e
5 changed files with 9 additions and 15 deletions

View file

@ -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);
}

View file

@ -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)
{

View file

@ -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),

View file

@ -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)

View file

@ -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"