Code

Adds 'Save as SVG' button / dialog to clarify when saving file, that it
authorbryce <bryce@users.sourceforge.net>
Sun, 6 Jan 2008 02:27:07 +0000 (02:27 +0000)
committerbryce <bryce@users.sourceforge.net>
Sun, 6 Jan 2008 02:27:07 +0000 (02:27 +0000)
will be saved as SVG.  Patch from Gringer.  (Closes LP: #169995)

src/ui/view/edit-widget.cpp
src/widgets/desktop-widget.cpp

index 7bf4fc752b7db2d829e6cd343eed6512abb95f1e..ff8b288fdc2dc2881dafe60b47b8d8418939a828 100644 (file)
@@ -1256,7 +1256,7 @@ EditWidget::shutdown()
         /// name contains markup characters
         markup = g_strdup_printf(
                 _("<span weight=\"bold\" size=\"larger\">The file \"%s\" was saved with a format (%s) that may cause data loss!</span>\n\n"
-                  "Do you want to save this file in another format?"),
+                  "Do you want to save this file as an Inkscape SVG?"),
                 SP_DOCUMENT_NAME(doc),
                 Inkscape::Extension::db.get(sp_document_repr_root(doc)->attribute("inkscape:output_extension"))->get_name());
 
@@ -1270,8 +1270,10 @@ EditWidget::shutdown()
         Gtk::Button close_button (_("Close _without saving"), true);
         dlg.add_action_widget (close_button, Gtk::RESPONSE_NO);
         close_button.show();
+        Gtk::Button save_button (_("_Save as SVG"), true);
         dlg.add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
-        dlg.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_YES);
+        dlg.add_action_widget (save_button, Gtk::RESPONSE_YES);
+        save_button.show();
         dlg.set_default_response (Gtk::RESPONSE_YES);
 
         int response = dlg.run();
index 7286ac246f1acdf4f780fb4a7cbb6b9fc1df44f1..5396ecc24f6ba9155486811648ddad9d21e2fc3c 100644 (file)
@@ -874,7 +874,7 @@ SPDesktopWidget::shutdown()
                 GTK_MESSAGE_WARNING,
                 GTK_BUTTONS_NONE,
                 _("<span weight=\"bold\" size=\"larger\">The file \"%s\" was saved with a format (%s) that may cause data loss!</span>\n\n"
-                  "Do you want to save this file in another format?"),
+                  "Do you want to save this file as an Inkscape SVG?"),
                 SP_DOCUMENT_NAME(doc),
                 Inkscape::Extension::db.get(sp_document_repr_root(doc)->attribute("inkscape:output_extension"))->get_name());
             // fix for bug 1767940:
@@ -883,10 +883,13 @@ SPDesktopWidget::shutdown()
             GtkWidget *close_button;
             close_button = gtk_button_new_with_mnemonic(_("Close _without saving"));
             gtk_widget_show(close_button);
+            GtkWidget *save_button;
+            save_button = gtk_button_new_with_mnemonic(_("_Save as SVG"));
+            gtk_widget_show(save_button);
             gtk_dialog_add_action_widget(GTK_DIALOG(dialog), close_button, GTK_RESPONSE_NO);
 
             gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
-            gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_SAVE, GTK_RESPONSE_YES);
+            gtk_dialog_add_action_widget(GTK_DIALOG(dialog), save_button, GTK_RESPONSE_YES);
             gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_YES);
 
             gint response;