[glade--]Scale writer doesn't output "draw_value" [patch]



Hi,

 it's me again.  A scale looks like this in glade 1:

    <widget>
      <class>GtkHScale</class>
      <name>hscale1</name>
      <can_focus>True</can_focus>
      <draw_value>True</draw_value>
      <value_pos>GTK_POS_TOP</value_pos>
      <digits>1</digits>
      <policy>GTK_UPDATE_CONTINUOUS</policy>
      <value>0</value>
      <lower>0</lower>
      <upper>0</upper>
      <step>0</step>
      <page>0</page>
      <page_size>0</page_size>
    </widget>

 it looks like this in glade 2:

    <widget class="GtkHScale" id="hscale1">
      <property name="visible">True</property>
      <property name="can_focus">True</property>
      <property name="draw_value">True</property>
      <property name="value_pos">GTK_POS_TOP</property>
      <property name="digits">1</property>
      <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
      <property name="inverted">False</property>
      <property name="adjustment">0 0 0 0 0 0</property>
    </widget>

 For some reason 

    bool draw_value=w.getIntProperty("draw_value",true);

 doesn't do the right thing here.  getBoolProperty does.

-- 
Marcelo
Index: src/writers/scale.cc
===================================================================
RCS file: /cvs/gnome/glade--/src/writers/scale.cc,v
retrieving revision 1.26
diff -u -r1.26 scale.cc
--- src/writers/scale.cc	15 Jun 2002 13:22:14 -0000	1.26
+++ src/writers/scale.cc	14 Jul 2002 09:38:38 -0000
@@ -48,7 +48,7 @@
 void Gtk_Scale::Configure(const Widget &w, CxxFile &f,const std::string &instance) const
 {  Parent::Configure(w,f,instance);
    WriteIntProperty(w,f,instance, "digits");
-   bool draw_value=w.getIntProperty("draw_value",true);
+   bool draw_value=w.getBoolProperty("draw_value",true);
    f.Statement() << instance << "set_draw_value(" << PRINT_BOOL(draw_value) << ')';
    WriteEnumPropertyNS(w,f,instance, "value_pos");
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]