Index: gui/Makefile.am
===================================================================
--- gui/Makefile.am	(revision 1731)
+++ gui/Makefile.am	(revision 1819)
@@ -16,4 +16,5 @@
 	graph_displayer_canvas.h \
 	graph-displayer.cc \
+	gdc-broken_edge.cc \
 	main_win.cc \
 	main_win.h \
@@ -22,12 +23,9 @@
 	map_win.cc \
 	map_win.h \
-	broken_edge.cc \
-	broken_edge.h \
+	mw-mapselector.cc \
 	new_map_win.cc \
 	new_map_win.h \
 	xymap.h \
-	icons/guipixbufs.h\
-	mapselector.h\
-	mapselector.cc
+	icons/guipixbufs.h
 
 
Index: gui/broken_edge.cc
===================================================================
--- gui/broken_edge.cc	(revision 1714)
+++ 	(revision )
@@ -1,214 +1,0 @@
-#include "broken_edge.h"
-#include <cmath>
-
-BrokenEdge::BrokenEdge(Gnome::Canvas::Group & g, Gnome::Canvas::Points p, GraphDisplayerCanvas & gc) : Line(g), gdc(gc), isbutton(false)
-{
-  my_points=new Gnome::Art::Point[3];
-
-  arrow=new Gnome::Canvas::Polygon(g);
-  *arrow << Gnome::Canvas::Properties::fill_color("red");
-  arrow->signal_event().connect(sigc::mem_fun(*this, &BrokenEdge::edgeFormerEventHandler));
-  arrow->lower_to_bottom();
-  setPoints(p);
-}
-
-BrokenEdge::~BrokenEdge()
-{
-  if(arrow)delete(arrow);
-}
-
-void BrokenEdge::setPoints(Gnome::Canvas::Points p, bool move)
-{
-  bool set_arrow=false;
-  //red arrow losts its position-right button
-  if(!move)
-    {
-      if(p.size()==2)
-	{
-	  set_arrow=true;
-	  Gnome::Canvas::Points points_with_center;
-	  points_with_center.push_back(my_points[0]=p[0]);
-	  points_with_center.push_back(my_points[1]=Gnome::Art::Point( (p[0].get_x()+p[1].get_x())/2+0 , (p[0].get_y()+p[1].get_y())/2 )+0 );
-	  points_with_center.push_back(my_points[2]=p[1]);
-	  property_points().set_value(points_with_center);
-	}  
-      if(p.size()==3)
-	{
-	  set_arrow=true;
-	  property_points().set_value(p);
-	  for(int i=0;i<3;i++)
-	    {
-	      my_points[i]=p[i];
-	    }
-	}
-    }
-  else
-    {
-      //arrow keeps its position-left button
-
-//       if(p.size()==2)
-//       	{
-//       	  Gnome::Canvas::Points points;
-//       	  my_points[0]=p[0];
-//       	  my_points[2]=p[1];
-//       	  for(int i=0;i<3;i++)
-//       	    {
-//       	      points.push_back(my_points[i]);
-//       	    }
-//       	  property_points().set_value(points);
-//       	}
-      set_arrow=true;
-
-      //////////////////////////////////////////////////////////////////////////////////////////////////////
-      /////////// keeps shape-with scalar multiplication - version 2.
-      //////////////////////////////////////////////////////////////////////////////////////////////////////
-
-      if(p.size()==2)
-      	{
-	  //old vector from one to the other node - a
-	  xy<double> a_v(my_points[2].get_x()-my_points[0].get_x(),my_points[2].get_y()-my_points[0].get_y());
-	  //new vector from one to the other node - b
-	  xy<double> b_v(p[1].get_x()-p[0].get_x(),p[1].get_y()-p[0].get_y());
-
-	  double absa=sqrt(a_v.normSquare());
-	  double absb=sqrt(b_v.normSquare());
-
-	  //old vector from one node to the breakpoint - c
-	  xy<double> c_v(my_points[1].get_x()-my_points[0].get_x(),my_points[1].get_y()-my_points[0].get_y());
-
-	  //unit vector with the same direction to a_v
-	  xy<double> a_v_u(a_v.x/absa,a_v.y/absa);
-
-	  //normal vector of unit vector with the same direction to a_v
-	  xy<double> a_v_u_n(((-1)*a_v_u.y),a_v_u.x);
-
-	  //unit vector with the same direction to b_v
-	  xy<double> b_v_u(b_v.x/absb,b_v.y/absb);
-
-	  //normal vector of unit vector with the same direction to b_v
-	  xy<double> b_v_u_n(((-1)*b_v_u.y),b_v_u.x);
-
-	  //vector c in a_v_u and a_v_u_n co-ordinate system
-	  xy<double> c_a(c_v*a_v_u,c_v*a_v_u_n);
-
-	  //new vector from one node to the breakpoint - d - we have to calculate this one
-	  xy<double> d_v=absb/absa*(c_a.x*b_v_u+c_a.y*b_v_u_n);
-
-	  my_points[1]=Gnome::Art::Point(d_v.x+p[0].get_x(),d_v.y+p[0].get_y());
-
-      	  my_points[0]=p[0];
-      	  my_points[2]=p[1];
-
-	  Gnome::Canvas::Points points;
-	  for(int i=0;i<3;i++)
-	    {
-	      points.push_back(my_points[i]);
-	    }
-	  property_points().set_value(points);
-	}
-    }
-  if(set_arrow)
-    {
-      //calculating coordinates of the direction indicator arrow
-
-      xy<gdouble> target( my_points[2].get_x(), my_points[2].get_y() );
-      xy<gdouble> center( my_points[1].get_x(), my_points[1].get_y() );
-
-      xy<gdouble> unit_vector_in_dir(target-center);
-      //       std::cout << target << " - " << center << " = " << unit_vector_in_dir << "    / " <<unit_vector_in_dir.normSquare() ;
-      unit_vector_in_dir/=sqrt( unit_vector_in_dir.normSquare() );
-      //       std::cout << " = " << unit_vector_in_dir << std::endl;
-
-      xy<gdouble> unit_norm_vector(0-unit_vector_in_dir.y, unit_vector_in_dir.x);
-      //       std::cout << unit_norm_vector << std::endl;
-
-      {      
-	//       /\       // top
-	//      /  \      //
-	//      -  -      // c(enter)l(eft), ccl, ccr, cr
-	//       ||       //
-	//       ||       // b(ottom)l, br
-      }
-
-      double size=3;
-
-      xy<gdouble> bl (center - unit_vector_in_dir * 3 * size + unit_norm_vector * size );
-      xy<gdouble> br (center - unit_vector_in_dir * 3 * size - unit_norm_vector * size );
-      xy<gdouble> ccl(center + unit_vector_in_dir *  size + unit_norm_vector * size );
-      xy<gdouble> ccr(center + unit_vector_in_dir *  size - unit_norm_vector * size );
-      xy<gdouble> cl (center + unit_vector_in_dir *  size + unit_norm_vector * 2 * size );
-      xy<gdouble> cr (center + unit_vector_in_dir *  size - unit_norm_vector * 2 * size );
-      xy<gdouble> top(center + unit_vector_in_dir * 3 * size);
-	 
-      //       std::cout << bl << " " << br << " " << ccl << " "  << ccr << " " << cl << " " << cr << " " << top << std::endl;
-
-      Gnome::Canvas::Points arrow_points;
-      arrow_points.push_back(Gnome::Art::Point( bl.x , bl.y  ) );
-      arrow_points.push_back(Gnome::Art::Point( br.x , br.y  ) );
-      arrow_points.push_back(Gnome::Art::Point( ccr.x, ccr.y ) );
-      arrow_points.push_back(Gnome::Art::Point( cr.x , cr.y  ) );
-      arrow_points.push_back(Gnome::Art::Point( top.x, top.y ) );
-      arrow_points.push_back(Gnome::Art::Point( cl.x , cl.y  ) );
-      arrow_points.push_back(Gnome::Art::Point( ccl.x, ccl.y ) );
-
-      arrow->property_points().set_value(arrow_points);
-    }
-}
-
-bool BrokenEdge::edgeFormerEventHandler(GdkEvent* e)
-{
-  switch(e->type)
-    {
-    case GDK_BUTTON_PRESS:
-      //we mark the location of the event to be able to calculate parameters of dragging
-      if(gdc.getActualTool()!=CREATE_NODE)
-	{
-	  gdc.toggleEdgeActivity(this, true);
-	  clicked_x=e->button.x;
-	  clicked_y=e->button.y;
-	  isbutton=true;
-	}
-      break;
-    case GDK_BUTTON_RELEASE:
-      if(gdc.getActualTool()!=CREATE_NODE)
-	{
-	  gdc.toggleEdgeActivity(this, false);
-	  isbutton=false;
-	}
-      break;
-    case GDK_MOTION_NOTIFY:
-      //we only have to do sg. if the mouse button is pressed
-      if(isbutton)
-	{
-	  //new coordinates will be the old values,
-	  //because the item will be moved to the
-	  //new coordinate therefore the new movement
-	  //has to be calculated from here
-
-	  double dx=e->motion.x-clicked_x;
-	  double dy=e->motion.y-clicked_y;
-
-	  Gnome::Canvas::Points points_new;
-
-	  points_new.push_back(my_points[0]);
-	  points_new.push_back(my_points[1]=Gnome::Art::Point(my_points[1].get_x()+dx,my_points[1].get_y()+dy));
-	  points_new.push_back(my_points[2]);
-
-	  setPoints(points_new);
-	  gdc.textReposition(xy<double>(my_points[1].get_x(),my_points[1].get_y()));
-
-	  clicked_x=e->motion.x;
-	  clicked_y=e->motion.y;
-
-	}
-    default: break;
-    }
-
-  return true;
-}
-
-xy<double> BrokenEdge::getArrowPos()
-{
-  xy<double> ret_val(my_points[1].get_x(),my_points[1].get_y());
-  return ret_val;
-}
Index: gui/broken_edge.h
===================================================================
--- gui/broken_edge.h	(revision 1606)
+++ 	(revision )
@@ -1,39 +1,0 @@
-// -*- C++ -*- //
-
-#ifndef BROKEN_EDGE_H
-#define BROKEN_EDGE_H
-
-class BrokenEdge;
-
-#include "all_include.h"
-#include <libgnomecanvasmm.h>
-#include <libgnomecanvasmm/polygon.h>
-#include "graph_displayer_canvas.h"
-#include <lemon/xy.h>
-
-class BrokenEdge : public Gnome::Canvas::Line
-{
-  GraphDisplayerCanvas & gdc;
-  Gnome::Canvas::Polygon * arrow;
-  Gnome::Art::Point * my_points;
-
-
-  ///Indicates whether the button of mouse is pressed or not
-  bool isbutton;
-
-  ///At this location was the mousebutton pressed.
-  ///It helps to calculate the distance of dragging.
-  double clicked_x, clicked_y;
-
-  ///event handler for forming edges
-  bool edgeFormerEventHandler(GdkEvent*);
- public:
-  BrokenEdge(Gnome::Canvas::Group &, Gnome::Canvas::Points, GraphDisplayerCanvas &);
-  ~BrokenEdge();
-  void setPoints(Gnome::Canvas::Points, bool move=false);
-  xy<double> getArrowPos();
-};
-
-
-#endif //BROKEN_EDGE_H
-
Index: gui/gdc-broken_edge.cc
===================================================================
--- gui/gdc-broken_edge.cc	(revision 1819)
+++ gui/gdc-broken_edge.cc	(revision 1819)
@@ -0,0 +1,214 @@
+#include "graph_displayer_canvas.h"
+#include <cmath>
+
+GraphDisplayerCanvas::BrokenEdge::BrokenEdge(Gnome::Canvas::Group & g, Gnome::Canvas::Points p, GraphDisplayerCanvas & gc) : Line(g), gdc(gc), isbutton(false)
+{
+  my_points=new Gnome::Art::Point[3];
+
+  arrow=new Gnome::Canvas::Polygon(g);
+  *arrow << Gnome::Canvas::Properties::fill_color("red");
+  arrow->signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::BrokenEdge::edgeFormerEventHandler));
+  arrow->lower_to_bottom();
+  setPoints(p);
+}
+
+GraphDisplayerCanvas::BrokenEdge::~BrokenEdge()
+{
+  if(arrow)delete(arrow);
+}
+
+void GraphDisplayerCanvas::BrokenEdge::setPoints(Gnome::Canvas::Points p, bool move)
+{
+  bool set_arrow=false;
+  //red arrow losts its position-right button
+  if(!move)
+    {
+      if(p.size()==2)
+	{
+	  set_arrow=true;
+	  Gnome::Canvas::Points points_with_center;
+	  points_with_center.push_back(my_points[0]=p[0]);
+	  points_with_center.push_back(my_points[1]=Gnome::Art::Point( (p[0].get_x()+p[1].get_x())/2+0 , (p[0].get_y()+p[1].get_y())/2 )+0 );
+	  points_with_center.push_back(my_points[2]=p[1]);
+	  property_points().set_value(points_with_center);
+	}  
+      if(p.size()==3)
+	{
+	  set_arrow=true;
+	  property_points().set_value(p);
+	  for(int i=0;i<3;i++)
+	    {
+	      my_points[i]=p[i];
+	    }
+	}
+    }
+  else
+    {
+      //arrow keeps its position-left button
+
+//       if(p.size()==2)
+//       	{
+//       	  Gnome::Canvas::Points points;
+//       	  my_points[0]=p[0];
+//       	  my_points[2]=p[1];
+//       	  for(int i=0;i<3;i++)
+//       	    {
+//       	      points.push_back(my_points[i]);
+//       	    }
+//       	  property_points().set_value(points);
+//       	}
+      set_arrow=true;
+
+      //////////////////////////////////////////////////////////////////////////////////////////////////////
+      /////////// keeps shape-with scalar multiplication - version 2.
+      //////////////////////////////////////////////////////////////////////////////////////////////////////
+
+      if(p.size()==2)
+      	{
+	  //old vector from one to the other node - a
+	  xy<double> a_v(my_points[2].get_x()-my_points[0].get_x(),my_points[2].get_y()-my_points[0].get_y());
+	  //new vector from one to the other node - b
+	  xy<double> b_v(p[1].get_x()-p[0].get_x(),p[1].get_y()-p[0].get_y());
+
+	  double absa=sqrt(a_v.normSquare());
+	  double absb=sqrt(b_v.normSquare());
+
+	  //old vector from one node to the breakpoint - c
+	  xy<double> c_v(my_points[1].get_x()-my_points[0].get_x(),my_points[1].get_y()-my_points[0].get_y());
+
+	  //unit vector with the same direction to a_v
+	  xy<double> a_v_u(a_v.x/absa,a_v.y/absa);
+
+	  //normal vector of unit vector with the same direction to a_v
+	  xy<double> a_v_u_n(((-1)*a_v_u.y),a_v_u.x);
+
+	  //unit vector with the same direction to b_v
+	  xy<double> b_v_u(b_v.x/absb,b_v.y/absb);
+
+	  //normal vector of unit vector with the same direction to b_v
+	  xy<double> b_v_u_n(((-1)*b_v_u.y),b_v_u.x);
+
+	  //vector c in a_v_u and a_v_u_n co-ordinate system
+	  xy<double> c_a(c_v*a_v_u,c_v*a_v_u_n);
+
+	  //new vector from one node to the breakpoint - d - we have to calculate this one
+	  xy<double> d_v=absb/absa*(c_a.x*b_v_u+c_a.y*b_v_u_n);
+
+	  my_points[1]=Gnome::Art::Point(d_v.x+p[0].get_x(),d_v.y+p[0].get_y());
+
+      	  my_points[0]=p[0];
+      	  my_points[2]=p[1];
+
+	  Gnome::Canvas::Points points;
+	  for(int i=0;i<3;i++)
+	    {
+	      points.push_back(my_points[i]);
+	    }
+	  property_points().set_value(points);
+	}
+    }
+  if(set_arrow)
+    {
+      //calculating coordinates of the direction indicator arrow
+
+      xy<gdouble> target( my_points[2].get_x(), my_points[2].get_y() );
+      xy<gdouble> center( my_points[1].get_x(), my_points[1].get_y() );
+
+      xy<gdouble> unit_vector_in_dir(target-center);
+      //       std::cout << target << " - " << center << " = " << unit_vector_in_dir << "    / " <<unit_vector_in_dir.normSquare() ;
+      unit_vector_in_dir/=sqrt( unit_vector_in_dir.normSquare() );
+      //       std::cout << " = " << unit_vector_in_dir << std::endl;
+
+      xy<gdouble> unit_norm_vector(0-unit_vector_in_dir.y, unit_vector_in_dir.x);
+      //       std::cout << unit_norm_vector << std::endl;
+
+      {      
+	//       /\       // top
+	//      /  \      //
+	//      -  -      // c(enter)l(eft), ccl, ccr, cr
+	//       ||       //
+	//       ||       // b(ottom)l, br
+      }
+
+      double size=3;
+
+      xy<gdouble> bl (center - unit_vector_in_dir * 3 * size + unit_norm_vector * size );
+      xy<gdouble> br (center - unit_vector_in_dir * 3 * size - unit_norm_vector * size );
+      xy<gdouble> ccl(center + unit_vector_in_dir *  size + unit_norm_vector * size );
+      xy<gdouble> ccr(center + unit_vector_in_dir *  size - unit_norm_vector * size );
+      xy<gdouble> cl (center + unit_vector_in_dir *  size + unit_norm_vector * 2 * size );
+      xy<gdouble> cr (center + unit_vector_in_dir *  size - unit_norm_vector * 2 * size );
+      xy<gdouble> top(center + unit_vector_in_dir * 3 * size);
+	 
+      //       std::cout << bl << " " << br << " " << ccl << " "  << ccr << " " << cl << " " << cr << " " << top << std::endl;
+
+      Gnome::Canvas::Points arrow_points;
+      arrow_points.push_back(Gnome::Art::Point( bl.x , bl.y  ) );
+      arrow_points.push_back(Gnome::Art::Point( br.x , br.y  ) );
+      arrow_points.push_back(Gnome::Art::Point( ccr.x, ccr.y ) );
+      arrow_points.push_back(Gnome::Art::Point( cr.x , cr.y  ) );
+      arrow_points.push_back(Gnome::Art::Point( top.x, top.y ) );
+      arrow_points.push_back(Gnome::Art::Point( cl.x , cl.y  ) );
+      arrow_points.push_back(Gnome::Art::Point( ccl.x, ccl.y ) );
+
+      arrow->property_points().set_value(arrow_points);
+    }
+}
+
+bool GraphDisplayerCanvas::BrokenEdge::edgeFormerEventHandler(GdkEvent* e)
+{
+  switch(e->type)
+    {
+    case GDK_BUTTON_PRESS:
+      //we mark the location of the event to be able to calculate parameters of dragging
+      if(gdc.getActualTool()!=CREATE_NODE)
+	{
+	  gdc.toggleEdgeActivity(this, true);
+	  clicked_x=e->button.x;
+	  clicked_y=e->button.y;
+	  isbutton=true;
+	}
+      break;
+    case GDK_BUTTON_RELEASE:
+      if(gdc.getActualTool()!=CREATE_NODE)
+	{
+	  gdc.toggleEdgeActivity(this, false);
+	  isbutton=false;
+	}
+      break;
+    case GDK_MOTION_NOTIFY:
+      //we only have to do sg. if the mouse button is pressed
+      if(isbutton)
+	{
+	  //new coordinates will be the old values,
+	  //because the item will be moved to the
+	  //new coordinate therefore the new movement
+	  //has to be calculated from here
+
+	  double dx=e->motion.x-clicked_x;
+	  double dy=e->motion.y-clicked_y;
+
+	  Gnome::Canvas::Points points_new;
+
+	  points_new.push_back(my_points[0]);
+	  points_new.push_back(my_points[1]=Gnome::Art::Point(my_points[1].get_x()+dx,my_points[1].get_y()+dy));
+	  points_new.push_back(my_points[2]);
+
+	  setPoints(points_new);
+	  gdc.textReposition(xy<double>(my_points[1].get_x(),my_points[1].get_y()));
+
+	  clicked_x=e->motion.x;
+	  clicked_y=e->motion.y;
+
+	}
+    default: break;
+    }
+
+  return true;
+}
+
+xy<double> GraphDisplayerCanvas::BrokenEdge::getArrowPos()
+{
+  xy<double> ret_val(my_points[1].get_x(),my_points[1].get_y());
+  return ret_val;
+}
Index: gui/graph_displayer_canvas-edge.cc
===================================================================
--- gui/graph_displayer_canvas-edge.cc	(revision 1731)
+++ gui/graph_displayer_canvas-edge.cc	(revision 1819)
@@ -1,4 +1,3 @@
 #include "graph_displayer_canvas.h"
