Index: gui/main_win.cc
===================================================================
--- gui/main_win.cc	(revision 1823)
+++ gui/main_win.cc	(revision 1837)
@@ -2,12 +2,15 @@
 #include "icons/guipixbufs.h"
 
-MainWin::MainWin() :
-  mapwin("Map Setup", mapstorage, gd_canvas),
-  gd_canvas(mapstorage, mapwin, (Gtk::Window *)this)
-{
+MainWin::MainWin()
+{
+  mapwin=new MapWin("Map Setup", mapstorage.getEdgeMapList(), mapstorage.getNodeMapList(), *this);
+  gd_canvas=new GraphDisplayerCanvas(*this);
+
   set_title ("unsaved file - " + prog_name);
   set_default_size(WIN_WIDTH,WIN_HEIGHT);
   add(vbox);
 
+  //connecting signals - controller character
+  mapstorage.signal_prop_ch().connect(sigc::mem_fun(*gd_canvas, &GraphDisplayerCanvas::propertyChange));
 
   // custom icons for the toolbar
@@ -93,33 +96,33 @@
   ag->add( Gtk::Action::create("ViewMenu", "_View") );
   ag->add( Gtk::Action::create("ViewZoomIn", Gtk::Stock::ZOOM_IN),
-      sigc::mem_fun(this->gd_canvas, &GraphDisplayerCanvas::zoomIn));
+      sigc::mem_fun(*(this->gd_canvas), &GraphDisplayerCanvas::zoomIn));
   ag->add( Gtk::Action::create("ViewZoomOut", Gtk::Stock::ZOOM_OUT),
-      sigc::mem_fun(this->gd_canvas, &GraphDisplayerCanvas::zoomOut));
+      sigc::mem_fun(*(this->gd_canvas), &GraphDisplayerCanvas::zoomOut));
   ag->add( Gtk::Action::create("ViewZoomFit", Gtk::Stock::ZOOM_FIT),
-      sigc::mem_fun(this->gd_canvas, &GraphDisplayerCanvas::zoomFit));
+      sigc::mem_fun(*(this->gd_canvas), &GraphDisplayerCanvas::zoomFit));
   ag->add( Gtk::Action::create("ViewZoom100", Gtk::Stock::ZOOM_100),
-      sigc::mem_fun(this->gd_canvas, &GraphDisplayerCanvas::zoom100));
+      sigc::mem_fun(*(this->gd_canvas), &GraphDisplayerCanvas::zoom100));
   
   ag->add( Gtk::Action::create("ShowMenu", "_Show") );
   ag->add( Gtk::Action::create("ShowMaps", "_Maps"),
-      sigc::mem_fun(this->mapwin, &MapWin::show));
+      sigc::mem_fun(*(this->mapwin), &MapWin::show));
 
   Gtk::RadioAction::Group tool_group;
   ag->add( Gtk::RadioAction::create(tool_group, "MoveItem", Gtk::StockID("gd-move"), "Move"),
-      sigc::bind( sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::changeEditorialTool ), 0) );
+      sigc::bind( sigc::mem_fun ( *(this->gd_canvas), &GraphDisplayerCanvas::changeEditorialTool ), 0) );
   ag->add( Gtk::RadioAction::create(tool_group, "CreateNode", Gtk::StockID("gd-addnode"), "Create node"),
-      sigc::bind( sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::changeEditorialTool ), 1) );
+      sigc::bind( sigc::mem_fun ( *(this->gd_canvas), &GraphDisplayerCanvas::changeEditorialTool ), 1) );
   ag->add( Gtk::RadioAction::create(tool_group, "CreateEdge", Gtk::StockID("gd-addlink"), "Create edge"),
-      sigc::bind( sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::changeEditorialTool ), 2) );
+      sigc::bind( sigc::mem_fun ( *(this->gd_canvas), &GraphDisplayerCanvas::changeEditorialTool ), 2) );
   ag->add( Gtk::RadioAction::create(tool_group, "EraseItem", Gtk::StockID("gd-delete"), "Delete"),
-      sigc::bind( sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::changeEditorialTool ), 3) );
+      sigc::bind( sigc::mem_fun ( *(this->gd_canvas), &GraphDisplayerCanvas::changeEditorialTool ), 3) );
 
   ag->add( Gtk::RadioAction::create(tool_group, "EditEdgeMap", Gtk::StockID("gd-editlink"), "Edit edge map"),
-      sigc::bind( sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::changeEditorialTool ), 4) );
+      sigc::bind( sigc::mem_fun ( *(this->gd_canvas), &GraphDisplayerCanvas::changeEditorialTool ), 4) );
   ag->add( Gtk::RadioAction::create(tool_group, "EditNodeMap", Gtk::StockID("gd-editnode"), "Edit node map"),
-      sigc::bind( sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::changeEditorialTool ), 5) );
+      sigc::bind( sigc::mem_fun ( *(this->gd_canvas), &GraphDisplayerCanvas::changeEditorialTool ), 5) );
 
   ag->add( Gtk::Action::create("AddMap", Gtk::StockID("gd-newmap")),
-      sigc::mem_fun (new NewMapWin("NewMapWin", gd_canvas), &NewMapWin::show ) );
+      sigc::mem_fun (new NewMapWin("NewMapWin", *this), &NewMapWin::show ) );
 
   uim=Gtk::UIManager::create();
