Index: gui/algobox.h
===================================================================
--- gui/algobox.h	(revision 1871)
+++ gui/algobox.h	(revision 1871)
@@ -0,0 +1,62 @@
+// -*- C++ -*- //
+
+#ifndef ALGOBOX_H
+#define ALGOBOX_H
+
+class AlgoBox;
+
+#include <all_include.h>
+#include <libgnomecanvasmm.h>
+#include <libgnomecanvasmm/polygon.h>
+
+class AlgoBox : public Gtk::VBox
+{
+  
+  Gtk::Label * label;
+  Gtk::ComboBoxText cbt;
+  
+ public:
+  AlgoBox(std::vector<std::string> tabnames)
+    {
+      update_tablist(tabnames);
+
+      label=new Gtk::Label("Haliho");
+      
+      pack_start(*label);
+      pack_start(cbt);
+
+      show_all_children();
+    };
+
+  void update_tablist( std::vector< std::string > tl )
+    {
+      std::string actname=cbt.get_active_text();
+      int prev_act=-1;
+
+      cbt.clear();
+      int actptr=0;
+
+      std::vector< std::string >::iterator emsi=tl.begin();
+      for(;emsi!=tl.end();emsi++)
+	{
+	  if(actname==*emsi)
+	    {
+	      prev_act=actptr;
+	    }
+
+	  cbt.append_text(*emsi);
+	  actptr++;
+	}
+
+      if(prev_act!=-1)
+	{
+	  cbt.set_active(prev_act);
+	}
+      else if(actptr>0) //so there is item in the list
+	{
+	  cbt.set_active(0);
+	}
+    }
+
+};
+#endif //ALGOBOX_H
Index: gui/algowin.h
===================================================================
--- gui/algowin.h	(revision 1871)
+++ gui/algowin.h	(revision 1871)
@@ -0,0 +1,53 @@
+// -*- C++ -*- //
+
+#ifndef ALGOWIN_H
+#define ALGOWIN_H
+
+class AlgoWin;
+
+#include <all_include.h>
+#include <algobox.h>
+#include <libgnomecanvasmm.h>
+#include <libgnomecanvasmm/polygon.h>
+
+enum {GENERAL, ALGO_NUM}; // algorithm IDs;
+
+class AlgoWin : public Gtk::Dialog
+{
+private:
+  AlgoBox * ab;
+
+protected:
+  sigc::signal<void, AlgoWin *> signal_closed;  
+
+public:
+  sigc::signal<void, AlgoWin *> signal_closing()
+  {
+    return signal_closed;
+  }
+
+  AlgoWin(int algoid, std::vector<std::string> tabnames)
+    {
+      Gtk::VBox * vbox=get_vbox();
+      
+      ab=new AlgoBox(tabnames);
+      
+      vbox->pack_start(*ab);
+      
+      add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
+      
+      show_all_children();
+    };
+
+  void update_tablist(std::vector<std::string> tabnames)
+  {
+    ab->update_tablist(tabnames);
+  }
+
+  void on_hide()
+  {
+    signal_closed.emit(this);
+    Gtk::Dialog::on_hide();
+  }
+};
+#endif //ALGOWIN_H
Index: gui/main_win.cc
===================================================================
--- gui/main_win.cc	(revision 1869)
+++ gui/main_win.cc	(revision 1871)
@@ -101,4 +101,8 @@
   ag->add( Gtk::Action::create("ShowMaps", "_Maps"),
 	   sigc::mem_fun(*this, &MainWin::createMapWin));
+
+  ag->add( Gtk::Action::create("AlgoMenu", "_Algorithms") );
+  ag->add( Gtk::Action::create("AlgoGeneral", "_General"),
+	   sigc::bind( sigc::mem_fun ( *this, &MainWin::createAlgoWin ), 0) );
 
   Gtk::RadioAction::Group tool_group;
@@ -147,4 +151,7 @@
       "    <menu action='ShowMenu'>"
       "      <menuitem action='ShowMaps'/>"
+      "    </menu>"
+      "    <menu action='AlgoMenu'>"
+      "      <menuitem action='AlgoGeneral'/>"
       "    </menu>"
       "  </menubar>"
@@ -207,4 +214,5 @@
   set_title(tabnames[active_tab] + " - " + prog_name);
   notebook.set_tab_label_text((Widget&)*(tabs[active_tab]), tabnames[active_tab]);
+  updateAlgoWins();
 }
 
@@ -229,4 +237,5 @@
   notebook.set_current_page(size);
   set_tabtitle(tabnames[active_tab]);
+  updateAlgoWins();
 }
 
@@ -259,10 +268,11 @@
 	  for(int i=active_tab+1;i<size;i++)
 	    {
+	      tabnames[i-1]=tabnames[i];
 	      tabs[i-1]=tabs[i];
 	    }
 	}
-
       //if size==1 resize will delete the only element
       tabs.resize(size-1);
+      tabnames.resize(size-1);
 
       int old_active_tab=active_tab;
@@ -275,8 +285,10 @@
       //and this should be registrated in tabs vector,
       //as well.
-      if(old_active_tab==0)
+      if((old_active_tab==0)&&(size!=1))
 	{
 	  onChangeTab(NULL,0);
 	}
+
+      std::cout << "NAAAA" << std::endl;
 
       //if this was the last page in notebook, there is
@@ -286,4 +298,6 @@
 	  active_tab=-1;
 	}
+
+      updateAlgoWins();
     }
 }
@@ -381,4 +395,26 @@
 }
 
+void MainWin::createAlgoWin(int algoid)
+{
+  AlgoWin * aw=new AlgoWin(algoid, tabnames);
+  aw->signal_closing().connect(sigc::mem_fun(*this, &MainWin::deRegisterAlgoWin));
+  aws.insert(aw);
+  aw->show();
+}
+
+void MainWin::deRegisterAlgoWin(AlgoWin * awp)
+{
+  aws.erase(awp);
+}
+
+void MainWin::updateAlgoWins()
+{
+  std::set< AlgoWin* >::iterator awsi=aws.begin();
+  for(;awsi!=aws.end();awsi++)
+    {
+      (*awsi)->update_tablist(tabnames);
+    }
+}
+
 void MainWin::changeEditorialTool(int tool)
 {
Index: gui/main_win.h
===================================================================
--- gui/main_win.h	(revision 1856)
+++ gui/main_win.h	(revision 1871)
@@ -5,4 +5,5 @@
 
 #include "all_include.h"
+#include "algowin.h"
 #include "map_win.h"
 #include "new_map_win.h"
@@ -26,4 +27,6 @@
   std::vector<NoteBookTab *> tabs;
   std::vector<std::string> tabnames;
+
+  std::set< AlgoWin* > aws;
 
 public:
@@ -67,4 +70,8 @@
   virtual void createMapWin();
 
+  virtual void createAlgoWin(int);
+  virtual void deRegisterAlgoWin(AlgoWin *);
+  virtual void updateAlgoWins();
+
   virtual void changeEditorialTool(int);
 
