Re: get handler_id given a signal_id
- From: "K. M. Hawarden-Ogata" <hawarden duke ifa hawaii edu>
- To: "Alex Chiang" <achiang2 rsn hp com>, <gtk-list gnome org>
- Subject: Re: get handler_id given a signal_id
- Date: Fri, 21 Jul 2000 10:01:27 -1000
----- Original Message -----
From: Alex Chiang <achiang2@rsn.hp.com>
To: <gtk-list@gnome.org>
Sent: Friday, July 21, 2000 9:47 AM
Subject: get handler_id given a signal_id
> So this question is related to my previous question of how to get the
> scrollbar to stick in place and not flicker when you update it.
>
> So far we have:
>
> int pos = GTK_ADJUSTMENT (GTK_TEXT (text)->vadj)->value;
> gtk_text_freeze (GTK_TEXT (text));
> [do stuff]
> gtk_text_thaw (GTK_TEXT (text));
> gtk_adjustment_set_value (GTK_ADJUSTMENT (GTK_TEXT (text)->vadj),
pos);
>
> But it flickers when the adjustment is reset to its old value. So
> Miranda Hawarden-Ogata suggests to block the signal handler for the
> adjustment like so:
>
> gtk_signal_handler_block (GTK_OBJECT (text->vadj), handler_id);
> [freeze text]
> [get adj val]
> [do stuff]
> [set adj val]
> [thaw text]
> gtk_signal_handler_unblock (GTK_OBJECT (text->vadj), handler_id);
CLARIFICATION:
The singal handler is NOT connected in any way to the adjustments. It's
connected to the clist itself. In my program the user may select a row in
the clist list and do stuff with the information there. I doubt that this
has much to do with your problem, I may have just forgotten to delete that
part of my code when I pasted the function into my email message.
Sorry for the confusion taht seems to have resulted!
Miranda
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]