[Glade-devel] Glade 2.10.1 available

Damon Chaplin wrote:
I've put Glade 2.10.1 up at:


It is just a bug fix release.
I'll announce it in a few days if no problems turn up.
Well, there's one issue I've found some days ago:
1. Create spin button.
2. Set step increment to 0.1.
Actual value, passed to XML is 0.10000000149 instead of 0.1. This leads 
to firing "value-changed" signal for spin button twice - very undesired 
  behavior, for my opinion.
As I understand this was introduced by #156016.

The sample - XML generated with glade-2.10.1, verified with gtk+-2.6.4 
(Ubuntu-5.04 Hoary). Compile, run and hit at least twice on the "up" 
arrow of the spin button. Signal handler will be invoked twice per value 
after the second hit.

I can fill the bug in bugzilla or reopen #156016, if you are interested in.

-- XML "glade-test.glade2"
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>


<widget class="GtkWindow" id="window1">
   <property name="visible">True</property>
   <property name="title" translatable="yes">window1</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">False</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
   <property name="skip_taskbar_hint">False</property>
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>

     <widget class="GtkSpinButton" id="spinbutton1">
       <property name="visible">True</property>
       <property name="can_focus">True</property>
       <property name="climb_rate">1</property>
       <property name="digits">2</property>
       <property name="numeric">False</property>
       <property name="update_policy">GTK_UPDATE_ALWAYS</property>
       <property name="snap_to_ticks">False</property>
       <property name="wrap">False</property>
       <property name="adjustment">1 0 100 0.10000000149 10 10</property>
       <signal name="value_changed" handler="spin_value_changed" 
last_modification_time="Sat, 17 Sep 2005 13:29:41 GMT"/>

XML --

-- C "test-glade.c", compiled with 'gcc -Wall `pkg-config --cflags 
--libs libglade-2.0` -Wl,--export-dynamic glade-test.c -o glade-test'
#include <gtk/gtk.h>
#include <glade/glade-xml.h>

spin_value_changed (GtkSpinButton *spin)
   g_print ("%f\n", gtk_spin_button_get_value (spin));

main(int argc, char **argv)
   GladeXML      *xml;
   GtkWidget     *window;

   gtk_init (&argc, &argv);

   xml = glade_xml_new ("glade-test.glade2", "window1", NULL);
   g_assert (xml!=NULL);

   glade_xml_signal_autoconnect (xml);

   window = glade_xml_get_widget (xml, "window1");

   gtk_main ();

   return 0;
C --


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