app: make sure Ctrl+E doesn't invoke "Export to" when it's invisible

(cherry picked from commit 4c66e50763)
This commit is contained in:
Michael Natterer
2012-05-05 00:17:51 +02:00
parent af0687eb82
commit a4beeecf2b

View File

@ -261,9 +261,9 @@ file_actions_update (GimpActionGroup *group,
if (image)
{
drawable = gimp_image_get_active_drawable (image);
source = gimp_image_get_imported_uri (image);
export = gimp_image_get_exported_uri (image);
drawable = gimp_image_get_active_drawable (image);
source = gimp_image_get_imported_uri (image);
export = gimp_image_get_exported_uri (image);
}
show_overwrite =
@ -280,7 +280,7 @@ file_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("file-save-as", drawable);
SET_SENSITIVE ("file-save-a-copy", drawable);
SET_SENSITIVE ("file-revert", image && (gimp_image_get_uri (image) || source));
SET_SENSITIVE ("file-export-to", drawable);
SET_SENSITIVE ("file-export-to", drawable && ! show_overwrite);
SET_VISIBLE ("file-export-to", ! show_overwrite);
SET_SENSITIVE ("file-overwrite", show_overwrite);
SET_VISIBLE ("file-overwrite", show_overwrite);
@ -307,7 +307,7 @@ file_actions_update (GimpActionGroup *group,
}
/* needed for the empty display */
SET_SENSITIVE ("file-close-all", image);
SET_SENSITIVE ("file-close-all", image);
#undef SET_SENSITIVE
}