Re: GtkTreeView, the activate signal and dialogs don't interoperate well
- From: René Seindal <rene seindal dk>
- To: Owen Taylor <otaylor redhat com>
- Cc: GTK List <gtk-list gnome org>
- Subject: Re: GtkTreeView, the activate signal and dialogs don't interoperate well
- Date: Tue, 27 May 2003 19:51:40 +0200
On Tue, May 27, 2003 at 11:25:28AM -0400, Owen Taylor wrote:
> On Tue, 2003-05-27 at 10:01, René Seindal wrote:
> > Hi,
> >
> > I have run into a problem with a GtkTreeView. A small demonstration
> > program is included below.
> >
> > I have a GtkTreeView which is reorderable. I have attached a function
> > to the row_activated signal that pops up a dialog. When the dialog is
> > closed and the mouse re-enteres the TreeView, it behaves as if a drag
> > has been initated to reorder the entries of the view.
> >
> > It looks like a bug to me.
> >
> > Also, the rows-reordered signal is never emitted on the TreeModel.
> >
> > This is with gtk+ 2.2.1 from Debian testing/unstable.
>
> Calling gtk_dialog_run() out of many sorts of callback
> a bit dangerous. (GtkButton::clicked and GtkMenuItem::activate
> are pretty safe)
>
> I think the problem is that your modal dialog is eating the button
> release, so GTK+ gets confused. You'll have better luck if you,
> say add an idle function (g_idle_add()) that does that action.
I have tried this and it makes no difference. Apparently the idle
function gets to run before the button release is sent to the TreeView.
I have also tried with a timeout, and it seems to work if the timeout is
on the order of 100ms, but that is going to be dependent on computer
speed and load.
Also it doesn't matter if the dialog is modal or not.
> That being said, GtkTreeView could probably do better, so it
> wouldn't hurt to file a bug. (bugzilla.gnome.org, see instructions
> in the GTK+ README.)
I will.
--
René Seindal (rene seindal dk) http://sights.seindal.dk/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]