Re: any easy way of having a YES/NO dialog return a 1 or 0?



On Sun, Jan 15, 2012 at 01:26:53PM -0800, Gary Kline wrote:
is there a way of having a YES/NO dialog [that asks a qauestion]
return a truth value? i'm looking for something like the macro
eprint(...) that James Steward sent in late december.

Use gtk_message_dialog_new() with GTK_BUTTONS_YES_NO buttons type.
Your boolean is then equal to

    gtk_dialog_run(dialog) == GTK_RESPONSE_YES

(which also runs the dialog but you can, of course, separate the
execution and comparison).

if i eventually figured out a similar marcro that included:

      GTK_STOCK_YES,1,
      GTK_STOCK_NO, 0...

I don't understand what stock item names have to do with this.

Yeti




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