@@ -195,5 +198,5 @@
   Gtk::ScrolledWindow* pScrolledWindow = manage(new Gtk::ScrolledWindow());
   pScrolledWindow->set_shadow_type(Gtk::SHADOW_IN);
-  pScrolledWindow->add(gd_canvas);
+  pScrolledWindow->add(*gd_canvas);
   vbox.pack_start(*pScrolledWindow);
 
@@ -209,6 +212,6 @@
   mapstorage.file_name = file;
   mapstorage.modified = false;
-  gd_canvas.drawGraph();
-  mapwin.update();
+  gd_canvas->drawGraph();
+  mapwin->update(mapstorage.getEdgeMapList(), mapstorage.getNodeMapList());
   set_title(Glib::filename_display_basename(file) + " - " + prog_name);
 }
@@ -234,7 +237,7 @@
     }
   }
-  gd_canvas.clear();
+  gd_canvas->clear();
   mapstorage.clear();
-  mapwin.update();
+  mapwin->update(mapstorage.getEdgeMapList(), mapstorage.getNodeMapList());
   set_title("unsaved file - " + prog_name);
 }
@@ -265,5 +268,5 @@
   if (fcdialog.run() == Gtk::RESPONSE_ACCEPT)
   {
-    gd_canvas.clear();
+    gd_canvas->clear();
     mapstorage.clear();
     Glib::ustring filename = fcdialog.get_filename();
@@ -272,6 +275,6 @@
       mapstorage.file_name = filename;
       mapstorage.modified = false;
-      gd_canvas.drawGraph();
-      mapwin.update();
+      gd_canvas->drawGraph();
+      mapwin->update(mapstorage.getEdgeMapList(), mapstorage.getNodeMapList());
       set_title(Glib::filename_display_basename(filename) + " - " + prog_name);
     }
@@ -328,7 +331,38 @@
     }
   }
-  gd_canvas.clear();
+  gd_canvas->clear();
   mapstorage.clear();
-  mapwin.update();
+  mapwin->update(mapstorage.getEdgeMapList(), mapstorage.getNodeMapList());
   set_title("unsaved file - " + prog_name);
 }
+
+void MainWin::propertyChange(bool itisedge, int prop, std::string mapname)
+{
+  mapstorage.changeActiveMap(itisedge, prop, mapname);
+}
+
+void MainWin::popupNewMapWin(bool itisedge, int prop)
+{
+  prop=prop;
+  (new NewMapWin("NewMapWin", *this, itisedge, false))->run();
+}
+
+std::string MainWin::getActiveEdgeMap(int prop)
+{
+  return mapstorage.getActiveEdgeMap(prop);
+}
+
+std::string MainWin::getActiveNodeMap(int prop)
+{
+  return mapstorage.getActiveNodeMap(prop);
+}
+
+void MainWin::registerNewEdgeMap(std::string mapname)
+{
+  mapwin->registerNewEdgeMap(mapname);
+}
+
+void MainWin::registerNewNodeMap(std::string mapname)
+{
+  mapwin->registerNewNodeMap(mapname);
+}
