# HG changeset patch # User hegyi # Date 1122401663 0 # Node ID 9192e1b26d329617bf230a8c207b173a271e6b43 # Parent b79bcba43661a7870dc4dec4cc8a6d127b62b6a3 creates one new edgemap diff -r b79bcba43661 -r 9192e1b26d32 gui/graph_displayer_canvas-edge.cc --- a/gui/graph_displayer_canvas-edge.cc Tue Jul 26 14:31:29 2005 +0000 +++ b/gui/graph_displayer_canvas-edge.cc Tue Jul 26 18:14:23 2005 +0000 @@ -106,9 +106,8 @@ int GraphDisplayerCanvas::changeEdgeText (std::string mapname, Graph::Edge edge) { - //the number in the map will be written on the edge - //EXCEPT when the name of the map is Text, because + //EXCEPT when the name of the map is Default, because //in that case empty string will be written, because //that is the deleter map diff -r b79bcba43661 -r 9192e1b26d32 gui/graph_displayer_canvas-event.cc --- a/gui/graph_displayer_canvas-event.cc Tue Jul 26 14:31:29 2005 +0000 +++ b/gui/graph_displayer_canvas-event.cc Tue Jul 26 18:14:23 2005 +0000 @@ -805,10 +805,10 @@ void GraphDisplayerCanvas::addNewEdgeMap() { - Graph::EdgeMap * emptr=new Graph::EdgeMap (g); + Graph::EdgeMap * emptr=new Graph::EdgeMap (g,20); mapstorage.addEdgeMap("NewEdgeMap",emptr); mapwin->registerNewEdgeMap("NewEdgeMap"); - std::cout << "Add New EdgeMap is not yet implemented." << std::endl; + changeEdgeText("NewEdgeMap"); } void GraphDisplayerCanvas::addNewNodeMap() diff -r b79bcba43661 -r 9192e1b26d32 gui/graph_displayer_canvas.h --- a/gui/graph_displayer_canvas.h Tue Jul 26 14:31:29 2005 +0000 +++ b/gui/graph_displayer_canvas.h Tue Jul 26 18:14:23 2005 +0000 @@ -149,7 +149,7 @@ Gnome::Canvas::Widget * canvasentrywidget; ///Here we store the maps that can be displayed through properties. - MapStorage mapstorage; + MapStorage & mapstorage; ///Indicates whether the button of mouse is pressed or not int isbutton; diff -r b79bcba43661 -r 9192e1b26d32 gui/map_win.cc --- a/gui/map_win.cc Tue Jul 26 14:31:29 2005 +0000 +++ b/gui/map_win.cc Tue Jul 26 18:14:23 2005 +0000 @@ -122,6 +122,7 @@ void MapWin::eComboChanged(int prop) { + Gtk::Entry* entry = e_combo_array[prop].get_entry(); if(entry) @@ -249,12 +250,26 @@ } } -void MapWin::registerNewEdgeMap(std::string) +void MapWin::registerNewEdgeMap(std::string newmapname) { - std::cout << "void MapWin::registerNewEdgeMap(std::string) is not yet implemented" << std::endl; + for(int i=0;i listStrings=e_combo_array[i].get_popdown_strings(); + listStrings.push_back(newmapname); + e_combo_array[i].set_popdown_strings(listStrings); + } + Gtk::Entry* entry = e_combo_array[E_TEXT].get_entry(); + entry->set_text((Glib::ustring)newmapname); } -void MapWin::registerNewNodeMap(std::string) +void MapWin::registerNewNodeMap(std::string newmapname) { - std::cout << "void MapWin::registerNewNodeMap(std::string) is not yet implemented" << std::endl; + for(int i=0;i listStrings=n_combo_array[i].get_popdown_strings(); + listStrings.push_back(newmapname); + n_combo_array[i].set_popdown_strings(listStrings); + } }