- Re-enable loading of saved files
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@954 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
9e61332a12
commit
73c66c12d3
|
@ -46,6 +46,7 @@
|
|||
#include <gtkmm/main.h>
|
||||
#include <gtkmm/menuitem.h>
|
||||
#include <gtkmm/scrolledwindow.h>
|
||||
#include <gtkmm/statusbar.h>
|
||||
#include <gtkmm/stock.h>
|
||||
|
||||
#include <cassert>
|
||||
|
@ -103,9 +104,9 @@ GuiBuilder::on_file_open_activate()
|
|||
int result = dialog.run();
|
||||
if(result==Gtk::RESPONSE_OK)
|
||||
{
|
||||
// DISABLED - Actually locks computer
|
||||
// serializer.restore_snapshot("prova1.xgp", history);
|
||||
msg = "File: " + dialog.get_filename() + " loaded.";
|
||||
Glib::ustring filename = dialog.get_filename();
|
||||
serializer.restore_snapshot(filename, history);
|
||||
msg = "File: " + filename + " loaded.";
|
||||
} // end - if(result==Gtk::RESPONSE_OK)
|
||||
|
||||
}
|
||||
|
@ -119,8 +120,8 @@ GuiBuilder::on_file_open_activate()
|
|||
}
|
||||
if(!msg.empty())
|
||||
{
|
||||
Gtk::MessageDialog msg_dialog(get_initial_window(), msg);
|
||||
msg_dialog.run();
|
||||
Gtk::Statusbar* sbar = _refXml->get_widget("MainStatusBar", sbar);
|
||||
sbar->push(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -168,7 +169,6 @@ GuiBuilder::on_file_saveas_activate()
|
|||
int result = dialog.run();
|
||||
if(result==Gtk::RESPONSE_OK)
|
||||
{
|
||||
// DISABLED - Actually locks computer
|
||||
serializer.save_snapshot(dialog.get_filename(), history);
|
||||
msg = "File: " + dialog.get_filename() + " saved.";
|
||||
} // end - if(result==Gtk::RESPONSE_OK)
|
||||
|
@ -182,11 +182,14 @@ GuiBuilder::on_file_saveas_activate()
|
|||
{
|
||||
msg = _("ERROR: ") + Glib::ustring(e.what());
|
||||
}
|
||||
|
||||
if(!msg.empty())
|
||||
{
|
||||
Gtk::MessageDialog msg_dialog(get_initial_window(), msg);
|
||||
msg_dialog.run();
|
||||
Gtk::Statusbar* sbar = _refXml->get_widget("MainStatusBar", sbar);
|
||||
sbar->push(msg);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
GuiBuilder::GuiBuilder(const std::string& gladefile)
|
||||
|
|
Loading…
Reference in New Issue