Re: Can't quite get my head around this, can anyone help?
- From: Michael Torrie <torriem gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Can't quite get my head around this, can anyone help?
- Date: Mon, 10 Aug 2009 09:24:44 -0600
Boggess Rod wrote:
Can someone point me to some example code in Gtk that intercepts a
signal, prompts the user, and either continues or aborts the signal,
depending on user response? A button wouldn't do this, but I'm sure
there are other widgets that would. I've Googled everything I can think
of, but I either receive an overwhelming, unapplicable list of results
Well inside a callback you can return TRUE which stops signal
propagation right here. Or FALSE, which lets it continue. So you could
do it two ways. One would be to to display a GtkDialog, and use
gtk_dialog_run() from within your callback . The other would be to
create new gtk main loop instance from within your callback to allow
another window to be displayed and run, and then based have that
window's event callbacks set a flag and end the main loop, which you can
then use in the original callback to end the propagation.
Not example code, but if I understand what you're asking for, it's
Why wouldn't a button be be able to do this?
] [Thread Prev