main_win.cc
changeset 184 4e8704aae278
parent 174 95872af46fc4
child 190 2cac5b936a2b
     1.1 --- a/main_win.cc	Thu Dec 28 15:31:39 2006 +0000
     1.2 +++ b/main_win.cc	Wed Jan 10 14:37:46 2007 +0000
     1.3 @@ -22,6 +22,7 @@
     1.4  
     1.5  #include "main_win.h"
     1.6  #include "guipixbufs.h"
     1.7 +#include "background_chooser_dialog.h"
     1.8  
     1.9  #include "i18n.h"
    1.10  
    1.11 @@ -113,6 +114,8 @@
    1.12        sigc::mem_fun(*this, &MainWin::zoomFit));
    1.13    ag->add( Gtk::Action::create("ViewZoom100", Gtk::Stock::ZOOM_100),
    1.14        sigc::mem_fun(*this, &MainWin::zoom100));
    1.15 +  ag->add( Gtk::Action::create("SetBackground", _("Set Background...")),
    1.16 +	    sigc::mem_fun(*this, &MainWin::createBackgroundChooser));
    1.17    
    1.18    ag->add( Gtk::Action::create("ShowMenu", _("_Show")) );
    1.19    ag->add( Gtk::Action::create("ShowMaps", _("_Maps")),
    1.20 @@ -173,6 +176,7 @@
    1.21        "      <menuitem action='ViewZoomOut' />"
    1.22        "      <menuitem action='ViewZoom100' />"
    1.23        "      <menuitem action='ViewZoomFit' />"
    1.24 +      "      <menuitem action='SetBackground' />"
    1.25        "    </menu>"
    1.26        "    <menu action='ShowMenu'>"
    1.27        "      <menuitem action='ShowMaps'/>"
    1.28 @@ -580,3 +584,9 @@
    1.29  {
    1.30    tabs[active_tab]->reDesignGraph();
    1.31  }
    1.32 +
    1.33 +void MainWin::createBackgroundChooser()
    1.34 +{
    1.35 +  BackgroundChooserDialog dialog(&(tabs[active_tab]->mapstorage));
    1.36 +  dialog.run();
    1.37 +}