Re: yes, no & cancel message box
- From: Mlacage aol com
- To: gnome-devel-list gnome org
- Subject: Re: yes, no & cancel message box
- Date: Wed, 18 Aug 1999 17:11:13 EDT
Dans un courrier daté du 18/08/99 21:48:49é), miguel@gnu.org a écrit :
>
> d = gnome_dialog_new (
> "Title for the dialog",
> GNOME_STOCK_BUTTON_YES,
> GNOME_STOCK_BUTTON_NO,
> GNOME_STOCK_BUTTON_CANCEL,
> NULL);
>
> l = gtk_label_new ("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 */
> case 0: yes
> case 1: no
> case 2: cancel
> }
Well, i may be wrong but i think that lukas wanted to make this an api
function: this kind of dialog box is quite widespread: why not making ts look
at structure more standard by adding an api function ?
This is prob what Lukas wanted. I don't agree: the code is small and the api
is big enough. The api needs to be kept small, general and flexible. This
kind of thing is more burden for not much. The smaller the api, the smaller
the backward compatibility burden later :)
Mathieu
>
> best wishes,
> Miguel.
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]