Re: catching <esc> pressed in a dialog with entry and treeview



Hi,

Right thing to do should be to connect the dialog to the signal
GtkWidget:"key-press-event", possibly filter on GDK_Escape, and return
true (see the api for more info on the return value, true will block
any further calls).

2009/10/12 Manu TM <manutm007 gmail com>:
Hi

I'm having a problem with a gkt dialog. I have packed in this dialog a gtk
entry and a gtk treeview, so the user can either enter an url or pick one
from a list. Everything works fine, I've also added code to catch
double-click on the list. But I can't achieve to catch <esc> key pressed
events to close/quit the dialog. I think that because of the other widgets
packed in the dialog, <esc> keybing has changed. I've then added the code:
  g_signal_connect(G_OBJECT(dialog), "close", G_CALLBACK(esc_key_pressed),
NULL);
along with an appropriate signal handler, but this doesn't do anything.
I have searched the web a lot but didn't find anything relevant so far. So,
does anyone know of a way to do this or have a clue?
Many thanks in advance.

Manu Thomas-Maurin

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




-- 
Mike



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