Index: gui/Doxyfile
===================================================================
--- gui/Doxyfile	(revision 1736)
+++ gui/Doxyfile	(revision 1823)
@@ -26,5 +26,5 @@
 INLINE_INHERITED_MEMB  = NO
 FULL_PATH_NAMES        = YES
-STRIP_FROM_PATH        = /home/alpar/projects/ETIK/hugo/gui/
+STRIP_FROM_PATH        = .
 STRIP_FROM_INC_PATH    = 
 SHORT_NAMES            = NO
@@ -83,5 +83,5 @@
 # configuration options related to the input files
 #---------------------------------------------------------------------------
-INPUT                  = /home/alpar/projects/ETIK/hugo/gui
+INPUT                  = .
 FILE_PATTERNS          = *.c \
                          *.cc \
Index: gui/main_win.cc
===================================================================
--- gui/main_win.cc	(revision 1777)
+++ gui/main_win.cc	(revision 1823)
@@ -3,6 +3,5 @@
 
 MainWin::MainWin() :
-  newmapwin("Creating new map", gd_canvas),
-  mapwin("Map Setup", mapstorage, gd_canvas, newmapwin),
+  mapwin("Map Setup", mapstorage, gd_canvas),
   gd_canvas(mapstorage, mapwin, (Gtk::Window *)this)
 {
@@ -122,5 +121,5 @@
 
   ag->add( Gtk::Action::create("AddMap", Gtk::StockID("gd-newmap")),
-      sigc::mem_fun ( this->newmapwin, &NewMapWin::show ) );
+      sigc::mem_fun (new NewMapWin("NewMapWin", gd_canvas), &NewMapWin::show ) );
 
   uim=Gtk::UIManager::create();
Index: gui/main_win.h
===================================================================
--- gui/main_win.h	(revision 1733)
+++ gui/main_win.h	(revision 1823)
@@ -26,7 +26,4 @@
 
 protected:
-  ///We need to store newmapwin, to be able to set the appropriate values for properties of new map.
-  NewMapWin newmapwin;
-
   ///Window of map-showing setup. Its type is \ref MapWin
   MapWin mapwin;
Index: gui/map_win.cc
===================================================================
--- gui/map_win.cc	(revision 1737)
+++ gui/map_win.cc	(revision 1823)
@@ -11,5 +11,5 @@
 }
 
