nbtab.cc
changeset 187 b465e2c34f23
parent 184 4e8704aae278
child 191 af2ed974ab68
equal deleted inserted replaced
13:7adf8a1f6bd6 14:638c7318eea1
    15  * purpose.
    15  * purpose.
    16  *
    16  *
    17  */
    17  */
    18 
    18 
    19 #include <nbtab.h>
    19 #include <nbtab.h>
    20 #include "file_chooser_extra_widget.h"
       
    21 
    20 
    22 NoteBookTab::NoteBookTab():mapwinexists(false), designwinexists(false), mapstorage(*this)
    21 NoteBookTab::NoteBookTab():mapwinexists(false), designwinexists(false), mapstorage(*this)
    23 {
    22 {
    24   Gtk::ScrolledWindow *pScrolledWindow = manage(new Gtk::ScrolledWindow);
    23   Gtk::ScrolledWindow *pScrolledWindow = manage(new Gtk::ScrolledWindow);
    25   gd_canvas=new GraphDisplayerCanvas(*this);
    24   gd_canvas=new GraphDisplayerCanvas(*this);
   134 void NoteBookTab::saveFileAs()
   133 void NoteBookTab::saveFileAs()
   135 {
   134 {
   136   Gtk::FileChooserDialog fcdialog("Save File", Gtk::FILE_CHOOSER_ACTION_SAVE);
   135   Gtk::FileChooserDialog fcdialog("Save File", Gtk::FILE_CHOOSER_ACTION_SAVE);
   137   fcdialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
   136   fcdialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
   138   fcdialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
   137   fcdialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
   139   FileChooserExtraWidget w(&mapstorage);
       
   140   fcdialog.set_extra_widget(w);
       
   141   if (fcdialog.run() == Gtk::RESPONSE_ACCEPT)
   138   if (fcdialog.run() == Gtk::RESPONSE_ACCEPT)
   142   {
   139   {
   143     Glib::ustring filename = fcdialog.get_filename();
   140     Glib::ustring filename = fcdialog.get_filename();
   144     mapstorage.file_name = filename;
   141     mapstorage.file_name = filename;
   145     mapstorage.writeToFile(filename);
   142     mapstorage.writeToFile(filename);