Re: using GtkHScale



Dnia 07-10-2004, czw o godzinie 15:59 +0200, Tomek Grzejszczyk napisał:
Hi,
I'd like to use a GtkHScale widget in the following scenario:

-slider is moved by a user and signal "value_changed" gets emited
-in a signal callback I get the new value, try to set an underlying
device accordingly and get the real value that was set in the device.
-now I want to set a slider to the apropriate position (as reported by
the device), but I don't want to get "value_changed" signal emited,
because I would get into a loop.

The question is how to set a new value for a slider without calling
gtk_range_set_value which (as read in documentation) emits unwanted signal.

you can block signal emission:

http://developer.gnome.org/doc/API/2.0/gobject/gobject-Signals.html#g-
signal-handler-block

HTH,
Maciej

-- 
"Tautologizm to coś tautologicznego"
   Maciej Katafiasz <mnews2 wp pl>
         http://mathrick.org




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