76 if (!g_file_test(filename.c_str(), G_FILE_TEST_EXISTS)) {
80 auto const basename = Glib::filename_to_utf8(Glib::path_get_basename(filename));
81 auto const dirname = Glib::filename_to_utf8(Glib::path_get_dirname(filename));
82 auto const msg = Glib::ustring::compose(_(
"<span weight=\"bold\" size=\"larger\">A file named \"%1\" already exists. Do you want to replace it?</span>\n\n"
83 "The file already exists in \"%2\". Replacing it will overwrite its contents."),
86 auto window = SP_ACTIVE_DESKTOP->getInkscapeWindow();
87 auto dlg = Gtk::MessageDialog(*window,
msg,
true, Gtk::MessageType::QUESTION, Gtk::ButtonsType::NONE);
88 dlg.add_button(_(
"_Cancel"), Gtk::ResponseType::NO);
89 dlg.add_button(_(
"Replace"), Gtk::ResponseType::YES);
90 dlg.set_default_response(Gtk::ResponseType::YES);