Keyboard accelerator



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]