-#include "broken_edge.h"
 #include <cmath>
 
Index: gui/graph_displayer_canvas-event.cc
===================================================================
--- gui/graph_displayer_canvas-event.cc	(revision 1777)
+++ gui/graph_displayer_canvas-event.cc	(revision 1819)
@@ -1,4 +1,3 @@
 #include "graph_displayer_canvas.h"
-#include "broken_edge.h"
 #include <cmath>
 
Index: gui/graph_displayer_canvas-node.cc
===================================================================
--- gui/graph_displayer_canvas-node.cc	(revision 1731)
+++ gui/graph_displayer_canvas-node.cc	(revision 1819)
@@ -1,4 +1,3 @@
 #include "graph_displayer_canvas.h"
-#include "broken_edge.h"
 #include <cmath>
 
Index: gui/graph_displayer_canvas-zoom.cc
===================================================================
--- gui/graph_displayer_canvas-zoom.cc	(revision 1777)
+++ gui/graph_displayer_canvas-zoom.cc	(revision 1819)
@@ -1,4 +1,3 @@
 #include "graph_displayer_canvas.h"
-#include "broken_edge.h"
 #include <cmath>
 
Index: gui/graph_displayer_canvas.cc
===================================================================
--- gui/graph_displayer_canvas.cc	(revision 1648)
+++ gui/graph_displayer_canvas.cc	(revision 1819)
@@ -1,4 +1,3 @@
 #include "graph_displayer_canvas.h"
