[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: more keyboard accelerator woes
- From: Stefan Kost <ensonic hora-obscura de>
- To: gtk-app-devel-list gnome org
- Subject: Re: more keyboard accelerator woes
- Date: Tue, 19 Feb 2008 21:50:48 +0200
For the archive, solution (hack) to fix one issue:
Stefan Kost schrieb:
> Hi,
>
> after I managed to get accelerators for menus and context menues working, I have
> problems with some other ui items.
>
> 1.)
> tool_item=GTK_WIDGET(gtk_toggle_tool_button_new_from_stock(GTK_STOCK_MEDIA_PLAY));
>
> 1a.)
> gtk_widget_set_accel_path (tool_item,
> "<Buzztard-Main>/MainToolbar/Play",accel_group);
> gtk_accel_map_add_entry ("<Buzztard-Main>/MainToolbar/Play", GDK_F5, 0);
>
> 1b.)
> gtk_widget_add_accelerator(tool_item, "clicked", accel_group, GDK_F5, 0, 0);
>
> both don't have any effect. using 1a.) is also showing these warnings:
> (bt-edit:12682): Gtk-CRITICAL **: gtk_widget_set_accel_path: assertion
> `GTK_WIDGET_GET_CLASS (widget)->activate_signal != 0' failed
>
> (bt-edit:12682): Gtk-CRITICAL **: gtk_widget_set_accel_path: assertion
> `GTK_WIDGET_GET_CLASS (widget)->activate_signal != 0' failed
>
>
> Finaly one small thing. For the help menu I use
> subitem=gtk_image_menu_item_new_from_stock(GTK_STOCK_HELP,accel_group);
> this gets "Ctrl-H" as a shortcut, where all the other apps seem to have "F1".
subitem=gtk_image_menu_item_new_from_stock(GTK_STOCK_HELP,accel_group);
gtk_widget_remove_accelerator(subitem,accel_group,'h',GDK_CONTROL_MASK);
gtk_widget_add_accelerator(subitem,"activate",accel_group,GDK_F1,0,GTK_ACCEL_VISIBLE);
Stefan
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]