Index: gui/graph_displayer_canvas-event.cc
===================================================================
--- gui/graph_displayer_canvas-event.cc	(revision 1551)
+++ gui/graph_displayer_canvas-event.cc	(revision 1562)
@@ -14,49 +14,63 @@
 void GraphDisplayerCanvas::changeEditorialTool(int newtool)
 {
-  actual_handler.disconnect();
-
-  if(actual_tool==CREATE_EDGE)
+  if(actual_tool!=newtool)
     {
-	GdkEvent * generated=new GdkEvent();
-	generated->type=GDK_BUTTON_RELEASE;
-	generated->button.button=3;
-	createEdgeEventHandler(generated);      
-    }
-
-  actual_tool=newtool;
-
-  active_item=NULL; 
-  target_item=NULL; 
-  active_edge=INVALID;	
-  active_node=INVALID;	
-
-  switch(newtool)
-    {
-    case MOVE:
-      actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::moveEventHandler), false);
-      break;
-
-    case CREATE_NODE:
-      actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::createNodeEventHandler), false);
-      break;
-
-    case CREATE_EDGE:
-      actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::createEdgeEventHandler), false);
-      break;
-
-    case ERASER:
-      actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::eraserEventHandler), false);
-      break;
-
-    case EDGE_MAP_EDIT:
-      actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::edgeMapEditEventHandler), false);
-      break;
-
-    case NODE_MAP_EDIT:
-      actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::nodeMapEditEventHandler), false);
-      break;
-
-    default:
-      break;
+
+      actual_handler.disconnect();
+
+      switch(actual_tool)
+	{
+	case CREATE_EDGE:
+	  {
+	    GdkEvent * generated=new GdkEvent();
+	    generated->type=GDK_BUTTON_RELEASE;
+	    generated->button.button=3;
+	    createEdgeEventHandler(generated);      
+	    break;
+	  }
+	case EDGE_MAP_EDIT:
+	  break;
+	default:
+	  break;
+	}
+
+      active_item=NULL; 
+      target_item=NULL; 
+      active_edge=INVALID;	
+      active_node=INVALID;	
+
+
+      actual_tool=newtool;
+  
+      switch(newtool)
+	{
+	case MOVE:
+	  actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::moveEventHandler), false);
+	  break;
+
+	case CREATE_NODE:
+	  actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::createNodeEventHandler), false);
+	  break;
+
+	case CREATE_EDGE:
+	  actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::createEdgeEventHandler), false);
+	  break;
+
+	case ERASER:
+	  actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::eraserEventHandler), false);
+	  break;
+
+	case EDGE_MAP_EDIT:
+	  grab_focus();
+	  actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::edgeMapEditEventHandler), false);
+	  break;
+
+	case NODE_MAP_EDIT:
+	  actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::nodeMapEditEventHandler), false);
+	  break;
+
+	default:
+	  break;
+	}
     }
 }
