Re: Can't quite get my head around this, can anyone help?



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
or none.

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 [1].  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
relatively doable.

Why wouldn't a button be be able to do this?



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