Manu TM
Sat, 13 Mar 2010 08:24:07 -0800
I made something similar, some times ago, sending GTK_RESPONSE_OK:static gint enter_key_pressed_in_entry(GtkWidget *widget, GdkEventKey *event, gpointer unused)
{
widget = widget;
event = event;
unused = unused;
gtk_dialog_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
return TRUE;
}
your_dialog_or_whatever()
{
/* ... */
entry = gtk_entry_new();
g_signal_connect(G_OBJECT(entry), "activate",
G_CALLBACK(enter_key_pressed_in_entry), NULL);
/* ... */ } Emmanuel Thomas-Maurin Frank Lanitz wrote:
Hi list,I'm not sure whether you can help me here out. I'm looking for a way to directly send GTK_RESPONSE_ACCEPT by hitting return, even on dialogs where a GTK Entry or a ComboBox is having the focus. Do you might have an idea how to do this or some code snippet I can have alook at? Thanks, Frank ------------------------------------------------------------------------_______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list