gtk1.2 accelerator key conflict



Hi!

I'm still stuck with accelerator keys on buttons with the same shortcut
in gtk+1.2. The keys themselves are working, but the last attached with
the syme keyssym wins. If there are two buttons on a notebook with key
"F1" and one is on the first page, th other on the second page, pressing
F1 on visible page one activates the later created button on page two.

If I try to add and remove the accelerator groups from the one and only
toplevel window:

<code>
gtk_window_remove_accel_group(GTK_WINDOW(MainForm), from.accgroup);
... get another saved and setup group ...
gtk_window_add_accel_group(GTK_WINDOW(MainForm), stateTo.accgroup);
</code>

the following error is show:

<log>
STM: transition: removing accelerators

Gtk-CRITICAL **: file gtkaccelgroup.c: line 188 (gtk_accel_group_attach): assertion `g_slist_find 
(accel_group->attach_objects, object) == NULL' failed.
STM: transition: addiing accelerators

Gtk-CRITICAL **: file gtkaccelgroup.c: line 188 (gtk_accel_group_attach): assertion `g_slist_find 
(accel_group->attach_objects, object) == NULL' failed.
</log>

I think my understanding of accelerators and accel groups is wrong. How
can I switch the active accelerator group in a toplevel window (or
notebook there in)?

TIA,
Marc





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