Index: gui/algobox.cc
===================================================================
--- gui/algobox.cc	(revision 1879)
+++ gui/algobox.cc	(revision 1884)
@@ -74,9 +74,11 @@
   for(int i=0;i<(int)nodemapcbts.size();i++)
     {
-      update_cbt(nml, *(nodemapcbts[i]));
+      (nodemapcbts[i])->update_list(nml);
+      //update_cbt(nml, *(nodemapcbts[i]));
     }
   for(int i=0;i<(int)edgemapcbts.size();i++)
     {
-      update_cbt(eml, *(edgemapcbts[i]));
+      (edgemapcbts[i])->update_list(eml);
+      //update_cbt(eml, *(edgemapcbts[i]));
     }
 }
@@ -107,5 +109,5 @@
   pack_start(*(new Gtk::HSeparator()));
 
-  label=new Gtk::Label("Specific part for each algorithm.");
+  Gtk::Label * label=new Gtk::Label("Specific part for each algorithm.");
       
   pack_start(*label);
@@ -119,15 +121,13 @@
   for(int i=0;i<(int)nodemapcbts.size();i++)
     {
-      Gtk::HBox * hbox=new Gtk::HBox();
+      std::vector<std::string> empty_vector;
 
       std::ostringstream o;
       o << "NodeInput " << i+1 << ":";
-      label=new Gtk::Label(o.str());
 
-      nodemapcbts[i]=new Gtk::ComboBoxText();
+      nodemapcbts[i]=new MapSelector(empty_vector,"",o.str(),false, false);
+      nodemapcbts[i]->signal_newmapwin_needed().connect(sigc::mem_fun(*this, &AlgoBox::emit_new_map_signal));
 
-      hbox->pack_start(*label);
-      hbox->pack_start(*(nodemapcbts[i]));
-      pack_start(*hbox);
+      pack_start(*(nodemapcbts[i]));
     }
 
@@ -137,15 +137,13 @@
   for(int i=0;i<(int)edgemapcbts.size();i++)
     {
-      Gtk::HBox * hbox=new Gtk::HBox();
+      std::vector<std::string> empty_vector;
 
       std::ostringstream o;
       o << "EdgeInput " << i+1 << ":";
-      label=new Gtk::Label(o.str());
 
-      edgemapcbts[i]=new Gtk::ComboBoxText();
+      edgemapcbts[i]=new MapSelector(empty_vector,"",o.str(),true, false);
+      edgemapcbts[i]->signal_newmapwin_needed().connect(sigc::mem_fun(*this, &AlgoBox::emit_new_map_signal));
 
-      hbox->pack_start(*label);
-      hbox->pack_start(*(edgemapcbts[i]));
-      pack_start(*hbox);
+      pack_start(*(edgemapcbts[i]));
     }
 
@@ -171,2 +169,7 @@
     }
 }
+
+void AlgoBox::emit_new_map_signal(bool itisedge)
+{
+  signal_newmapwin_need.emit(tabcbt.get_active_text(), itisedge);
+}
Index: gui/algobox.h
===================================================================
--- gui/algobox.h	(revision 1879)
+++ gui/algobox.h	(revision 1884)
@@ -8,4 +8,5 @@
 #include <all_include.h>
 #include <mapstorage.h>
+#include <mapselector.h>
 #include <libgnomecanvasmm.h>
 #include <libgnomecanvasmm/polygon.h>
@@ -14,11 +15,10 @@
 {
   sigc::signal<void, std::string> signal_maplist_need;  
-  
-  Gtk::ComboBoxText tabcbt;
+  sigc::signal<void, std::string, bool> signal_newmapwin_need;  
 
 protected:
-  Gtk::Label * label;
-  std::vector<Gtk::ComboBoxText *> nodemapcbts;
-  std::vector<Gtk::ComboBoxText *> edgemapcbts;
+  Gtk::ComboBoxText tabcbt;
+  std::vector<MapSelector *> nodemapcbts;
+  std::vector<MapSelector *> edgemapcbts;
 
   MapStorage * mapstorage;
@@ -31,4 +31,5 @@
 
   sigc::signal<void, std::string> signal_maplist_needed();  
+  sigc::signal<void, std::string, bool> signal_newmapwin_needed(){return signal_newmapwin_need;};  
   void emit_tab_change();
 
@@ -44,4 +45,6 @@
   
   virtual void build_box();
+
+  virtual void emit_new_map_signal(bool);
 };
 #endif //ALGOBOX_H
Index: gui/algowin.cc
===================================================================
--- gui/algowin.cc	(revision 1879)
+++ gui/algowin.cc	(revision 1884)
@@ -44,4 +44,5 @@
     }
   ab->signal_maplist_needed().connect(sigc::mem_fun(*this, &AlgoWin::emit_tab_change));
+  ab->signal_newmapwin_needed().connect(sigc::mem_fun(*this, &AlgoWin::emit_new_map_signal));
 
   runbutton=new Gtk::Button("Run");
