Re: gtk_widget_event()
- From: Havoc Pennington <hp redhat com>
- To: Allin Cottrell <cottrell wfu edu>
- Cc: <gtk-list gnome org>
- Subject: Re: gtk_widget_event()
- Date: 10 Dec 2000 18:30:40 -0500
Allin Cottrell <cottrell wfu edu> writes:
> On 10 Dec 2000, Havoc Pennington wrote:
>
> > > I'm trying to make a double-click on certain locations
> > > equivalent to clicking the "OK" button in a window.
> >
> > The easiest way to do this is to just call gtk_widget_activate() on
> > the button. It won't animate though.
>
> Ah, I don't need the animation so this looks good!
>
> The context is a custom file selection thingy. I'd like for
> double-clicking on a file to accomplish the same as selecting
> the file then clicking "OK". gtk_widget_activate(ok_button,
> "clicked") achieves part of this: it selects the file and closes
> the file selection window, like the OK button does. But it
> seems that the doubleclick is not cleaning up properly. When
> you close the window with a real click on "OK" everything's
> alright, but doubleclicking on a file gives a spew of warnings
> about failed casts and unrefs, after the file selector closes.
>
> > To simulate a single click, you need to send two events,
> > GDK_BUTTON_PRESS and GDK_BUTTON_RELEASE...
>
> OK, thanks, got that. But I haven't yet managed to manufacture
> an event that does the trick: my events cause the OK button to
> flicker, but that's all.
>
Hard to guess what's up with those two problems without knowing more
about the code.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]