Index: algobox.cc
===================================================================
--- algobox.cc	(revision 106)
+++ algobox.cc	(revision 108)
@@ -4,10 +4,10 @@
 enum {E_DEMO1, EDGE_INPUT_NUM}; // input IDs for edges;
 
-AlgoBox::AlgoBox(std::vector<std::string> tabnames, std::vector<std::string> nodemapnames, std::vector<std::string> edgemapnames)
+AlgoBox::AlgoBox(std::vector<std::string> tabnames)
 {
-  init(tabnames, nodemapnames, edgemapnames);
+  init(tabnames);
 }
 
-void AlgoBox::init(std::vector<std::string> tabnames, std::vector<std::string> nodemapnames, std::vector<std::string> edgemapnames)
+void AlgoBox::init(std::vector<std::string> tabnames)
 {
   set_spacing(5);
@@ -19,8 +19,5 @@
 
   pack_start(tabcbt);
-
   build_box();
-
-  update_maplist(nodemapnames, edgemapnames);
 
   show_all_children();
@@ -53,5 +50,5 @@
   else if(actptr>0) //so there is item in the list
     {
-      cbt.set_active(0);
+      //cbt.set_active(0);
     }
 }
@@ -63,6 +60,16 @@
 }
 
-void AlgoBox::update_maplist( std::vector< std::string > nml, std::vector< std::string > eml )
+void AlgoBox::update_maplist( void * ms)
 {
+  mapstorage=(MapStorage *)ms;
+  std::vector<std::string> nml;
+  std::vector<std::string> eml;
+  if(mapstorage!=NULL)
+    {
+      mapstorage->signal_node_map_ch().connect(sigc::mem_fun(*this, &AlgoBox::nodemaplist_changed));
+      mapstorage->signal_edge_map_ch().connect(sigc::mem_fun(*this, &AlgoBox::edgemaplist_changed));
+      nml=mapstorage->getNodeMapList();
+      eml=mapstorage->getNodeMapList();
+    }
   for(int i=0;i<(int)nodemapcbts.size();i++)
     {
@@ -72,4 +79,20 @@
     {
       update_cbt(eml, *(edgemapcbts[i]));
+    }
+}
+
+void AlgoBox::nodemaplist_changed(std::string newmap)
+{
+  for(int i=0;i<(int)nodemapcbts.size();i++)
+    {
+      (nodemapcbts[i])->append_text(newmap);
+    }
+}
+
+void AlgoBox::edgemaplist_changed(std::string newmap)
+{
+  for(int i=0;i<(int)edgemapcbts.size();i++)
+    {
+      (edgemapcbts[i])->append_text(newmap);
     }
 }
@@ -137,4 +160,13 @@
 void AlgoBox::emit_tab_change()
 {
-  signal_maplist_need.emit(tabcbt.get_active_text());
+  std::string active_tab=tabcbt.get_active_text();
+  if(active_tab!="")
+    {
+      signal_maplist_need.emit(active_tab);
+    }
+  else
+    {
+      std::vector<std::string> empty_vector;
+      update_maplist(NULL);
+    }
 }
Index: algobox.h
===================================================================
--- algobox.h	(revision 106)
+++ algobox.h	(revision 108)
@@ -7,4 +7,5 @@
 
 #include <all_include.h>
+#include <mapstorage.h>
 #include <libgnomecanvasmm.h>
 #include <libgnomecanvasmm/polygon.h>
@@ -20,10 +21,12 @@
   std::vector<Gtk::ComboBoxText *> nodemapcbts;
   std::vector<Gtk::ComboBoxText *> edgemapcbts;
-  
+
+  MapStorage * mapstorage;
+
 public:
   AlgoBox(){};
-  AlgoBox(std::vector<std::string>, std::vector<std::string>, std::vector<std::string>);
+  AlgoBox(std::vector<std::string>);
 
-  virtual void init(std::vector<std::string>, std::vector<std::string>, std::vector<std::string>);
+  virtual void init(std::vector<std::string>);
 
   sigc::signal<void, std::string> signal_maplist_needed();  
@@ -31,5 +34,8 @@
 
   void update_tablist( std::vector< std::string > tl );
-  void update_maplist( std::vector< std::string >, std::vector< std::string >);
+  void update_maplist( void * );
+
+  void nodemaplist_changed(std::string);
+  void edgemaplist_changed(std::string);
 
   void update_cbt( std::vector< std::string > tl, Gtk::ComboBoxText &);
Index: algowin.cc
===================================================================
--- algowin.cc	(revision 106)
+++ algowin.cc	(revision 108)
@@ -21,5 +21,5 @@
 }
 
