[gimp: 1/27] app: Rearrange menu items for Save + export



commit c1a226bc749dea0d9a59fe01e0e5d78a7efd5166
Author: Martin Nordholts <martinn src gnome org>
Date:   Thu Apr 23 18:59:40 2009 +0200

    app: Rearrange menu items for Save + export
    
    Begin implementing the spec
    http://gui.gimp.org/index.php/Save_+_export_specification
    by rearranging the menu items according to it and adding necessary
    stuff like help ids.
---
 app/actions/actions-types.h |    4 +++-
 app/actions/file-actions.c  |   14 +++++++++++++-
 app/actions/file-commands.c |    5 +++++
 app/widgets/gimphelp-ids.h  |    4 +++-
 menus/image-menu.xml.in     |    7 ++++++-
 5 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/app/actions/actions-types.h b/app/actions/actions-types.h
index 055df4d..846bcd3 100644
--- a/app/actions/actions-types.h
+++ b/app/actions/actions-types.h
@@ -44,7 +44,9 @@ typedef enum
   GIMP_SAVE_MODE_SAVE,
   GIMP_SAVE_MODE_SAVE_AS,
   GIMP_SAVE_MODE_SAVE_A_COPY,
-  GIMP_SAVE_MODE_SAVE_AND_CLOSE
+  GIMP_SAVE_MODE_SAVE_AND_CLOSE,
+  GIMP_SAVE_MODE_EXPORT,
+  GIMP_SAVE_MODE_EXPORT_TO
 } GimpSaveMode;
 
 
diff --git a/app/actions/file-actions.c b/app/actions/file-actions.c
index 62c63f0..28e6003 100644
--- a/app/actions/file-actions.c
+++ b/app/actions/file-actions.c
@@ -135,7 +135,19 @@ static const GimpEnumActionEntry file_save_actions[] =
     NC_("file-action", "Save and Close..."), NULL,
     NC_("file-action", "Save this image and close its window"),
     GIMP_SAVE_MODE_SAVE_AND_CLOSE, FALSE,
-    GIMP_HELP_FILE_SAVE }
+    GIMP_HELP_FILE_SAVE },
+
+  { "file-export", NULL,
+    NC_("file-action", "Export..."), NULL,
+    NC_("file-action", "Export the image to various file formats such as .png or .jpg"),
+    GIMP_SAVE_MODE_EXPORT, FALSE,
+    GIMP_HELP_FILE_EXPORT },
+
+  { "file-export-to", NULL,
+    NC_("file-action", "Export to"), NULL,
+    NC_("file-action", "Export the image back to the import source in the import format"),
+    GIMP_SAVE_MODE_EXPORT_TO, FALSE,
+    GIMP_HELP_FILE_EXPORT_TO }
 };
 
 void
diff --git a/app/actions/file-commands.c b/app/actions/file-commands.c
index 0c36020..796c4ee 100644
--- a/app/actions/file-commands.c
+++ b/app/actions/file-commands.c
@@ -272,6 +272,11 @@ file_save_cmd_callback (GtkAction *action,
                              _("Save a Copy of the Image"), TRUE,
                              FALSE);
       break;
+
+    case GIMP_SAVE_MODE_EXPORT:
+    case GIMP_SAVE_MODE_EXPORT_TO:
+      /* TODO */
+      break;
     }
 
   if (save_mode == GIMP_SAVE_MODE_SAVE_AND_CLOSE &&
diff --git a/app/widgets/gimphelp-ids.h b/app/widgets/gimphelp-ids.h
index d94acc7..22ebe0e 100644
--- a/app/widgets/gimphelp-ids.h
+++ b/app/widgets/gimphelp-ids.h
@@ -33,8 +33,10 @@
 #define GIMP_HELP_FILE_SAVE                       "gimp-file-save"
 #define GIMP_HELP_FILE_SAVE_AS                    "gimp-file-save-as"
 #define GIMP_HELP_FILE_SAVE_A_COPY                "gimp-file-save-a-copy"
-#define GIMP_HELP_FILE_SAVE_AS_TEMPLATE           "gimp-file-save-as-template"
 #define GIMP_HELP_FILE_SAVE_BY_EXTENSION          "gimp-file-save-by-extension"
+#define GIMP_HELP_FILE_EXPORT                     "gimp-file-export"
+#define GIMP_HELP_FILE_EXPORT_TO                  "gimp-file-export-to"
+#define GIMP_HELP_FILE_SAVE_AS_TEMPLATE           "gimp-file-save-as-template"
 #define GIMP_HELP_FILE_REVERT                     "gimp-file-revert"
 #define GIMP_HELP_FILE_CLOSE                      "gimp-file-close"
 #define GIMP_HELP_FILE_CLOSE_ALL                  "gimp-file-close-all"
diff --git a/menus/image-menu.xml.in b/menus/image-menu.xml.in
index 2407f3f..ffd13a1 100644
--- a/menus/image-menu.xml.in
+++ b/menus/image-menu.xml.in
@@ -40,10 +40,15 @@
 	<menuitem action="file-save" />
 	<menuitem action="file-save-as" />
 	<menuitem action="file-save-a-copy" />
-	<menuitem action="file-save-as-template" />
       </placeholder>
       <menuitem action="file-revert" />
       <separator />
+      <placeholder name="Export">
+	<menuitem action="file-export" />
+	<menuitem action="file-export-to" />
+      </placeholder>
+      <menuitem action="file-save-as-template" />
+      <separator />
       <placeholder name="Send" />
       <separator />
       <placeholder name="Info" />



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