summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2005-05-24 08:42:23 +0000
committerNick Roberts <nickrob@snap.net.nz>2005-05-24 08:42:23 +0000
commit3f2975360cb2d43c48e113581dd1b8a0f8af7c0f (patch)
tree5a4648b52baa6ecb6f5181a1d9aded4759199559
parentd23928c7042801a5b2bcfb3359c0ca9b338d5e08 (diff)
downloademacs-3f2975360cb2d43c48e113581dd1b8a0f8af7c0f.tar.gz
(Fx_popup_dialog): Add a third boolean argument to select frame title
("Question"/"Information"). (mac_dialog_show): Use it.
-rw-r--r--src/macmenu.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/macmenu.c b/src/macmenu.c
index eb870176f12..b2c7242c04e 100644
--- a/src/macmenu.c
+++ b/src/macmenu.c
@@ -838,9 +838,12 @@ The return value is VALUE from the chosen item.
An ITEM may also be just a string--that makes a nonselectable item.
An ITEM may also be nil--that means to put all preceding items
on the left of the dialog box and all following items on the right.
-\(By default, approximately half appear on each side.) */)
- (position, contents)
- Lisp_Object position, contents;
+\(By default, approximately half appear on each side.)
+
+If HEADER is non-nil, the frame title for the box is "Information",
+otherwise it is "Question". */)
+ (position, contents, header)
+ Lisp_Object position, contents, header;
{
FRAME_PTR f = NULL;
Lisp_Object window;
@@ -927,7 +930,7 @@ on the left of the dialog box and all following items on the right.
/* Display them in a dialog box. */
BLOCK_INPUT;
- selection = mac_dialog_show (f, 0, title, &error_name);
+ selection = mac_dialog_show (f, 0, title, header, &error_name);
UNBLOCK_INPUT;
discard_menu_items ();
@@ -2046,10 +2049,10 @@ static char * button_names [] = {
"button6", "button7", "button8", "button9", "button10" };
static Lisp_Object
-mac_dialog_show (f, keymaps, title, error)
+mac_dialog_show (f, keymaps, title, header, error)
FRAME_PTR f;
int keymaps;
- Lisp_Object title;
+ Lisp_Object title, header;
char **error;
{
int i, nb_buttons=0;
@@ -2152,11 +2155,17 @@ mac_dialog_show (f, keymaps, title, error)
wv->name = dialog_name;
wv->help = Qnil;
+ /* Frame title: 'Q' = Question, 'I' = Information.
+ Can also have 'E' = Error if, one day, we want
+ a popup for errors. */
+ if (NILP(header))
+ dialog_name[0] = 'Q';
+ else
+ dialog_name[0] = 'I';
+
/* Dialog boxes use a really stupid name encoding
which specifies how many buttons to use
- and how many buttons are on the right.
- The Q means something also. */
- dialog_name[0] = 'Q';
+ and how many buttons are on the right. */
dialog_name[1] = '0' + nb_buttons;
dialog_name[2] = 'B';
dialog_name[3] = 'R';