Index: gui/algowin.h
===================================================================
--- gui/algowin.h	(revision 1879)
+++ gui/algowin.h	(revision 1884)
@@ -26,4 +26,5 @@
   sigc::signal<void, AlgoWin *> signal_closed;  
   sigc::signal<void, AlgoWin *, std::string> signal_maplist_need;  
+  sigc::signal<void, std::string, bool> signal_newmapwin_need;  
 
 public:
@@ -32,6 +33,8 @@
   sigc::signal<void, AlgoWin *> signal_closing();
   sigc::signal<void, AlgoWin *, std::string> signal_maplist_needed();
+  sigc::signal<void, std::string, bool> signal_newmapwin_needed(){return signal_newmapwin_need;};  
 
   void emit_tab_change(std::string);
+  void emit_new_map_signal(std::string tabname, bool itisedge){signal_newmapwin_need.emit(tabname, itisedge);};
 
   AlgoWin(int, std::vector<std::string>);
Index: gui/kruskalbox.cc
===================================================================
--- gui/kruskalbox.cc	(revision 1881)
+++ gui/kruskalbox.cc	(revision 1884)
@@ -10,60 +10,59 @@
 void KruskalBox::run()
 {
-  Graph g=mapstorage->graph;
-  Graph::EdgeMap<double> * inputmap=
-    ((mapstorage->edgemap_storage)[(edgemapcbts[INPUT])->get_active_text()]);
-  Graph::EdgeMap<bool> outputmap(g);
-  double res=kruskal(g, *inputmap, outputmap);
+  if(
+     tabcbt.get_active_text()!="" &&
+     (edgemapcbts[INPUT])->get_active_text()!="" &&
+     (edgemapcbts[OUTPUT])->get_active_text()!=""
+     )
+    {
 
-  for (EdgeIt i(g); i!=INVALID; ++i)
-  {
-    if(outputmap[i])
-      {
-	(*((mapstorage->edgemap_storage)[(edgemapcbts[OUTPUT])->
-					 get_active_text()]))[i]=1;
-      }
-    else
-      {
-	(*((mapstorage->edgemap_storage)[(edgemapcbts[OUTPUT])->
-					 get_active_text()]))[i]=0;
-      }
-  }
+      Graph g=mapstorage->graph;
+      Graph::EdgeMap<double> * inputmap=
+	((mapstorage->edgemap_storage)[(edgemapcbts[INPUT])->get_active_text()]);
+      Graph::EdgeMap<bool> outputmap(g);
+      double res=kruskal(g, *inputmap, outputmap);
 
-  std::ostringstream o;
-  o << "Result: " << res;
-  resultlabel.set_text(o.str());
+      for (EdgeIt i(g); i!=INVALID; ++i)
+	{
+	  if(outputmap[i])
+	    {
+	      (*((mapstorage->edgemap_storage)[(edgemapcbts[OUTPUT])->
+					       get_active_text()]))[i]=1;
+	    }
+	  else
+	    {
+	      (*((mapstorage->edgemap_storage)[(edgemapcbts[OUTPUT])->
+					       get_active_text()]))[i]=0;
+	    }
+	}
 
-  mapstorage->mapChanged(true, (edgemapcbts[OUTPUT])->get_active_text());
-  //   mapstorage->changeActiveMap(true, E_COLOR,
-  // 			      (edgemapcbts[OUTPUT])->get_active_text());
-  //   mapstorage->changeActiveMap(true, E_TEXT,
-  // 			      (edgemapcbts[INPUT])->get_active_text());
+      std::ostringstream o;
+      o << "Result: " << res;
+      resultlabel.set_text(o.str());
+
+      mapstorage->mapChanged(true, (edgemapcbts[OUTPUT])->get_active_text());
+      //   mapstorage->changeActiveMap(true, E_COLOR,
+      // 			      (edgemapcbts[OUTPUT])->get_active_text());
+      //   mapstorage->changeActiveMap(true, E_TEXT,
+      // 			      (edgemapcbts[INPUT])->get_active_text());
   
+    }
 }
     
 void KruskalBox::build_box()
 {
+  std::vector<std::string> empty_vector;
+
   edgemapcbts.resize(MAP_NUM);
-  Gtk::HBox * hbox;
 
-  hbox=new Gtk::HBox();
+  edgemapcbts[0]=new MapSelector(empty_vector,"","Edgecosts: ",true, false);
+  edgemapcbts[0]->signal_newmapwin_needed().connect(sigc::mem_fun(*this, &AlgoBox::emit_new_map_signal));
 
-  label=new Gtk::Label("Edgecosts: ");
+  pack_start(*(edgemapcbts[INPUT]));
 
-  edgemapcbts[0]=new Gtk::ComboBoxText();
+  edgemapcbts[1]=new MapSelector(empty_vector,"","Edges of tree here: ",true, false);
+  edgemapcbts[1]->signal_newmapwin_needed().connect(sigc::mem_fun(*this, &AlgoBox::emit_new_map_signal));
 
-  hbox->pack_start(*label);
-  hbox->pack_start(*(edgemapcbts[INPUT]));
-  pack_start(*hbox);
-
-  hbox=new Gtk::HBox();
-
-  label=new Gtk::Label("Edges of tree here: ");
-
-  edgemapcbts[1]=new Gtk::ComboBoxText();
-
-  hbox->pack_start(*label);
-  hbox->pack_start(*(edgemapcbts[OUTPUT]));
-  pack_start(*hbox);
+  pack_start(*(edgemapcbts[OUTPUT]));
 
   resultlabel.set_text("Result: algorithm is not run yet.");
Index: gui/main_win.cc
===================================================================
--- gui/main_win.cc	(revision 1878)
+++ gui/main_win.cc	(revision 1884)
@@ -413,4 +413,5 @@
   aw->signal_closing().connect(sigc::mem_fun(*this, &MainWin::deRegisterAlgoWin));
   aw->signal_maplist_needed().connect(sigc::mem_fun(*this, &MainWin::updateAlgoWinMaps));
+  aw->signal_newmapwin_needed().connect(sigc::mem_fun(*this, &MainWin::createNewMapWinTabString));
   aws.insert(aw);
   aw->show();
@@ -457,4 +458,13 @@
       nmw->show();
     }
