gtkScale draws correctly in Glade, not in the final app

367 views Asked by At

I have several GtkScale widgets in my program (about 10 of them), each has its own GtkAdjustment declared (and assigned). In Glade, these Scales are drawn correctly - complete with the 'knobs' to adjust.

In the final application however, it seems as if the GtkAdjustment is not assigned, and the 'knobs' do not appear.

There was a problem with Scales back in Glade 3.6, but as this is version 3.18.3 this seems solved.

I've also checked the ui file, and the adjustment and scale definitions seem ok.

Any suggestions? There is no real code involved here... Here are the relevant sections of the UI file:

The Adjustment:

<object class="GtkAdjustment" id="mainwin_comp_cap_val_adj">
   <property name="upper">100</property>   
   <property name="value">10</property>
   <property name="step_increment">1</property>
   <property name="page_increment">10</property>
   <signal name="value-changed" handler="mainwin_comp_val_adj_value_changed" swapped="no"/>
</object>

And the corresponding Scale:

  <object class="GtkScale" id="mainwin_comp_cap_val_scale">
     <property name="visible">True</property>
     <property name="can_focus">True</property>
     <property name="adjustment">mainwin_comp_cap_val_adj</property>
     <property name="round_digits">1</property>
     <property name="draw_value">False</property>
  </object>

UPDATE:

For some reason, Anjuta stopped giving me the console output of my program (that's another issue though). This caused me to miss some warnings from the gtkbuilder. When debugging manually (without Anjuta), I get these warnings for each of the adjustments:

(linsmith:14942): Gtk-WARNING **: No object called: mainwin_comp_cap_val_adj

Again, I found some older references, but none with a solution (or even an explanation).

0

There are 0 answers