mapselector.cc
branchgui
changeset 114 0ace7edbb06f
parent 112 3689cb170d3e
child 122 96bfa82264c3
     1.1 --- a/mapselector.cc	Fri Jan 06 14:44:04 2006 +0000
     1.2 +++ b/mapselector.cc	Fri Jan 06 16:07:08 2006 +0000
     1.3 @@ -1,6 +1,6 @@
     1.4  #include "mapselector.h"
     1.5  
     1.6 -MapSelector::MapSelector(std::vector<std::string> ml, std::string act, int identifier, bool edge):id(identifier),itisedge(edge),set_new_map(false)
     1.7 +MapSelector::MapSelector(std::vector<std::string> ml, std::string act, std::string labeltext, bool edge, bool d):def(d),itisedge(edge),set_new_map(false)
     1.8  {
     1.9    update_list(ml);
    1.10  
    1.11 @@ -22,14 +22,7 @@
    1.12       false
    1.13       );
    1.14    
    1.15 -  if(itisedge)
    1.16 -    {
    1.17 -      label=new Gtk::Label(edge_property_strings[id]);
    1.18 -    }
    1.19 -  else
    1.20 -    {
    1.21 -      label=new Gtk::Label(node_property_strings[id]);
    1.22 -    }
    1.23 +  label=new Gtk::Label(labeltext);
    1.24  
    1.25    label->set_width_chars(longest_property_string_length);
    1.26  
    1.27 @@ -71,7 +64,10 @@
    1.28      {
    1.29        cbt.append_text(*emsi);
    1.30      }
    1.31 -  cbt.prepend_text("Default values");
    1.32 +  if(def)
    1.33 +    {
    1.34 +      cbt.prepend_text("Default values");
    1.35 +    }
    1.36    if(prev_act!=-1)
    1.37      {
    1.38        cbt.set_active(prev_act);