+}
+
+void MainWin::createNewMapWinTabString(std::string tabname, bool itisedge)
+{
+  int i=0;
+  for(;((i<tabnames.size())&&(tabnames[i]!=tabname));i++)
+    {
+    }
+  createNewMapWinAfterSignal(tabs[i], itisedge);
 }
 
Index: gui/main_win.h
===================================================================
--- gui/main_win.h	(revision 1876)
+++ gui/main_win.h	(revision 1884)
@@ -80,4 +80,5 @@
 
   virtual void createNewMapWinAfterSignal(NoteBookTab *, bool);
+  virtual void createNewMapWinTabString(std::string, bool);
   virtual void createNewMapWin();
 
Index: gui/map_win.cc
===================================================================
--- gui/map_win.cc	(revision 1849)
+++ gui/map_win.cc	(revision 1884)
@@ -25,5 +25,5 @@
   for(int i=0;i<EDGE_PROPERTY_NUM;i++)
   {
-    e_combo_array[i]=new MapSelector(eml, mytab.getActiveEdgeMap(i), i, true);
+    e_combo_array[i]=new MapSelector(eml, mytab.getActiveEdgeMap(i), edge_property_strings[i], true);
 
     (*table).attach((*(e_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3);
@@ -45,5 +45,5 @@
   for(int i=0;i<NODE_PROPERTY_NUM;i++)
   {
-    n_combo_array[i]=new MapSelector(nml, mytab.getActiveNodeMap(i), i, false);
+    n_combo_array[i]=new MapSelector(nml, mytab.getActiveNodeMap(i), node_property_strings[i], false);
 
     (*table).attach((*(n_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3);
Index: gui/mapselector.cc
===================================================================
--- gui/mapselector.cc	(revision 1882)
+++ gui/mapselector.cc	(revision 1884)
@@ -1,5 +1,5 @@
 #include "mapselector.h"
 
-MapSelector::MapSelector(std::vector<std::string> ml, std::string act, int identifier, bool edge):id(identifier),itisedge(edge),set_new_map(false)
+MapSelector::MapSelector(std::vector<std::string> ml, std::string act, std::string labeltext, bool edge, bool d):def(d),itisedge(edge),set_new_map(false)
 {
   update_list(ml);
@@ -23,12 +23,5 @@
      );
   
-  if(itisedge)
-    {
-      label=new Gtk::Label(edge_property_strings[id]);
-    }
-  else
-    {
-      label=new Gtk::Label(node_property_strings[id]);
-    }
+  label=new Gtk::Label(labeltext);
 
   label->set_width_chars(longest_property_string_length);
@@ -72,5 +65,8 @@
       cbt.append_text(*emsi);
     }
-  cbt.prepend_text("Default values");
+  if(def)
+    {
+      cbt.prepend_text("Default values");
+    }
   if(prev_act!=-1)
     {
Index: gui/new_map_win.cc
===================================================================
--- gui/new_map_win.cc	(revision 1879)
+++ gui/new_map_win.cc	(revision 1884)
@@ -115,11 +115,5 @@
 			  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));
-			      delete def_val_ch;
+			      polishstack.push(atof(ch2var[ polishform[i] ].c_str()));
 			    }
 			  operation=false;
@@ -202,11 +196,5 @@
 			  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));
-			      delete def_val_ch;
+			      polishstack.push(atof(ch2var[ polishform[i] ].c_str()));
 			    }
 			  operation=false;
