Feedback updating scrollbar



Dear list,

I have a scrollbar that represents the position in a file. When the user
changes the position, the program reacts via the callback. Easy. 

But when the position in the file changes for other reasons, and the
program therefore sets the value of the scrollbar accordingly (using
gtk_adjustment_set_value), the callback is also called. What with rounding
errors, this means that the position is changed yet again, but not quite
to the right value. 

How can I distinguish between the callback being a reaction to user input,
and the callback being the reaction to gtk_adjustment_set_value? 

Best regards, Mark





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