-#include "broken_edge.h"
 #include <cmath>
 
Index: gui/graph_displayer_canvas.h
===================================================================
--- gui/graph_displayer_canvas.h	(revision 1814)
+++ gui/graph_displayer_canvas.h	(revision 1819)
@@ -8,12 +8,34 @@
 #include "all_include.h"
 #include "mapstorage.h"
-#include "broken_edge.h"
 #include "map_win.h"
 #include <libgnomecanvasmm.h>
 #include <libgnomecanvasmm/polygon.h>
+#include <lemon/xy.h>
 
 ///This class is the canvas, on which the graph can be drawn.
 class GraphDisplayerCanvas : public Gnome::Canvas::CanvasAA
 {
+  class BrokenEdge : public Gnome::Canvas::Line
+  {
+    GraphDisplayerCanvas & gdc;
+    Gnome::Canvas::Polygon * arrow;
+    Gnome::Art::Point * my_points;
+
+
+    ///Indicates whether the button of mouse is pressed or not
+    bool isbutton;
+
+    ///At this location was the mousebutton pressed.
+    ///It helps to calculate the distance of dragging.
+    double clicked_x, clicked_y;
+
+    ///event handler for forming edges
+    bool edgeFormerEventHandler(GdkEvent*);
+  public:
+    BrokenEdge(Gnome::Canvas::Group &, Gnome::Canvas::Points, GraphDisplayerCanvas &);
+    ~BrokenEdge();
+    void setPoints(Gnome::Canvas::Points, bool move=false);
+    xy<double> getArrowPos();
+  };
   typedef Gnome::Canvas::CanvasAA Parent;
 
Index: gui/map_win.h
===================================================================
--- gui/map_win.h	(revision 1733)
+++ gui/map_win.h	(revision 1819)
@@ -10,5 +10,4 @@
 #include "mapstorage.h"
 #include "new_map_win.h"
-#include "mapselector.h"
 #include <libgnomecanvasmm.h>
 #include <libgnomecanvasmm/polygon.h>
@@ -19,4 +18,59 @@
 class MapWin : public Gtk::Window
 {
+
+  class MapSelector : public Gtk::HBox
+  {
+  protected:
+    GraphDisplayerCanvas & gdc;
+    ///The \ref MapStorage in which the visualizable maps are stored
+    MapStorage & ms;
+    NewMapWin & nmw;
+
+    int id;
+
+    bool itisedge;
+
+    bool default_state;
+
+    bool set_new_map;
+
+    Gtk::ComboBoxText cbt;
+
+    Gtk::Button * newbut, * defbut;
+
+    Gtk::HBox hbox;
+
+    Gtk::Label * label;
+
+    Node node_to_update;
+    Edge edge_to_update;
+
+
+  public:
+
+    MapSelector(GraphDisplayerCanvas &, MapStorage &, NewMapWin &, int, bool);
+
+    void update_list();
+
+    ///If a radiobutton is clicked, this function determines
+    ///which button was that and after that calls the
+    ///appropriate function of the \ref GraphDisplayerCanvas
+    ///to change the visible values of that attribute.
+    virtual void comboChanged();
+
+    virtual void new_but_pressed();
+
+    virtual void reset();
+
+    virtual void update(Node node);
+    virtual void update(Edge edge);
+
+    Glib::ustring get_active_text();
+    void set_active_text(Glib::ustring);
+    void append_text(Glib::ustring);
+  };
+
+
+
 protected:
   ///The \ref GraphDisplayerCanvas on which the graph will be drawn.
Index: gui/mapselector.cc
===================================================================
--- gui/mapselector.cc	(revision 1737)
+++ 	(revision )
@@ -1,225 +1,0 @@
-#include "mapselector.h"
-
-MapSelector::MapSelector(GraphDisplayerCanvas & grdispc, MapStorage & mapst, NewMapWin & newmapw, int identifier, bool edge):gdc(grdispc),ms(mapst),nmw(newmapw),id(identifier),itisedge(edge),default_state(true),set_new_map(false),node_to_update(INVALID),edge_to_update(INVALID)
-{
-  update_list();
-
-  cbt.set_active(0);
-
-  //binding signal to the actual entry
-  cbt.signal_changed().connect
-    (
-     sigc::mem_fun((*this), &MapSelector::comboChanged),
-     false
-     );
-  
-  if(itisedge)
-    {
-      label=new Gtk::Label(edge_property_strings[id]);
-    }
-  else
-    {
-      label=new Gtk::Label(node_property_strings[id]);
-    }
-
-  label->set_width_chars(longest_property_string_length);
-
-  defbut=new Gtk::Button();
-  defbut->set_label("Reset");
-
-  defbut->signal_pressed().connect
-    (
-     sigc::mem_fun(*this, &MapSelector::reset)
-     );
-
-  newbut=new Gtk::Button(Gtk::Stock::NEW);
-
-  newbut->signal_pressed().connect
-    (
-     sigc::mem_fun(*this, &MapSelector::new_but_pressed)
-     );
-
-  add(*label);
-
-  add(cbt);
-
-  add(*defbut);
-  add(*newbut);
-}
-
-void MapSelector::new_but_pressed()
-{
-  set_new_map=true;
-  nmw.showByPreChoose(itisedge);
-}
-
-void MapSelector::update_list()
-{
-  cbt.clear();
-  if(itisedge)
-    {
-      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.prepend_text("Default values");
-}
-
-void MapSelector::comboChanged()
-{
-  if(cbt.get_active_row_number()!=0)
-    {
-      default_state=false;
-      Glib::ustring mapname = cbt.get_active_text();
-      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";
-		    }
-		}
-	    }
-	}
-    }
-  else if((!default_state)&&(cbt.get_active_row_number()==0))
-    {
-      reset();
-    }
-}
-
-void MapSelector::reset()
-{
-  default_state=true;
-  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";
-	}
-    }
-}
-
-void MapSelector::update(Node node)
-{
-  node_to_update=node;
-  if(default_state)
-    {
-      reset();
-    }
-  else
-    {
-      comboChanged();
-    }
-  node_to_update=INVALID;
-}
-
-void MapSelector::update(Edge edge)
-{
-  edge_to_update=edge;
-  if(default_state)
-    {
-      reset();
-    }
-  else
-    {
-      comboChanged();
-    }
-  edge_to_update=INVALID;
-}
-
-Glib::ustring MapSelector::get_active_text()
-{
-  return cbt.get_active_text();
-}
-
-void MapSelector::set_active_text(Glib::ustring text)
-{
-  cbt.set_active_text(text);
-}
-
-void MapSelector::append_text(Glib::ustring text)
-{
-  cbt.append_text(text);
-  if(set_new_map)
-    {
-      set_active_text(text);
-      set_new_map=false;
-    }
-}
Index: gui/mapselector.h
===================================================================
--- gui/mapselector.h	(revision 1737)
+++ 	(revision )
@@ -1,67 +1,0 @@
-// -*- C++ -*- //
-
-#ifndef MAP_SELECTOR_H
-#define MAP_SELECTOR_H
-
-class MapSelector;
-
-#include "all_include.h"
-#include "mapstorage.h"
-#include "new_map_win.h"
-#include "graph_displayer_canvas.h"
-#include <libgnomecanvasmm.h>
-#include <libgnomecanvasmm/polygon.h>
-
-class MapSelector : public Gtk::HBox
-{
-protected:
-  GraphDisplayerCanvas & gdc;
-  ///The \ref MapStorage in which the visualizable maps are stored
-  MapStorage & ms;
-  NewMapWin & nmw;
-
-  int id;
-
-  bool itisedge;
-
-  bool default_state;
-
-  bool set_new_map;
-
-  Gtk::ComboBoxText cbt;
-
-  Gtk::Button * newbut, * defbut;
-
-  Gtk::HBox hbox;
-
-  Gtk::Label * label;
-
-  Node node_to_update;
-  Edge edge_to_update;
-
-
-public:
-
-  MapSelector(GraphDisplayerCanvas &, MapStorage &, NewMapWin &, int, bool);
-
-  void update_list();
-
-  ///If a radiobutton is clicked, this function determines
-  ///which button was that and after that calls the
-  ///appropriate function of the \ref GraphDisplayerCanvas
-  ///to change the visible values of that attribute.
-  virtual void comboChanged();
-
-  virtual void new_but_pressed();
-
-  virtual void reset();
-
-  virtual void update(Node node);
-  virtual void update(Edge edge);
-
-  Glib::ustring get_active_text();
-  void set_active_text(Glib::ustring);
-  void append_text(Glib::ustring);
-};
-
-#endif
Index: gui/mw-mapselector.cc
===================================================================
--- gui/mw-mapselector.cc	(revision 1819)
+++ gui/mw-mapselector.cc	(revision 1819)
@@ -0,0 +1,225 @@
+#include "map_win.h"
+
+MapWin::MapSelector::MapSelector(GraphDisplayerCanvas & grdispc, MapStorage & mapst, NewMapWin & newmapw, int identifier, bool edge):gdc(grdispc),ms(mapst),nmw(newmapw),id(identifier),itisedge(edge),default_state(true),set_new_map(false),node_to_update(INVALID),edge_to_update(INVALID)
+{
+  update_list();
+
+  cbt.set_active(0);
+
+  //binding signal to the actual entry
+  cbt.signal_changed().connect
+    (
+     sigc::mem_fun((*this), &MapWin::MapSelector::comboChanged),
+     false
+     );
+  
+  if(itisedge)
+    {
+      label=new Gtk::Label(edge_property_strings[id]);
+    }
+  else
+    {
+      label=new Gtk::Label(node_property_strings[id]);
+    }
+
+  label->set_width_chars(longest_property_string_length);
+
+  defbut=new Gtk::Button();
+  defbut->set_label("Reset");
+
+  defbut->signal_pressed().connect
+    (
+     sigc::mem_fun(*this, &MapWin::MapSelector::reset)
+     );
+
+  newbut=new Gtk::Button(Gtk::Stock::NEW);
+
+  newbut->signal_pressed().connect
+    (
+     sigc::mem_fun(*this, &MapWin::MapSelector::new_but_pressed)
+     );
+
+  add(*label);
+
+  add(cbt);
+
+  add(*defbut);
+  add(*newbut);
+}
+
+void MapWin::MapSelector::new_but_pressed()
+{
+  set_new_map=true;
+  nmw.showByPreChoose(itisedge);
+}
+
+void MapWin::MapSelector::update_list()
+{
+  cbt.clear();
+  if(itisedge)
+    {
+      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.prepend_text("Default values");
+}
+
+void MapWin::MapSelector::comboChanged()
+{
+  if(cbt.get_active_row_number()!=0)
+    {
+      default_state=false;
+      Glib::ustring mapname = cbt.get_active_text();
+      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";
+		    }
+		}
+	    }
+	}
+    }
+  else if((!default_state)&&(cbt.get_active_row_number()==0))
+    {
+      reset();
+    }
+}
+
+void MapWin::MapSelector::reset()
+{
+  default_state=true;
+  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";
+	}
+    }
+}
+
+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()
+{
+  return cbt.get_active_text();
+}
+
+void MapWin::MapSelector::set_active_text(Glib::ustring text)
+{
+  cbt.set_active_text(text);
+}
+
+void MapWin::MapSelector::append_text(Glib::ustring text)
+{
+  cbt.append_text(text);
+  if(set_new_map)
+    {
+      set_active_text(text);
+      set_new_map=false;
+    }
+}
Index: gui/new_map_win.cc
===================================================================
--- gui/new_map_win.cc	(revision 1814)
+++ gui/new_map_win.cc	(revision 1819)
@@ -319,6 +319,6 @@
       unsigned int pr=10000;
       bool prevmult=false;
-      unsigned int prev_change;
-      unsigned int prev_br=10000;
+      unsigned int prev_change=pr;
+      unsigned int prev_br=pr;
       int counter=0;
       std::string comm_nobr="";
@@ -393,5 +393,5 @@
 NewMapWin::tree_node * NewMapWin::weightedString2Tree(std::string to_tree, std::vector<unsigned int> & p, int offset)
 {
-  int min=p[offset];
+  unsigned int min=p[offset];
   int minplace=0;
   for(int i=0;i<(int)to_tree.size();i++)