-AlgoWin::AlgoWin(int algoid, std::vector<std::string> tabnames, std::vector<std::string> nodemapnames,std::vector<std::string> edgemapnames)
+AlgoWin::AlgoWin(int algoid, std::vector<std::string> tabnames)
 {
   signal_key_press_event().connect(sigc::mem_fun(*this, &AlgoWin::closeIfEscapeIsPressed));
@@ -33,9 +33,9 @@
     {
     case 0:
-      ab=new AlgoBox(tabnames, nodemapnames, edgemapnames);
+      ab=new AlgoBox(tabnames);
       set_title("Algo Win Demo");
       break;
     case 1:
-      ab=new KruskalBox(tabnames, nodemapnames, edgemapnames);
+      ab=new KruskalBox(tabnames);
       set_title("Kruskal Algorithm");
       break;
@@ -72,7 +72,7 @@
 }
 
-void AlgoWin::update_maplist(std::vector<std::string> nodemapnames, std::vector<std::string> edgemapnames)
+void AlgoWin::update_maplist(void * mapstorage)
 {
-  ab->update_maplist(nodemapnames, edgemapnames);
+  ab->update_maplist(mapstorage);
 }
 
Index: algowin.h
===================================================================
--- algowin.h	(revision 106)
+++ algowin.h	(revision 108)
@@ -32,8 +32,8 @@
   void emit_tab_change(std::string);
 
-  AlgoWin(int, std::vector<std::string>, std::vector<std::string>, std::vector<std::string>);
+  AlgoWin(int, std::vector<std::string>);
 
   void update_tablist(std::vector<std::string> tabnames);
-  void update_maplist(std::vector<std::string>, std::vector<std::string>);
+  void update_maplist( void *);
 
   void on_hide();
Index: kruskalbox.cc
===================================================================
--- kruskalbox.cc	(revision 106)
+++ kruskalbox.cc	(revision 108)
@@ -1,11 +1,12 @@
 #include <kruskalbox.h>
 
-KruskalBox::KruskalBox(std::vector<std::string> t, std::vector<std::string> nm, std::vector<std::string> em):AlgoBox()
+KruskalBox::KruskalBox(std::vector<std::string> t):AlgoBox()
 {
-  init(t, nm, em);
+  init(t);
 }
     
 void KruskalBox::run()
 {
+  
   std::cout << "Kruskal inditasa, de meg nincsen keszen." << std::endl;
 }
Index: kruskalbox.h
===================================================================
--- kruskalbox.h	(revision 106)
+++ kruskalbox.h	(revision 108)
@@ -15,5 +15,5 @@
 {
 public:
-  KruskalBox(std::vector<std::string> t, std::vector<std::string> nm, std::vector<std::string> em);
+  KruskalBox(std::vector<std::string> t);
     
   void run();
Index: main_win.cc
===================================================================
--- main_win.cc	(revision 107)
+++ main_win.cc	(revision 108)
@@ -410,5 +410,5 @@
 void MainWin::createAlgoWin(int algoid)
 {
-  AlgoWin * aw=new AlgoWin(algoid, tabnames, tabs[0]->mapstorage.getNodeMapList(),tabs[0]->mapstorage.getEdgeMapList());
+  AlgoWin * aw=new AlgoWin(algoid, tabnames);
   aw->signal_closing().connect(sigc::mem_fun(*this, &MainWin::deRegisterAlgoWin));
   aw->signal_maplist_needed().connect(sigc::mem_fun(*this, &MainWin::updateAlgoWinMaps));
@@ -417,4 +417,13 @@
 }
 
+void MainWin::updateAlgoWinTabs()
+{
+  std::set< AlgoWin* >::iterator awsi=aws.begin();
+  for(;awsi!=aws.end();awsi++)
+    {
+      (*awsi)->update_tablist(tabnames);
+    }
+}
+
 void MainWin::updateAlgoWinMaps(AlgoWin * awp, std::string tabname)
 {
@@ -423,5 +432,6 @@
     {
     }
-  awp->update_maplist(tabs[i]->mapstorage.getNodeMapList(),tabs[i]->mapstorage.getEdgeMapList());
+  //awp->update_maplist(tabs[i]->mapstorage.getNodeMapList(),tabs[i]->mapstorage.getEdgeMapList());
+  awp->update_maplist(&(tabs[i]->mapstorage));
 }
 
@@ -429,13 +439,4 @@
 {
   aws.erase(awp);
-}
-
-void MainWin::updateAlgoWinTabs()
-{
-  std::set< AlgoWin* >::iterator awsi=aws.begin();
-  for(;awsi!=aws.end();awsi++)
-    {
-      (*awsi)->update_tablist(tabnames);
-    }
 }
 
Index: mapstorage.cc
===================================================================
--- mapstorage.cc	(revision 101)
+++ mapstorage.cc	(revision 108)
@@ -59,4 +59,7 @@
       // set the maps default value
       nodemap_default[name] = default_value;
+
+      //announce changement in maps
+      signal_node_map.emit(name);
       return 0;
     }
@@ -127,4 +130,7 @@
       // set the maps default value
       edgemap_default[name] = default_value;
+
+      //announce changement in maps
+      signal_edge_map.emit(name);
       return 0;
     }
