From e60103b0f0a3c3be85545e458c19ea1bc8308fc3 Mon Sep 17 00:00:00 2001 From: bryce Date: Sun, 6 Jan 2008 02:27:07 +0000 Subject: [PATCH] Adds 'Save as SVG' button / dialog to clarify when saving file, that it will be saved as SVG. Patch from Gringer. (Closes LP: #169995) --- src/ui/view/edit-widget.cpp | 6 ++++-- src/widgets/desktop-widget.cpp | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ui/view/edit-widget.cpp b/src/ui/view/edit-widget.cpp index 7bf4fc752..ff8b288fd 100644 --- a/src/ui/view/edit-widget.cpp +++ b/src/ui/view/edit-widget.cpp @@ -1256,7 +1256,7 @@ EditWidget::shutdown() /// name contains markup characters markup = g_strdup_printf( _("The file \"%s\" was saved with a format (%s) that may cause data loss!\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(); diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index 7286ac246..5396ecc24 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -874,7 +874,7 @@ SPDesktopWidget::shutdown() GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, _("The file \"%s\" was saved with a format (%s) that may cause data loss!\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; -- 2.30.2