change keyboard accelerators
- From: Michal ROMAN <michal roman nov sk>
- To: gtk-list gnome org
- Subject: change keyboard accelerators
- Date: Mon, 16 Jul 2001 17:48:24 +0200
Hi,
I havedefined keyboard accelerators :
accel_group = gtk_accel_group_new ();
for (i = 0; i < 10; i++)
{
accel_key = ...
accel_mods = ...
gtk_widget_add_accelerator (button, "clicked", accel_group, accel_key,
accel_mods, GTK_ACCEL_VISIBLE);
}
gtk_accel_group_attach (accel_group, GTK_OBJECT (window));
In some cases I need change toolbar of window:
toolbar_window = // old window toolbar
toolbar = // new toolbar
parent = GTK_WIDGET (toolbar_window)->parent;
gtk_widget_ref (toolbar_window);
gtk_container_remove (GTK_CONTAINER (parent), toolbar_window);
gtk_container_add (GTK_CONTAINER (parent), toolbar);
gtk_widget_show_all (toolbar);
Now I need remove old accelerators from window and define new ones (the
code above) for the new toolbar. How can I remove all old accelerators
from window?
Thank's for your advises.
Michal.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]