Index: mw-mapselector.cc
===================================================================
--- mw-mapselector.cc	(revision 90)
+++ mw-mapselector.cc	(revision 94)
@@ -1,7 +1,7 @@
 #include "map_win.h"
 
-MapWin::MapSelector::MapSelector(GraphDisplayerCanvas & grdispc, MapStorage & mapst, int identifier, bool edge):gdc(grdispc),ms(mapst),id(identifier),itisedge(edge),default_state(true),set_new_map(false),node_to_update(INVALID),edge_to_update(INVALID)
+MapWin::MapSelector::MapSelector(std::vector<std::string> ml, int identifier, bool edge):id(identifier),itisedge(edge),default_state(true),set_new_map(false)
 {
-  update_list();
+  update_list(ml);
 
   cbt.set_active(0);
@@ -51,25 +51,14 @@
 {
   set_new_map=true;
-  (new NewMapWin("NewMapWin", gdc, itisedge, false))->run();
+  signal_newmapwin.emit(itisedge);
 }
 
-void MapWin::MapSelector::update_list()
+void MapWin::MapSelector::update_list( std::vector< std::string > ml )
 {
   cbt.clear();
-  if(itisedge)
+  std::vector< std::string >::iterator emsi=ml.begin();
+  for(;emsi!=ml.end();emsi++)
     {
-      std::map< std::string,Graph::EdgeMap<double> * >::iterator emsi=ms.beginOfEdgeMaps();
-      for(;emsi!=ms.endOfEdgeMaps();emsi++)
-	{
-	  cbt.append_text(emsi->first);
-	}
-    }
-  else
-    {
-      std::map< std::string,Graph::NodeMap<double> * >::iterator emsi=ms.beginOfNodeMaps();
-      for(;emsi!=ms.endOfNodeMaps();emsi++)
-	{
-	  cbt.append_text(emsi->first);
-	}
+      cbt.append_text(*emsi);
     }
   cbt.prepend_text("Default values");
@@ -84,50 +73,10 @@
       if(!(mapname.empty())) //We seem to get 2 signals, one when the text is empty.
 	{
-	  if(itisedge)
-	    {
-	      if( ( (ms.edgemap_storage).find(mapname) != (ms.edgemap_storage).end() ) )
-		{
-		  Edge edge=edge_to_update;
-		  switch(id)
-		    {
-		    case E_WIDTH:
-		      gdc.changeEdgeWidth(mapname, edge);
-		      break;
-		    case E_COLOR:
-		      gdc.changeEdgeColor(mapname, edge);
-		      break;
-		    case E_TEXT:
-		      gdc.changeEdgeText(mapname, edge);
-		      break;
-		    default:
-		      std::cerr<<"Error\n";
-		    }
-		}
-	    }
-	  else
-	    {
-	      if( ( (ms.nodemap_storage).find(mapname) != (ms.nodemap_storage).end() ) )
-		{
-		  Node node=node_to_update;
-		  switch(id)
-		    {
-		    case N_RADIUS:
-		      gdc.changeNodeRadius(mapname, node);
-		      break;
-		    case N_COLOR:
-		      gdc.changeNodeColor(mapname, node);
-		      break;
-		    case N_TEXT:
-		      gdc.changeNodeText(mapname, node);
-		      break;
-		    default:
-		      std::cerr<<"Error\n";
-		    }
-		}
-	    }
+	  signal_cbt.emit(mapname);
 	}
     }
   else if((!default_state)&&(cbt.get_active_row_number()==0))
     {
+      signal_cbt.emit("");
       reset();
     }
@@ -139,69 +88,7 @@
   cbt.set_active(0);
 
-  if(itisedge)
-    {
-      Edge edge=edge_to_update;
-      switch(id)
-	{
-	case E_WIDTH:
-	  gdc.resetEdgeWidth(edge);
-	  break;
-	case E_COLOR:
-	  gdc.resetEdgeColor(edge);
-	  break;
-	case E_TEXT:
-	  gdc.resetEdgeText(edge);
-	  break;
-	default:
-	  std::cerr<<"Error\n";
-	}
-    }
-  else
-    {
-      Node node=node_to_update;	
-      switch(id)
-	{
-	case N_RADIUS:
-	  gdc.resetNodeRadius(node);
-	  break;
-	case N_COLOR:
-	  gdc.resetNodeColor(node);
-	  break;
-	case N_TEXT:
-	  gdc.resetNodeText(node);
-	  break;
-	default:
-	  std::cerr<<"Error\n";
-	}
-    }
+  signal_cbt.emit("");
 }
 
-void MapWin::MapSelector::update(Node node)
-{
-  node_to_update=node;
-  if(default_state)
-    {
-      reset();
-    }
-  else
-    {
-      comboChanged();
-    }
-  node_to_update=INVALID;
-}
-
-void MapWin::MapSelector::update(Edge edge)
-{
-  edge_to_update=edge;
-  if(default_state)
-    {
-      reset();
-    }
-  else
-    {
-      comboChanged();
-    }
-  edge_to_update=INVALID;
-}
 
 Glib::ustring MapWin::MapSelector::get_active_text()
@@ -224,2 +111,12 @@
     }
 }
+
+sigc::signal<void, std::string> MapWin::MapSelector::signal_cbt_ch()
+{
+  return signal_cbt;
+}
+
+sigc::signal<void, bool> MapWin::MapSelector::signal_newmapwin_needed()
+{
+  return signal_newmapwin;
+}
