[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Keyboard accelerator
- From: Fritz Ganter <ganter ganter at>
- To: gtk-app-devel-list gnome org
- Subject: Re: Keyboard accelerator
- Date: 03 May 2003 20:24:54 +0200
I have found the reason:
I have this code:
gtk_signal_connect (GTK_OBJECT (mainwindow), "key_press_event",
GTK_SIGNAL_FUNC (key_cb), NULL);
key_cb returned 1. After changing the return value to 0, the shortcuts
are working now.
Am Sam, 2003-05-03 um 04.02 schrieb Fritz Ganter:
> Hi!
>
> I'm porting gpsdrive from Gtk+-1.2 to Gtk-2.2
> In the old version I had code like this:
>
> gtk_widget_add_accelerator (GTK_WIDGET (bestmapbt), "clicked",
> accgroup,
> 'B', 0, GTK_ACCEL_VISIBLE);
>
> Now I want to use the code:
> quit = gtk_button_new_from_stock (GTK_STOCK_QUIT);
> gtk_button_set_use_underline (GTK_BUTTON(quit),TRUE);
>
> or
>
> downloadbt = gtk_button_new_with_mnemonic (_("_Download map"));
>
> But both methods doesn't work. The keys are working in Dialogs, but not
> in the main window.
> What is missing?
--
Fritz "der mit dem Linux tanzt" Ganter http://www.kraftvoll.at
Key fingerprint = 555A DDBB 3985 16FF CD41 2031 C485 1783 BF34 728F
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]