-MapWin::MapWin(const std::string& title, MapStorage & mapst, GraphDisplayerCanvas & grdispc, NewMapWin & newmapwin):gdc(grdispc),ms(mapst), nmw(newmapwin)
+MapWin::MapWin(const std::string& title, MapStorage & mapst, GraphDisplayerCanvas & grdispc):gdc(grdispc),ms(mapst)
 {
   set_title(title);
@@ -24,5 +24,5 @@
   for(int i=0;i<EDGE_PROPERTY_NUM;i++)
   {
-    e_combo_array[i]=new MapSelector(gdc, ms, nmw, i, true);
+    e_combo_array[i]=new MapSelector(gdc, ms, i, true);
 
     (*table).attach((*(e_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3);
@@ -41,5 +41,5 @@
   for(int i=0;i<NODE_PROPERTY_NUM;i++)
   {
-    n_combo_array[i]=new MapSelector(gdc, ms, nmw, i, false);
+    n_combo_array[i]=new MapSelector(gdc, ms, i, false);
 
     (*table).attach((*(n_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3);
Index: gui/map_win.h
===================================================================
--- gui/map_win.h	(revision 1819)
+++ gui/map_win.h	(revision 1823)
@@ -25,5 +25,4 @@
     ///The \ref MapStorage in which the visualizable maps are stored
     MapStorage & ms;
-    NewMapWin & nmw;
 
     int id;
@@ -49,5 +48,5 @@
   public:
 
-    MapSelector(GraphDisplayerCanvas &, MapStorage &, NewMapWin &, int, bool);
+    MapSelector(GraphDisplayerCanvas &, MapStorage &, int, bool);
 
     void update_list();
@@ -83,6 +82,4 @@
   MapStorage & ms;
 
-  NewMapWin & nmw;
-
   Gtk::Table * table;
   
@@ -95,5 +92,5 @@
 public:
   ///Constructor of MapWin creates the widgets shown in MapWin.
-  MapWin(const std::string& title, MapStorage &, GraphDisplayerCanvas &, NewMapWin &);
+  MapWin(const std::string& title, MapStorage &, GraphDisplayerCanvas &);
 
   ///This function is created to set the appropriate maps on the newly created node
Index: gui/mw-mapselector.cc
===================================================================
--- gui/mw-mapselector.cc	(revision 1819)
+++ gui/mw-mapselector.cc	(revision 1823)
@@ -1,5 +1,5 @@
 #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)
+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)
 {
   update_list();
@@ -51,5 +51,5 @@
 {
   set_new_map=true;
-  nmw.showByPreChoose(itisedge);
+  (new NewMapWin("NewMapWin", gdc, itisedge, false))->run();
 }
 
Index: gui/new_map_win.cc
===================================================================
--- gui/new_map_win.cc	(revision 1819)
+++ gui/new_map_win.cc	(revision 1823)
@@ -10,11 +10,11 @@
 }
 
-NewMapWin::NewMapWin(const std::string& title, GraphDisplayerCanvas & grdispc):gdc(grdispc),node("Create NodeMap"),edge("Create EdgeMap")
-{
-  set_title(title);
+NewMapWin::NewMapWin(const std::string& title, GraphDisplayerCanvas & grdispc, bool itisedge, bool edgenode):Gtk::Dialog(title, true, true),gdc(grdispc),node("Create NodeMap"),edge("Create EdgeMap")
+{
   set_default_size(200, 50);
 
   signal_key_press_event().connect(sigc::mem_fun(*this, &NewMapWin::closeIfEscapeIsPressed));
 
+  Gtk::VBox * vbox=get_vbox();
 
   //entries
@@ -38,22 +38,26 @@
   Gtk::RadioButton::Group group = node.get_group();
   edge.set_group(group);
-
-  (*table).attach(node,0,1,2,3,Gtk::SHRINK,Gtk::SHRINK,10,3);
-  (*table).attach(edge,1,2,2,3,Gtk::SHRINK,Gtk::SHRINK,10,3);
-
-  vbox.pack_start(*table);
+  
+  if(edgenode)
+    {
+      (*table).attach(node,0,1,2,3,Gtk::SHRINK,Gtk::SHRINK,10,3);
+      (*table).attach(edge,1,2,2,3,Gtk::SHRINK,Gtk::SHRINK,10,3);
+    }
+  else
+    {
+      if(itisedge)
+	{
+	  edge.set_active();
+	}
+      else
+	{
+	  node.set_active();
+	}
+    }
+
+  vbox->pack_start(*table);
 
   //OK button
-  button=new Gtk::Button("OK");
-
-  button->signal_clicked().connect
-    (
-     sigc::mem_fun(*this, &NewMapWin::buttonPressed)
-    );
-
-
-  vbox.pack_start(*button);
-
-  add(vbox);
+  add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
 
   show_all_children();
@@ -61,210 +65,199 @@
 }
 
-void NewMapWin::showByPreChoose(bool itisedge)
-{
-  if(itisedge)
-    {
-      edge.set_active();
-    }
-  else
-    {
-      node.set_active();
-    }
-  node.hide();
-  edge.hide();
-  show();
-}
-
-void NewMapWin::buttonPressed()
-{
-  double def_val=0;
-
-  //get and formulate text
-  std::string def_val_str=default_value.get_text();
-  std::string polishform=string2Polishform(def_val_str,edge.get_active());
-
-  //get name of text
-  std::string mapname=name.get_text();
-
-  if(!mapname.empty()&&!polishform.empty())
-    {
-      int abortion=0;
-      if(edge.get_active())
-	{
-	  //create the new map
-	  Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (gdc.mapstorage.graph);
-
-	  std::stack<double> polishstack;
+void NewMapWin::on_response(int response_id)
+{
+  if(response_id==Gtk::RESPONSE_OK)
+    {
+      double def_val=0;
+
+      //get and formulate text
+      std::string def_val_str=default_value.get_text();
+      std::string polishform=string2Polishform(def_val_str,edge.get_active());
+
+      //get name of text
+      std::string mapname=name.get_text();
+
+      if(!mapname.empty()&&!polishform.empty())
+	{
+	  int abortion=0;
+	  if(edge.get_active())
+	    {
+	      //create the new map
+	      Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (gdc.mapstorage.graph);
+
+	      std::stack<double> polishstack;
   
-	  for(EdgeIt k(gdc.mapstorage.graph); k!=INVALID; ++k)
-	    {
-	      for(int i=0;i<(int)polishform.size();i++)
-		{
-		  double op1, op2;
-		  bool operation=true;
-		  switch(polishform[i])
+	      for(EdgeIt k(gdc.mapstorage.graph); k!=INVALID; ++k)
+		{
+		  for(int i=0;i<(int)polishform.size();i++)
 		    {
-		    case '+':
-		    case '-':
-		    case '/':
-		    case '*':
-		      op1=polishstack.top();
-		      polishstack.pop();
-		      op2=polishstack.top();
-		      polishstack.pop();
-		      break;
-		    default:
-		      //substitute variable
-		      std::map< std::string,Graph::EdgeMap<double> * > ems=gdc.mapstorage.edgemap_storage;
-		      bool itisvar=(ems.find(ch2var[ polishform[i] ])!=ems.end());
-		      if(itisvar)
-			{
-			  polishstack.push( (*(gdc.mapstorage.edgemap_storage[ ch2var[ polishform[i] ] ]))[k]);
-			}
-		      else
-			{
-			  char * def_val_ch=new char [(int)(ch2var[ polishform[i] ].length())];
-			  for(int j=0;j<(int)(ch2var[ polishform[i] ].length());j++)
-			    {
-			      def_val_ch[j]=ch2var[ polishform[i] ][j];
-			    }
-			  polishstack.push(atof(def_val_ch));
-			}
-		      operation=false;
-		      break;
-		    }
-		  if(operation)
-		    {
-		      double res;
+		      double op1, op2;
+		      bool operation=true;
 		      switch(polishform[i])
 			{
 			case '+':
-			  res=op1+op2;
-			  break;
 			case '-':
-			  res=op2-op1;
-			  break;
 			case '/':
-			  res=op2/op1;
-			  break;
 			case '*':
-			  res=op1*op2;
+			  op1=polishstack.top();
+			  polishstack.pop();
+			  op2=polishstack.top();
+			  polishstack.pop();
 			  break;
 			default:
-			  std::cout << "How could we get here?" << std::endl;
+			  //substitute variable
+			  std::map< std::string,Graph::EdgeMap<double> * > ems=gdc.mapstorage.edgemap_storage;
+			  bool itisvar=(ems.find(ch2var[ polishform[i] ])!=ems.end());
+			  if(itisvar)
+			    {
+			      polishstack.push( (*(gdc.mapstorage.edgemap_storage[ ch2var[ polishform[i] ] ]))[k]);
+			    }
+			  else
+			    {
+			      char * def_val_ch=new char [(int)(ch2var[ polishform[i] ].length())];
+			      for(int j=0;j<(int)(ch2var[ polishform[i] ].length());j++)
+				{
+				  def_val_ch[j]=ch2var[ polishform[i] ][j];
+				}
+			      polishstack.push(atof(def_val_ch));
+			    }
+			  operation=false;
 			  break;
 			}
-		      polishstack.push(res);
+		      if(operation)
+			{
+			  double res;
+			  switch(polishform[i])
+			    {
+			    case '+':
+			      res=op1+op2;
+			      break;
+			    case '-':
+			      res=op2-op1;
+			      break;
+			    case '/':
+			      res=op2/op1;
+			      break;
+			    case '*':
+			      res=op1*op2;
+			      break;
+			    default:
+			      std::cout << "How could we get here?" << std::endl;
+			      break;
+			    }
+			  polishstack.push(res);
+			}
 		    }
-		}
-	      (*emptr)[k]=polishstack.top(); 
-	    }
-
-	  //if addition was not successful addEdgeMap returns one.
-	  //cause can be that there is already a map named like the new one
-	  if(gdc.mapstorage.addEdgeMap(mapname, emptr, def_val))
-	    {
-	      abortion=1;
-	    }
-
-	  //add it to the list of the displayable maps
-	  gdc.mapwin.registerNewEdgeMap(mapname);
-
-	  //display it
-	  gdc.changeEdgeText(mapname);
-	}
-      else //!edge.get_active()
-	{
-	  //create the new map
-	  Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (gdc.mapstorage.graph);
-
-	  std::stack<double> polishstack;
+		  (*emptr)[k]=polishstack.top(); 
+		}
+
+	      //if addition was not successful addEdgeMap returns one.
+	      //cause can be that there is already a map named like the new one
+	      if(gdc.mapstorage.addEdgeMap(mapname, emptr, def_val))
+		{
+		  abortion=1;
+		}
+
+	      //add it to the list of the displayable maps
+	      gdc.mapwin.registerNewEdgeMap(mapname);
+
+	      //display it
+	      gdc.changeEdgeText(mapname);
+	    }
+	  else //!edge.get_active()
+	    {
+	      //create the new map
+	      Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (gdc.mapstorage.graph);
+
+	      std::stack<double> polishstack;
   
-	  for(NodeIt k(gdc.mapstorage.graph); k!=INVALID; ++k)
-	    {
-	      for(int i=0;i<(int)polishform.size();i++)
-		{
-		  double op1, op2;
-		  bool operation=true;
-		  switch(polishform[i])
+	      for(NodeIt k(gdc.mapstorage.graph); k!=INVALID; ++k)
+		{
+		  for(int i=0;i<(int)polishform.size();i++)
 		    {
-		    case '+':
-		    case '-':
-		    case '/':
-		    case '*':
-		      op1=polishstack.top();
-		      polishstack.pop();
-		      op2=polishstack.top();
-		      polishstack.pop();
-		      break;
-		    default:
-		      std::map< std::string,Graph::NodeMap<double> * > nms=gdc.mapstorage.nodemap_storage;
-		      bool itisvar=(nms.find(ch2var[ polishform[i] ])!=nms.end());
-		      if(itisvar)
-			{
-			  polishstack.push( (*(gdc.mapstorage.nodemap_storage[ ch2var[ polishform[i] ] ]))[k]);
-			}
-		      else
-			{
-			  char * def_val_ch=new char [(int)(ch2var[ polishform[i] ].length())];
-			  for(int j=0;j<(int)(ch2var[ polishform[i] ].length());j++)
-			    {
-			      def_val_ch[j]=ch2var[ polishform[i] ][j];
-			    }
-			  polishstack.push(atof(def_val_ch));
-			}
-		      operation=false;
-		      break;
-		    }
-		  if(operation)
-		    {
-		      double res;
+		      double op1, op2;
+		      bool operation=true;
 		      switch(polishform[i])
 			{
 			case '+':
-			  res=op1+op2;
-			  break;
 			case '-':
-			  res=op2-op1;
-			  break;
 			case '/':
-			  res=op2/op1;
-			  break;
 			case '*':
-			  res=op1*op2;
+			  op1=polishstack.top();
+			  polishstack.pop();
+			  op2=polishstack.top();
+			  polishstack.pop();
 			  break;
 			default:
-			  std::cout << "How could we get here?" << std::endl;
+			  std::map< std::string,Graph::NodeMap<double> * > nms=gdc.mapstorage.nodemap_storage;
+			  bool itisvar=(nms.find(ch2var[ polishform[i] ])!=nms.end());
+			  if(itisvar)
+			    {
+			      polishstack.push( (*(gdc.mapstorage.nodemap_storage[ ch2var[ polishform[i] ] ]))[k]);
+			    }
+			  else
+			    {
+			      char * def_val_ch=new char [(int)(ch2var[ polishform[i] ].length())];
+			      for(int j=0;j<(int)(ch2var[ polishform[i] ].length());j++)
+				{
+				  def_val_ch[j]=ch2var[ polishform[i] ][j];
+				}
+			      polishstack.push(atof(def_val_ch));
+			    }
+			  operation=false;
 			  break;
 			}
-		      polishstack.push(res);
+		      if(operation)
+			{
+			  double res;
+			  switch(polishform[i])
+			    {
+			    case '+':
+			      res=op1+op2;
+			      break;
+			    case '-':
+			      res=op2-op1;
+			      break;
+			    case '/':
+			      res=op2/op1;
+			      break;
+			    case '*':
+			      res=op1*op2;
+			      break;
+			    default:
+			      std::cout << "How could we get here?" << std::endl;
+			      break;
+			    }
+			  polishstack.push(res);
+			}
 		    }
-		}
-	      (*emptr)[k]=polishstack.top(); 
-	    }
-
-	  //if addition was not successful addNodeMap returns one.
-	  //cause can be that there is already a map named like the new one
-	  if(gdc.mapstorage.addNodeMap(mapname,emptr, def_val))
-	    {
-	      abortion=1;
-	    }
-
-	  //add it to the list of the displayable maps
-	  gdc.mapwin.registerNewNodeMap(mapname);
-
-	  //display it
-	  gdc.changeNodeText(mapname);
-	}
-      if(!abortion)
-	{
-	  name.set_text("");
-	  default_value.set_text("0");
-	  edge.show();
-	  node.show();
-	  hide();
-	}
-    }
-}
+		  (*emptr)[k]=polishstack.top(); 
+		}
+
+	      //if addition was not successful addNodeMap returns one.
+	      //cause can be that there is already a map named like the new one
+	      if(gdc.mapstorage.addNodeMap(mapname,emptr, def_val))
+		{
+		  abortion=1;
+		}
+
+	      //add it to the list of the displayable maps
+	      gdc.mapwin.registerNewNodeMap(mapname);
+
+	      //display it
+	      //gdc.changeNodeText(mapname);
+	    }
+	  if(!abortion)
+	    {
+	      name.set_text("");
+	      default_value.set_text("0");
+	      edge.show();
+	      node.show();
+	      hide();
+	    }
+	}
+    }
+}
+
 
 std::string NewMapWin::string2Polishform(std::string rawcommand, bool itisedge)
Index: gui/new_map_win.h
===================================================================
--- gui/new_map_win.h	(revision 1814)
+++ gui/new_map_win.h	(revision 1823)
@@ -15,5 +15,5 @@
 ///on which the parameters of a new map can be set.
 
-class NewMapWin : public Gtk::Window
+class NewMapWin : public Gtk::Dialog
 {
   ///The \ref GraphDisplayerCanvas on which the graph will be drawn.
@@ -32,6 +32,5 @@
   
   ///Constructor of NewMapWin creates the widgets shown in NewMapWin.
-  NewMapWin(const std::string& title, GraphDisplayerCanvas &);
-
+  NewMapWin(const std::string& title, GraphDisplayerCanvas &, bool itisedge=true, bool edgenode=true);
   
   ///Signal on button is connected to this function,
@@ -39,7 +38,5 @@
   ///call the map/creatort function, and if yes, it
   //tells it the attributes.(name, default value)
-  virtual void buttonPressed();
-  
-  virtual void showByPreChoose(bool);
+  virtual void on_response(int response_id);
 
   virtual bool closeIfEscapeIsPressed(GdkEventKey*);
@@ -59,8 +56,4 @@
   Gtk::Entry name, default_value;
 
-  Gtk::VBox vbox;
-
-  Gtk::Button * button;
-
   Gtk::Table * table;
   Gtk::Label * label;
