- Correctly manage file extensions in load/save dialogs. I couldn`t find a way to automagically add the extension on file save. It`s just too much of an hassle to do it by hand, isn`t it?
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@989 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
f617c51a87
commit
4b3cce6bea
|
@ -112,7 +112,7 @@ void XMLSerializer::restore_snapshot(const Glib::ustring& filename, History& his
|
|||
|
||||
const Glib::ustring XMLSerializer::get_filename_extension()
|
||||
{
|
||||
return Glib::ustring("xsgp");
|
||||
return Glib::ustring("xgp");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ GuiBuilder::on_file_open_activate()
|
|||
Serializer* ser = *iter;
|
||||
Gtk::FileFilter filter_sgpem;
|
||||
filter_sgpem.set_name(ser->get_filename_description());
|
||||
filter_sgpem.add_pattern(ser->get_filename_extension());
|
||||
filter_sgpem.add_pattern(Glib::ustring("*.") + ser->get_filename_extension());
|
||||
dialog.add_filter(filter_sgpem);
|
||||
}
|
||||
|
||||
|
@ -166,8 +166,8 @@ GuiBuilder::on_file_saveas_activate()
|
|||
|
||||
//Add filters, so that only certain file types can be selected:
|
||||
Gtk::FileFilter filter_sgpem;
|
||||
filter_sgpem.set_name("Sgpem files");
|
||||
filter_sgpem.add_pattern("*.xgp");
|
||||
filter_sgpem.set_name(serializer.get_filename_description());
|
||||
filter_sgpem.add_pattern(Glib::ustring("*.") + serializer.get_filename_extension());
|
||||
dialog.add_filter(filter_sgpem);
|
||||
|
||||
Gtk::FileFilter filter_any;
|
||||
|
|
Loading…
Reference in New Issue