Index: mapstorage.h
===================================================================
--- mapstorage.h	(revision 98)
+++ mapstorage.h	(revision 108)
@@ -61,4 +61,6 @@
   typedef sigc::signal<void, bool, int> Signal_Prop;
   Signal_Prop signal_prop;
+  sigc::signal<void, std::string> signal_node_map;
+  sigc::signal<void, std::string> signal_edge_map;
 
 public:
@@ -82,4 +84,7 @@
 
   Signal_Prop signal_prop_ch();
+
+  sigc::signal<void, std::string> signal_node_map_ch(){return signal_node_map;};
+  sigc::signal<void, std::string> signal_edge_map_ch(){return signal_edge_map;};
 
   ///Adds given map to storage. A name and the map itself has to be provided.
Index: nbtab.cc
===================================================================
--- nbtab.cc	(revision 102)
+++ nbtab.cc	(revision 108)
@@ -8,4 +8,6 @@
   //connecting signals - controller character
   mapstorage.signal_prop_ch().connect(sigc::mem_fun(*gd_canvas, &GraphDisplayerCanvas::propertyChange));
+  mapstorage.signal_node_map_ch().connect(sigc::mem_fun(*this, &NoteBookTab::registerNewNodeMap));
+  mapstorage.signal_edge_map_ch().connect(sigc::mem_fun(*this, &NoteBookTab::registerNewEdgeMap));
   show_all_children();
   show();
Index: new_map_win.cc
===================================================================
--- new_map_win.cc	(revision 96)
+++ new_map_win.cc	(revision 108)
@@ -160,5 +160,6 @@
 
 	      //add it to the list of the displayable maps
-	      mytab.registerNewEdgeMap(mapname);
+	      //furthermore it is done by signals
+	      //mytab.registerNewEdgeMap(mapname);
 
 	      //display it
@@ -243,5 +244,6 @@
 
 	      //add it to the list of the displayable maps
-	      mytab.registerNewNodeMap(mapname);
+	      //furthermore it is done by signals
+	      //mytab.registerNewNodeMap(mapname);
 
 	      //display it
