- From: Owen Taylor <owt1 cornell edu>
- To: gtk-list redhat com
- Subject: Re: multi-tasking
- Date: 23 Feb 1998 10:34:36 -0500
"Brian C. Lane" <firstname.lastname@example.org> writes:
> On Sun, 22 Feb 1998, Brian C. Lane wrote:
> > reason I wasn't using a button is the border that is placed around the
> > pixmap -- is there a way to turn this off in butons?
No. (It will be part of the themeability support, but not now)
> I still have the above question, but...
> > Now I have a problem where it sigsegv's on me when I press the button.
> > It is related to the clicked event because I have tried removing all other
> > Does this sound like a bug or am I doing something else wrong? I'm using
> > GTK+ v0.99.3
> I was trying to call a click callback with (GtkWidget *, GdkEvent *), so
> I fixed that, and passed it the Widget* when connecting the clicked event.
> But now that brings up another question, how do I tell which mouse button
> was clicked to activate it? I have a volume button that increases the
> volume with a left click and decreases it with a right click.
You can't. If you really want that kind of control, you'll have to
go back to the EventBox. It shouldn't be too hard to even duplicate
the way buttons work. (The event triggers on the release, but only
if the pointer is within widget->allocation)
But have some pity on the user. Why not just make the volume control
> Also, now my down image is drawn before executing the cdrom function,
> but it isn't drawn as back up until it completes, even though my debugging
> output shows that it is getting press_event, release_event, click_event.
> Apparently the image isn't being redrawn between the release event (where
> the image is changed back to the up image) and the click event.
True. It is just getting queued for redraw. In 0.99.4 you will be able to
fix that by doing the:
thing, before going off and doing your long operation. But there is an
even easier way, that I didn't think of mentioning earlier: just call:
gtk_widget_draw (button, NULL);
Which will make the button be redrawn immediately. It has the
downside that the button will later be drawn again, from the queued
idle redraw, but that shouldn't be noticeable.
] [Thread Prev