1.1 --- a/main_win.cc Wed May 02 20:33:58 2007 +0000
1.2 +++ b/main_win.cc Wed Jan 02 21:03:09 2008 +0000
1.3 @@ -20,9 +20,10 @@
1.4 #include <config.h>
1.5 #endif
1.6
1.7 -#include <main_win.h>
1.8 -#include <guipixbufs.h>
1.9 -#include <background_chooser_dialog.h>
1.10 +#include "main_win.h"
1.11 +#include "guipixbufs.h"
1.12 +#include "save_details_dialog.h"
1.13 +#include "background_chooser_dialog.h"
1.14
1.15 #include <mapstorage.h>
1.16 #include <graph_displayer_canvas.h>
1.17 @@ -114,6 +115,8 @@
1.18 sigc::mem_fun(*this, &MainWin::saveFile));
1.19 ag->add( Gtk::Action::create("FileSaveAs", Gtk::Stock::SAVE_AS),
1.20 sigc::mem_fun(*this, &MainWin::saveFileAs));
1.21 + ag->add( Gtk::Action::create("SaveDetails", _("Save _Details...")),
1.22 + sigc::mem_fun(*this, &MainWin::createSaveDetailsDialog));
1.23 ag->add( Gtk::Action::create("Close", Gtk::Stock::CLOSE),
1.24 sigc::mem_fun(*this, &MainWin::closeTab));
1.25 ag->add( Gtk::Action::create("Quit", Gtk::Stock::QUIT),
1.26 @@ -160,13 +163,13 @@
1.27 ag->add( Gtk::RadioAction::create(tool_group, "EditEdgeMap", Gtk::StockID("gd-editlink"), _("Edit edge map")),
1.28 sigc::bind( sigc::mem_fun ( *this, &MainWin::changeEditorialTool ), 4) );
1.29
1.30 - ag->add( Gtk::Action::create("AddMap", Gtk::StockID("gd-newmap")),
1.31 + ag->add( Gtk::Action::create("AddMap", Gtk::StockID("gd-newmap"), "New map"),
1.32 sigc::mem_fun ( *this , &MainWin::createNewMapWin ) );
1.33
1.34 ag->add( Gtk::Action::create("DesignGraph", Gtk::Stock::REFRESH),
1.35 sigc::mem_fun ( *this , &MainWin::reDesignGraph ) );
1.36
1.37 - ag->add( Gtk::Action::create("Eps", Gtk::StockID("gd-eps")),
1.38 + ag->add( Gtk::Action::create("Eps", Gtk::StockID("gd-eps"), "Export to EPS"),
1.39 sigc::mem_fun ( *this , &MainWin::exportToEPS ) );
1.40
1.41 uim=Gtk::UIManager::create();
1.42 @@ -185,6 +188,7 @@
1.43 " <menuitem action='FileClearTab'/>"
1.44 " <menuitem action='FileSave'/>"
1.45 " <menuitem action='FileSaveAs'/>"
1.46 + " <menuitem action='SaveDetails'/>"
1.47 " <menuitem action='Close'/>"
1.48 " <menuitem action='Quit'/>"
1.49 " </menu>"
1.50 @@ -370,7 +374,7 @@
1.51 {
1.52 if(active_tab!=-1)
1.53 {
1.54 - if (tabs[active_tab]->mapstorage->modified)
1.55 + if (tabs[active_tab]->mapstorage->getModified())
1.56 {
1.57 Gtk::MessageDialog mdialog(_("<b>Save changes before closing?</b>"), true,
1.58 Gtk::MESSAGE_WARNING, Gtk::BUTTONS_NONE);
1.59 @@ -628,6 +632,12 @@
1.60 tabs[active_tab]->reDesignGraph();
1.61 }
1.62
1.63 +void MainWin::createSaveDetailsDialog()
1.64 +{
1.65 + SaveDetailsDialog dialog(tabs[active_tab]->mapstorage);
1.66 + dialog.run();
1.67 +}
1.68 +
1.69 void MainWin::exportToEPS()
1.70 {
1.71 if(active_tab!=-1)