SpinButton: how to avoid calling signal handler when set_value()



I have a SpinButton with an associated Adjustment. I connected a handler for "value-changed" signal, because I have to make something when the user changes the value. I sometimes need to change the value in the code, using set_value() method of SpinButton or Adjustment. In this case, I don't want to execute the signal handler.

I will try to describe the situation. I have many widgets on the window, mainly SpinButton (but I have Entry too). I retrieve the values from remote, so I use set_value() methods for each widget when the values are received. The user can change some values and I need to detect this, because I have to send the new values to remote. So I have to connect a custom signal handler. Of course, I have to avoid calling the signal handler when the values are changed by code.

Is it possible?





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