Re: yes, no & cancel message box




So what you're looking for is this?  =)

int gnome_pick_yes_no_cancel( char * title, char * message ) {

++>  d = gnome_dialog_new (
> >    title, /* "Title for the dialog", */
> >    GNOME_STOCK_BUTTON_YES,
> >    GNOME_STOCK_BUTTON_NO,
> >    GNOME_STOCK_BUTTON_CANCEL,
> >    NULL);
> >
++>  l = gtk_label_new ( message /* "Here goes the message" */ );
> >  gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (d)->vbox), l, TRUE, TRUE, 0);
> >
> >  button = gnome_dialog_run_and_close (GNOME_DIALOG (d));
> >
> >  switch (button){
> >         case -1: /* User closed window with the mouse */
		button = 2; break;
> >         case 0: break; /* yes */
> >         case 1: break; /* no */
> >         case 2: break; /* cancel */
> >  }

     return button;
}

-- ebm
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
|  __                         a.k.a. Eric B. Mitchell |
|  |_) .  _  _|      _|  _        ricdude@toad.net    |
|  | \ ( (_ (_| (_| (_| (/_    www.toad.net/~ricdude  |
| How's My Programming?   Call:  1 - 800 - DEV - NULL |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+



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