X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Finstance.cpp;h=a67d7f7274bdaccc3143e02f1f92cafceec39676;hb=c8c1b343552d96b93ce9319ac24f009922197cd3;hp=da88e80a9be6f247c17977f1bc23e66eff48e130;hpb=90a8e832d9ebf093fae1b01a07011d873c323dc5;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/instance.cpp b/synfig-studio/trunk/src/gtkmm/instance.cpp index da88e80..a67d7f7 100644 --- a/synfig-studio/trunk/src/gtkmm/instance.cpp +++ b/synfig-studio/trunk/src/gtkmm/instance.cpp @@ -185,17 +185,6 @@ Instance::set_redo_status(bool x) } bool -studio::Instance::save_as(const synfig::String &file_name)const -{ - if(synfigapp::Instance::save_as(file_name)) - { - App::add_recent_file(file_name); - return true; - } - return false; -} - -bool studio::Instance::save_as(const synfig::String &file_name) { if(synfigapp::Instance::save_as(file_name)) @@ -253,20 +242,21 @@ studio::Instance::dialog_save_as() } // show the canvas' name if it has one, else its ID - while(App::dialog_saveas_file(_("Choose a Filename to Save As") + - String(" (") + - (canvas->get_name().empty() - ? canvas->get_id() - : canvas->get_name()) + - ") ...", filename)) + while(App::dialog_save_file(_("Choose a Filename to Save As") + + String(" (") + + (canvas->get_name().empty() + ? canvas->get_id() + : canvas->get_name()) + + ") ...", filename)) { // If the filename still has wildcards, then we should // continue looking for the file we want if(find(filename.begin(),filename.end(),'*')!=filename.end()) continue; - if(find(filename.begin(),filename.end(),'.')==filename.end()) - filename+=".sif"; + std::string base = basename(filename); + if(find(base.begin(),base.end(),'.')==base.end()) + filename+=".sifz"; try { @@ -623,7 +613,7 @@ bool Instance::safe_revert() { if(synfigapp::Instance::get_action_count()) - if(!App::dialog_yes_no(_("Revert to saved"), _("You will loose any changes you have made since your last save.\nAre you sure?"))) + if(!App::dialog_yes_no(_("Revert to saved"), _("You will lose any changes you have made since your last save.\nAre you sure?"))) return false; revert(); return true;