diff options
| author | Nick Roberts | 2005-05-24 08:38:58 +0000 |
|---|---|---|
| committer | Nick Roberts | 2005-05-24 08:38:58 +0000 |
| commit | d23928c7042801a5b2bcfb3359c0ca9b338d5e08 (patch) | |
| tree | 3fc4c1e0262448b06ff18acf2f488cf3b83d1309 /src | |
| parent | 13dcfc3518be2d8974443ccff6971459cdcbfaf6 (diff) | |
| download | emacs-d23928c7042801a5b2bcfb3359c0ca9b338d5e08.tar.gz emacs-d23928c7042801a5b2bcfb3359c0ca9b338d5e08.zip | |
(Fx_popup_dialog): Add a third boolean argument to select frame title
("Question"/"Information").
(w32_dialog_show): Use it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32menu.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/w32menu.c b/src/w32menu.c index 4553895d829..32441e4a351 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -860,9 +860,12 @@ The return value is VALUE from the chosen item. | |||
| 860 | An ITEM may also be just a string--that makes a nonselectable item. | 860 | An ITEM may also be just a string--that makes a nonselectable item. |
| 861 | An ITEM may also be nil--that means to put all preceding items | 861 | An ITEM may also be nil--that means to put all preceding items |
| 862 | on the left of the dialog box and all following items on the right. | 862 | on the left of the dialog box and all following items on the right. |
| 863 | \(By default, approximately half appear on each side.) */) | 863 | \(By default, approximately half appear on each side.) |
| 864 | (position, contents) | 864 | |
| 865 | Lisp_Object position, contents; | 865 | If HEADER is non-nil, the frame title for the box is "Information", |
| 866 | otherwise it is "Question". */) | ||
| 867 | (position, contents, header) | ||
| 868 | Lisp_Object position, contents, header; | ||
| 866 | { | 869 | { |
| 867 | FRAME_PTR f = NULL; | 870 | FRAME_PTR f = NULL; |
| 868 | Lisp_Object window; | 871 | Lisp_Object window; |
| @@ -949,7 +952,7 @@ on the left of the dialog box and all following items on the right. | |||
| 949 | 952 | ||
| 950 | /* Display them in a dialog box. */ | 953 | /* Display them in a dialog box. */ |
| 951 | BLOCK_INPUT; | 954 | BLOCK_INPUT; |
| 952 | selection = w32_dialog_show (f, 0, title, &error_name); | 955 | selection = w32_dialog_show (f, 0, title, header, &error_name); |
| 953 | UNBLOCK_INPUT; | 956 | UNBLOCK_INPUT; |
| 954 | 957 | ||
| 955 | discard_menu_items (); | 958 | discard_menu_items (); |
| @@ -1995,10 +1998,10 @@ static char * button_names [] = { | |||
| 1995 | "button6", "button7", "button8", "button9", "button10" }; | 1998 | "button6", "button7", "button8", "button9", "button10" }; |
| 1996 | 1999 | ||
| 1997 | static Lisp_Object | 2000 | static Lisp_Object |
| 1998 | w32_dialog_show (f, keymaps, title, error) | 2001 | w32_dialog_show (f, keymaps, title, header, error) |
| 1999 | FRAME_PTR f; | 2002 | FRAME_PTR f; |
| 2000 | int keymaps; | 2003 | int keymaps; |
| 2001 | Lisp_Object title; | 2004 | Lisp_Object title, header; |
| 2002 | char **error; | 2005 | char **error; |
| 2003 | { | 2006 | { |
| 2004 | int i, nb_buttons=0; | 2007 | int i, nb_buttons=0; |
| @@ -2099,11 +2102,17 @@ w32_dialog_show (f, keymaps, title, error) | |||
| 2099 | wv->name = dialog_name; | 2102 | wv->name = dialog_name; |
| 2100 | wv->help = Qnil; | 2103 | wv->help = Qnil; |
| 2101 | 2104 | ||
| 2105 | /* Frame title: 'Q' = Question, 'I' = Information. | ||
| 2106 | Can also have 'E' = Error if, one day, we want | ||
| 2107 | a popup for errors. */ | ||
| 2108 | if (NILP(header)) | ||
| 2109 | dialog_name[0] = 'Q'; | ||
| 2110 | else | ||
| 2111 | dialog_name[0] = 'I'; | ||
| 2112 | |||
| 2102 | /* Dialog boxes use a really stupid name encoding | 2113 | /* Dialog boxes use a really stupid name encoding |
| 2103 | which specifies how many buttons to use | 2114 | which specifies how many buttons to use |
| 2104 | and how many buttons are on the right. | 2115 | and how many buttons are on the right. */ |
| 2105 | The Q means something also. */ | ||
| 2106 | dialog_name[0] = 'Q'; | ||
| 2107 | dialog_name[1] = '0' + nb_buttons; | 2116 | dialog_name[1] = '0' + nb_buttons; |
| 2108 | dialog_name[2] = 'B'; | 2117 | dialog_name[2] = 'B'; |
| 2109 | dialog_name[3] = 'R'; | 2118 | dialog_name[3] = 'R'; |