@@ -493,33 +507,58 @@
   switch(e->type)
     {
+    case GDK_KEY_PRESS:
+      {
+	std::cout << "Any button was pressed" << std::endl;
+	switch(((GdkEventKey*)e)->keyval)
+	  {
+	  case GDK_A:
+	    std::cout << "A button was pressed" << std::endl;
+	    break;
+	  default:
+	    break;
+	  }
+  
+	break;
+      }
     case GDK_BUTTON_PRESS:
-      window_to_world (e->button.x, e->button.y, clicked_x, clicked_y);
-      active_item=(get_item_at(clicked_x, clicked_y));
-      active_edge=INVALID;
-      for (EdgeIt i(g); i!=INVALID; ++i)
-	{
-	  if(edgesmap[i]==active_item)
-	    {
-	      active_edge=i;
-	    }
-	}
-      if((active_edge!=INVALID)&&(edgetextmap[active_edge]->property_text().get_value()!=""))
-	{
-	  if(canvasentrywidget)
-	    {
-	      delete(canvasentrywidget);
-	    }
-	  entrywidget.show();
-	  entrywidget.set_text(edgetextmap[active_edge]->property_text().get_value());
-	  xy<double> entry_coos;
-	  entry_coos.x=(edgetextmap[active_edge])->property_x().get_value();
-	  entry_coos.x-=edgetextmap[active_edge]->property_text_width().get_value()/2;
-	  entry_coos.y=(edgetextmap[active_edge])->property_y().get_value();
-	  entry_coos.y-=edgetextmap[active_edge]->property_text_height().get_value()*1.5/2;
-	  canvasentrywidget=new Gnome::Canvas::Widget(displayed_graph, entry_coos.x, entry_coos.y, entrywidget);
-	  canvasentrywidget->property_width().set_value(edgetextmap[active_edge]->property_text_width().get_value()*1.5);
-	  canvasentrywidget->property_height().set_value(edgetextmap[active_edge]->property_text_height().get_value()*1.5);
-	}
-      break;
+      {
+	window_to_world (e->button.x, e->button.y, clicked_x, clicked_y);
+	active_item=(get_item_at(clicked_x, clicked_y));
+	Graph::EdgeIt clicked_edge=INVALID;
+	for (EdgeIt i(g); i!=INVALID; ++i)
+	  {
+	    if(edgesmap[i]==active_item)
+	      {
+		clicked_edge=i;
+	      }
+	  }
+	if(clicked_edge!=INVALID)
+	  {
+	    if(edgetextmap[clicked_edge]->property_text().get_value()!="")
+	      {
+		active_edge=clicked_edge;
+		if(canvasentrywidget)
+		  {
+		    delete(canvasentrywidget);
+		  }
+		entrywidget.show();
+		entrywidget.set_text(edgetextmap[active_edge]->property_text().get_value());
+		xy<double> entry_coos;
+		entry_coos.x=(edgetextmap[active_edge])->property_x().get_value();
+		entry_coos.x-=edgetextmap[active_edge]->property_text_width().get_value()/2;
+		entry_coos.y=(edgetextmap[active_edge])->property_y().get_value();
+		entry_coos.y-=edgetextmap[active_edge]->property_text_height().get_value()*1.5/2;
+		canvasentrywidget=new Gnome::Canvas::Widget(displayed_graph, entry_coos.x, entry_coos.y, entrywidget);
+		canvasentrywidget->property_width().set_value(edgetextmap[active_edge]->property_text_width().get_value()*1.5);
+		canvasentrywidget->property_height().set_value(edgetextmap[active_edge]->property_text_height().get_value()*1.5);
+	      }
+	  }
+	else
+	  {
+	    //mentse el -> problema, hogy nem tudja melyik map-be
+	    entrywidget.hide();
+	  }
+	break;
+      }
     default:
       break;
@@ -530,4 +569,12 @@
 bool GraphDisplayerCanvas::nodeMapEditEventHandler(GdkEvent* e)
 {
+  e=e;
+  return false;
+}
+
+bool GraphDisplayerCanvas::entryWidgetChangeHandler(GdkEvent* e)
+{
+  Glib::ustring mapvalue = entrywidget.get_text();
+  std::cout << mapvalue << std::endl;
   e=e;
   return false;
Index: gui/graph_displayer_canvas.cc
===================================================================
--- gui/graph_displayer_canvas.cc	(revision 1550)
+++ gui/graph_displayer_canvas.cc	(revision 1562)
@@ -6,9 +6,13 @@
 {
   
+  active_node=INVALID;
+  active_edge=INVALID;
+
+  //setting event handler for the editor widget
+  entrywidget.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::entryWidgetChangeHandler), false);
+
+  //base event handler is move tool
   actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::moveEventHandler), false);
   actual_tool=CREATE_NODE;
-
-  active_node=INVALID;
-  active_edge=INVALID;
 
   //set_center_scroll_region(true);
Index: gui/graph_displayer_canvas.h
===================================================================
--- gui/graph_displayer_canvas.h	(revision 1550)
+++ gui/graph_displayer_canvas.h	(revision 1562)
@@ -91,4 +91,7 @@
   bool nodeMapEditEventHandler(GdkEvent*);
 
+  ///event handler for the case when the entry widget is changed
+  bool entryWidgetChangeHandler(GdkEvent*);
+
 public:
   ///Moves the text to new place
