gui/main_win.cc
changeset 1598 739df601808d
parent 1592 4708b716d2f4
child 1601 70d169a8313a
     1.1 --- a/gui/main_win.cc	Wed Jul 27 11:35:13 2005 +0000
     1.2 +++ b/gui/main_win.cc	Thu Jul 28 14:31:32 2005 +0000
     1.3 @@ -1,11 +1,8 @@
     1.4  #include <main_win.h>
     1.5  
     1.6  MainWin::MainWin(const std::string& title, Graph & graph, CoordinatesMap & cm,
     1.7 -    MapStorage & ms):mapwin("Map Setup", ms, gd_canvas),editwin("Editorial Window", gd_canvas),newmapwin("Creating new map",gd_canvas),gd_canvas(graph, cm, ms, &mapwin)
     1.8 +    MapStorage & ms):mapwin("Map Setup", ms, gd_canvas),newmapwin("Creating new map",gd_canvas),gd_canvas(graph, cm, ms, &mapwin)
     1.9  {
    1.10 -  //Creating a window for setting new maps.
    1.11 -//   newmapwin=new NewMapWi("Creating new map",*this);
    1.12 -
    1.13  
    1.14    set_title (title);
    1.15    set_default_size(WIN_WIDTH,WIN_HEIGHT);
    1.16 @@ -23,7 +20,7 @@
    1.17    ag->add( Gtk::Action::create("FileSaveAs", Gtk::Stock::SAVE_AS),
    1.18        sigc::mem_fun(*this, &MainWin::saveFileAs));
    1.19    ag->add( Gtk::Action::create("FileQuit", Gtk::Stock::QUIT),
    1.20 -      sigc::mem_fun(*this, &MainWin::quit));
    1.21 +      sigc::mem_fun(*this, &MainWin::hide));
    1.22  
    1.23    ag->add( Gtk::Action::create("ViewMenu", "_View") );
    1.24    ag->add( Gtk::Action::create("ViewZoomIn", Gtk::Stock::ZOOM_IN),
    1.25 @@ -37,9 +34,7 @@
    1.26    
    1.27    ag->add( Gtk::Action::create("ShowMenu", "_Show") );
    1.28    ag->add( Gtk::Action::create("ShowMaps", "_Maps"),
    1.29 -      sigc::mem_fun(*this, &MainWin::showMaps));
    1.30 -  ag->add( Gtk::Action::create("ShowEditorials", "_Editorials"),
    1.31 -      sigc::mem_fun(*this, &MainWin::showEditorials));
    1.32 +      sigc::mem_fun(this->mapwin, &MapWin::show));
    1.33  
    1.34    ag->add( Gtk::Action::create("CreateNode", Gtk::Stock::NO),
    1.35        sigc::bind( sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::changeEditorialTool ), 1) );
    1.36 @@ -81,7 +76,6 @@
    1.37        "    </menu>"
    1.38        "    <menu action='ShowMenu'>"
    1.39        "      <menuitem action='ShowMaps'/>"
    1.40 -      "      <menuitem action='ShowEditorials'/>"
    1.41        "    </menu>"
    1.42        "  </menubar>"
    1.43        "  <toolbar name='ToolBar'>"
    1.44 @@ -132,21 +126,6 @@
    1.45    show_all_children();
    1.46  }
    1.47  
    1.48 -void MainWin::showMaps()
    1.49 -{
    1.50 -  mapwin.show();
    1.51 -}
    1.52 -
    1.53 -void MainWin::showEditorials()
    1.54 -{
    1.55 -  editwin.show();
    1.56 -}
    1.57 -
    1.58 -void MainWin::quit()
    1.59 -{
    1.60 -  hide();
    1.61 -}
    1.62 -
    1.63  void MainWin::newFile()
    1.64  {
    1.65    std::cerr << "MainWin::newFile(): not yet implemented" << std::endl;