Index: gui/graph_displayer_canvas-event.cc
===================================================================
--- gui/graph_displayer_canvas-event.cc	(revision 1826)
+++ gui/graph_displayer_canvas-event.cc	(revision 1837)
@@ -95,5 +95,5 @@
       active_item=(get_item_at(clicked_x, clicked_y));
       active_node=INVALID;
-      for (NodeIt i(mapstorage.graph); i!=INVALID; ++i)
+      for (NodeIt i((mainwin.mapstorage).graph); i!=INVALID; ++i)
 	{
 	  if(nodesmap[i]==active_item)
@@ -126,5 +126,5 @@
       if(active_node!=INVALID)
       {
-        mapstorage.modified = true;
+        (mainwin.mapstorage).modified = true;
 
 	//new coordinates will be the old values,
@@ -145,6 +145,6 @@
 
         // the new coordinates of the centre of the node 
-        double coord_x = new_x - (clicked_x - mapstorage.coords[active_node].x);
-        double coord_y = new_y - (clicked_y - mapstorage.coords[active_node].y);
+        double coord_x = new_x - (clicked_x - (mainwin.mapstorage).coords[active_node].x);
+        double coord_y = new_y - (clicked_y - (mainwin.mapstorage).coords[active_node].y);
 
         clicked_x=new_x;
@@ -152,11 +152,11 @@
 
         // write back the new coordinates to the coords map
-        mapstorage.coords.set(active_node, xy<double>(coord_x, coord_y));
+        (mainwin.mapstorage).coords.set(active_node, xy<double>(coord_x, coord_y));
 
         // reposition the coordinates text
         std::ostringstream ostr;
         ostr << "(" <<
-          mapstorage.coords[active_node].x << ", " <<
-          mapstorage.coords[active_node].y << ")";
+          (mainwin.mapstorage).coords[active_node].x << ", " <<
+          (mainwin.mapstorage).coords[active_node].y << ")";
         double radius =
           (nodesmap[active_node]->property_x2().get_value() -
@@ -165,7 +165,7 @@
         {
           coord_text->property_text().set_value(ostr.str());
-          coord_text->property_x().set_value(mapstorage.coords[active_node].x +
+          coord_text->property_x().set_value((mainwin.mapstorage).coords[active_node].x +
               radius);
-          coord_text->property_y().set_value(mapstorage.coords[active_node].y -
+          coord_text->property_y().set_value((mainwin.mapstorage).coords[active_node].y -
               radius);
         }
@@ -174,6 +174,6 @@
           coord_text = new Gnome::Canvas::Text(
               displayed_graph,
-              mapstorage.coords[active_node].x + radius,
-              mapstorage.coords[active_node].y - radius,
+              (mainwin.mapstorage).coords[active_node].x + radius,
+              (mainwin.mapstorage).coords[active_node].y - radius,
               ostr.str());
           coord_text->property_fill_color().set_value("black");
@@ -182,13 +182,13 @@
 
 	//all the edges connected to the moved point has to be redrawn
-        for(OutEdgeIt ei(mapstorage.graph,active_node);ei!=INVALID;++ei)
+        for(OutEdgeIt ei((mainwin.mapstorage).graph,active_node);ei!=INVALID;++ei)
         {
             Gnome::Canvas::Points coos;
             double x1, x2, y1, y2;
 
-            nodesmap[mapstorage.graph.source(ei)]->get_bounds(x1, y1, x2, y2);
+            nodesmap[(mainwin.mapstorage).graph.source(ei)]->get_bounds(x1, y1, x2, y2);
             coos.push_back(Gnome::Art::Point((x1+x2)/2,(y1+y2)/2));
 
-            nodesmap[mapstorage.graph.target(ei)]->get_bounds(x1, y1, x2, y2);
+            nodesmap[(mainwin.mapstorage).graph.target(ei)]->get_bounds(x1, y1, x2, y2);
             coos.push_back(Gnome::Art::Point((x1+x2)/2,(y1+y2)/2));
 
@@ -209,13 +209,13 @@
         }
 
-        for(InEdgeIt ei(mapstorage.graph,active_node);ei!=INVALID;++ei)
+        for(InEdgeIt ei((mainwin.mapstorage).graph,active_node);ei!=INVALID;++ei)
         {
             Gnome::Canvas::Points coos;
             double x1, x2, y1, y2;
 
-            nodesmap[mapstorage.graph.source(ei)]->get_bounds(x1, y1, x2, y2);
+            nodesmap[(mainwin.mapstorage).graph.source(ei)]->get_bounds(x1, y1, x2, y2);
             coos.push_back(Gnome::Art::Point((x1+x2)/2,(y1+y2)/2));
 
-            nodesmap[mapstorage.graph.target(ei)]->get_bounds(x1, y1, x2, y2);
+            nodesmap[(mainwin.mapstorage).graph.target(ei)]->get_bounds(x1, y1, x2, y2);
             coos.push_back(Gnome::Art::Point((x1+x2)/2,(y1+y2)/2));
 
@@ -257,9 +257,9 @@
 
     case GDK_BUTTON_RELEASE:
-      mapstorage.modified = true;
+      (mainwin.mapstorage).modified = true;
 
       isbutton=1;
 
-      active_node=mapstorage.graph.addNode();
+      active_node=(mainwin.mapstorage).graph.addNode();
 
       //initiating values corresponding to new node in maps
@@ -268,10 +268,10 @@
 
       // update coordinates
-      mapstorage.coords.set(active_node, xy<double>(clicked_x, clicked_y));
+      (mainwin.mapstorage).coords.set(active_node, xy<double>(clicked_x, clicked_y));
 
       // update all other maps
       for (std::map<std::string, Graph::NodeMap<double>*>::const_iterator it =
-          mapstorage.nodemap_storage.begin(); it !=
-          mapstorage.nodemap_storage.end(); ++it)
+          (mainwin.mapstorage).nodemap_storage.begin(); it !=
+          (mainwin.mapstorage).nodemap_storage.end(); ++it)
       {
         if ((it->first != "coordinates_x") &&
@@ -279,9 +279,9 @@
         {
           (*(it->second))[active_node] =
-            mapstorage.nodemap_default[it->first];
+            (mainwin.mapstorage).nodemap_default[it->first];
         }
       }
       // increment the id map's default value
-      mapstorage.nodemap_default["id"] += 1.0;
+      (mainwin.mapstorage).nodemap_default["id"] += 1.0;
 
       nodesmap[active_node]=new Gnome::Canvas::Ellipse(displayed_graph,
@@ -302,5 +302,6 @@
       nodetextmap[active_node]->raise_to_top();
 
-      mapwin.updateNode(active_node);
+//       mapwin.updateNode(active_node);
+      propertyUpdate(active_node);
 
       isbutton=0;
@@ -332,5 +333,5 @@
           active_item=(get_item_at(clicked_x, clicked_y));
           active_node=INVALID;
-          for (NodeIt i(mapstorage.graph); i!=INVALID; ++i)
+          for (NodeIt i((mainwin.mapstorage).graph); i!=INVALID; ++i)
           {
             if(nodesmap[i]==active_item)
@@ -361,5 +362,5 @@
           target_item=(get_item_at(clicked_x, clicked_y));
           Node target_node=INVALID;
-          for (NodeIt i(mapstorage.graph); i!=INVALID; ++i)
+          for (NodeIt i((mainwin.mapstorage).graph); i!=INVALID; ++i)
           {
             if(nodesmap[i]==target_item)
@@ -373,5 +374,5 @@
             if(target_node!=active_node)		
             {
-              mapstorage.modified = true;
+              (mainwin.mapstorage).modified = true;
 
               *(nodesmap[target_node]) <<
@@ -379,5 +380,5 @@
 
               //creating new edge
-              active_edge=mapstorage.graph.addEdge(active_node,
+              active_edge=(mainwin.mapstorage).graph.addEdge(active_node,
                   target_node);
 
@@ -385,12 +386,12 @@
               for (std::map<std::string,
                   Graph::EdgeMap<double>*>::const_iterator it =
-                  mapstorage.edgemap_storage.begin(); it !=
-                  mapstorage.edgemap_storage.end(); ++it)
+                  (mainwin.mapstorage).edgemap_storage.begin(); it !=
+                  (mainwin.mapstorage).edgemap_storage.end(); ++it)
               {
                 (*(it->second))[active_edge] =
-                  mapstorage.edgemap_default[it->first];
+                  (mainwin.mapstorage).edgemap_default[it->first];
               }
               // increment the id map's default value
-              mapstorage.edgemap_default["id"] += 1.0;
+              (mainwin.mapstorage).edgemap_default["id"] += 1.0;
 
               //calculating coordinates of new edge
@@ -424,5 +425,6 @@
 
               //updating its properties
-              mapwin.updateEdge(active_edge);
+//               mapwin.updateEdge(active_edge);
+              propertyUpdate(active_edge);
             }
             else
@@ -479,5 +481,5 @@
       active_edge=INVALID;
       //was it a node?
-      for (NodeIt i(mapstorage.graph); i!=INVALID; ++i)
+      for (NodeIt i((mainwin.mapstorage).graph); i!=INVALID; ++i)
 	{
 	  if(nodesmap[i]==active_item)
@@ -489,5 +491,5 @@
       if(active_node==INVALID)
 	{
-	  for (EdgeIt i(mapstorage.graph); i!=INVALID; ++i)
+	  for (EdgeIt i((mainwin.mapstorage).graph); i!=INVALID; ++i)
 	    {
 	      if(edgesmap[i]==active_item)
@@ -515,14 +517,14 @@
 	      if(active_node!=INVALID)
 		{
-                  mapstorage.modified = true;
+                  (mainwin.mapstorage).modified = true;
 
 		  std::set<Graph::Edge> edges_to_delete;
 
-		  for(OutEdgeIt e(mapstorage.graph,active_node);e!=INVALID;++e)
+		  for(OutEdgeIt e((mainwin.mapstorage).graph,active_node);e!=INVALID;++e)
 		    {
 		      edges_to_delete.insert(e);
 		    }
 		  
-		  for(InEdgeIt e(mapstorage.graph,active_node);e!=INVALID;++e)
+		  for(InEdgeIt e((mainwin.mapstorage).graph,active_node);e!=INVALID;++e)
 		    {
 		      edges_to_delete.insert(e);
@@ -588,5 +590,5 @@
 
           //find the activated item between texts
-          for (EdgeIt i(mapstorage.graph); i!=INVALID; ++i)
+          for (EdgeIt i((mainwin.mapstorage).graph); i!=INVALID; ++i)
           {
             //at the same time only one can be active
@@ -600,5 +602,5 @@
           if(clicked_edge==INVALID)
           {
-            for (EdgeIt i(mapstorage.graph); i!=INVALID; ++i)
+            for (EdgeIt i((mainwin.mapstorage).graph); i!=INVALID; ++i)
             {
               //at the same time only one can be active
@@ -623,5 +625,5 @@
 
               //create a dialog
-              Gtk::Dialog dialog("Edit value", *parentwin, true);
+              Gtk::Dialog dialog("Edit value", mainwin, true);
               dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
               dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_ACCEPT);
@@ -640,5 +642,5 @@
                 case Gtk::RESPONSE_ACCEPT:
                   double new_value = spin.get_value();
-                  (*mapstorage.edgemap_storage[edgemap_to_edit])[active_edge] =
+                  (*(mainwin.mapstorage).edgemap_storage[edgemap_to_edit])[active_edge] =
                     new_value;
                   std::ostringstream ostr;
@@ -647,5 +649,6 @@
                       ostr.str());
                   //mapwin.updateEdge(active_edge);
-                  mapwin.updateEdge(Edge(INVALID));
+//                   mapwin.updateEdge(Edge(INVALID));
+                  propertyUpdate(Edge(INVALID));
               }
             }
@@ -675,5 +678,5 @@
 
           //find the activated item between texts
-          for (NodeIt i(mapstorage.graph); i!=INVALID; ++i)
+          for (NodeIt i((mainwin.mapstorage).graph); i!=INVALID; ++i)
           {
             //at the same time only one can be active
@@ -687,5 +690,5 @@
           if(clicked_node==INVALID)
           {
-            for (NodeIt i(mapstorage.graph); i!=INVALID; ++i)
+            for (NodeIt i((mainwin.mapstorage).graph); i!=INVALID; ++i)
             {
               //at the same time only one can be active
@@ -710,5 +713,5 @@
 
               //create a dialog
-              Gtk::Dialog dialog("Edit value", *parentwin, true);
+              Gtk::Dialog dialog("Edit value", mainwin, true);
               dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
               dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_ACCEPT);
@@ -727,5 +730,5 @@
                 case Gtk::RESPONSE_ACCEPT:
                   double new_value = spin.get_value();
-                  (*mapstorage.nodemap_storage[nodemap_to_edit])[active_node] =
+                  (*(mainwin.mapstorage).nodemap_storage[nodemap_to_edit])[active_node] =
                     new_value;
                   std::ostringstream ostr;
@@ -734,5 +737,6 @@
                       ostr.str());
                   //mapwin.updateNode(active_node);
-                  mapwin.updateNode(Node(INVALID));
+//                   mapwin.updateNode(Node(INVALID));
+                  propertyUpdate(Node(INVALID));
               }
             }
@@ -751,5 +755,5 @@
   delete(nodetextmap[node_to_delete]);
   delete(nodesmap[node_to_delete]);
-  mapstorage.graph.erase(node_to_delete);
+  (mainwin.mapstorage).graph.erase(node_to_delete);
 }
 
@@ -758,5 +762,5 @@
   delete(edgetextmap[edge_to_delete]);
   delete(edgesmap[edge_to_delete]);
-  mapstorage.graph.erase(edge_to_delete);
+  (mainwin.mapstorage).graph.erase(edge_to_delete);
 }
 
@@ -778,5 +782,5 @@
       else
 	{
-	  for (EdgeIt i(mapstorage.graph); i!=INVALID; ++i)
+	  for (EdgeIt i((mainwin.mapstorage).graph); i!=INVALID; ++i)
 	    {
 	      if(edgesmap[i]==active_bre)
@@ -804,9 +808,9 @@
 {
   //create the new map
-  Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (mapstorage.graph, default_value);
+  Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> ((mainwin.mapstorage).graph, default_value);
 
   //if addition was not successful addEdgeMap returns one.
   //cause can be that there is already a map named like the new one
-  if(mapstorage.addEdgeMap(mapname,emptr, default_value))
+  if((mainwin.mapstorage).addEdgeMap(mapname,emptr, default_value))
     {
       return 1;
@@ -815,5 +819,5 @@
 
   //add it to the list of the displayable maps
-  mapwin.registerNewEdgeMap(mapname);
+  mainwin.registerNewEdgeMap(mapname);
 
   //display it
@@ -826,9 +830,9 @@
 {
   //create the new map
-  Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (mapstorage.graph,default_value);
+  Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> ((mainwin.mapstorage).graph,default_value);
 
   //if addition was not successful addNodeMap returns one.
   //cause can be that there is already a map named like the new one
-  if(mapstorage.addNodeMap(mapname,emptr, default_value))
+  if((mainwin.mapstorage).addNodeMap(mapname,emptr, default_value))
     {
       return 1;
@@ -836,5 +840,5 @@
 
   //add it to the list of the displayable maps
-  mapwin.registerNewNodeMap(mapname);
+  mainwin.registerNewNodeMap(mapname);
 
   //display it
