Keybindings to arbitrary widgets



Greetings all.

  I'm fairly new to GTK+ so please forgive my ignorance...

  Could anyone point me in a direction towards a quick howto or
reference on how to use the key bindings on specific widgets in gtk?
  The API reference lists the functions
(http://developer.gnome.org/doc/API/2.0/gtk/gtk-Bindings.html), but has
unfinished (read: non-existent) documentation on the functions.

  Just to be clear, here's what I'm trying to do:

  I've got a window that pops up, not directly associated to the "main"
window, which asks for login information. I'd like the window to act as
if the "OK" button were clicked any time the Enter key is hit.
  The window is *not* a dialog in the sense of gtk_dialog_run where it
runs it's own iteration of the gtk_main loop, it's just another window
displayed.

  I've looked through the various docs, even finding a glimmer of hope
in gtk's GtkKeySnoopFunc function, but if there already exists a
framework for setting key bindings to specific widgets (directly from
the docs: "Bindings - Key bindings for individual widgets") then I'd
like to learn how to use those and do things "the right way".

  Any insight would be very much appreciated.

  Thanks!

j




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