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

This commit is contained in:
Michael Natterer
2012-05-05 00:17:51 +02:00
parent 862865e379
commit 4c66e50763

View File

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