[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117192: * xmenu.c (xdialog_show): Remove prototype,
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] trunk r117192: * xmenu.c (xdialog_show): Remove prototype, rename to |
Date: |
Thu, 29 May 2014 17:16:18 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117192
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Thu 2014-05-29 21:16:00 +0400
message:
* xmenu.c (xdialog_show): Remove prototype, rename to
x_dialog_show, remove 2nd arg because it's always zero
and simplify accordingly.
(xw_popup_dialog): Adjust user.
* w32menu.c (w32_dialog_show): Adjust prototype, remove
2nd arg because it's always zero and simplify accordingly.
(w32_popup_dialog): Adjust user.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/w32menu.c w32menu.c-20091113204419-o5vbwnq5f7feedwu-947
src/xmenu.c xmenu.c-20091113204419-o5vbwnq5f7feedwu-161
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-05-29 17:15:02 +0000
+++ b/src/ChangeLog 2014-05-29 17:16:00 +0000
@@ -1,3 +1,13 @@
+2014-05-29 Dmitry Antipov <address@hidden>
+
+ * xmenu.c (xdialog_show): Remove prototype, rename to
+ x_dialog_show, remove 2nd arg because it's always zero
+ and simplify accordingly.
+ (xw_popup_dialog): Adjust user.
+ * w32menu.c (w32_dialog_show): Adjust prototype, remove
+ 2nd arg because it's always zero and simplify accordingly.
+ (w32_popup_dialog): Adjust user.
+
2014-05-29 Eli Zaretskii <address@hidden>
* w32heap.c (report_temacs_memory_usage): New function.
=== modified file 'src/w32menu.c'
--- a/src/w32menu.c 2014-02-04 16:13:51 +0000
+++ b/src/w32menu.c 2014-05-29 17:16:00 +0000
@@ -103,7 +103,7 @@
void set_frame_menubar (struct frame *, bool, bool);
#ifdef HAVE_DIALOGS
-static Lisp_Object w32_dialog_show (struct frame *, int, Lisp_Object, char**);
+static Lisp_Object w32_dialog_show (struct frame *, Lisp_Object, Lisp_Object,
char **);
#else
static int is_simple_dialog (Lisp_Object);
static Lisp_Object simple_dialog_show (struct frame *, Lisp_Object,
Lisp_Object);
@@ -141,7 +141,7 @@
/* Display them in a dialog box. */
block_input ();
- selection = w32_dialog_show (f, 0, title, header, &error_name);
+ selection = w32_dialog_show (f, title, header, &error_name);
unblock_input ();
discard_menu_items ();
@@ -904,9 +904,8 @@
"button6", "button7", "button8", "button9", "button10" };
static Lisp_Object
-w32_dialog_show (struct frame *f, int keymaps,
- Lisp_Object title, Lisp_Object header,
- char **error)
+w32_dialog_show (struct frame *f, Lisp_Object title,
+ Lisp_Object header, char **error)
{
int i, nb_buttons = 0;
char dialog_name[6];
@@ -930,16 +929,13 @@
/* Create a tree of widget_value objects
representing the text label and buttons. */
{
- Lisp_Object pane_name, prefix;
+ Lisp_Object pane_name;
char *pane_string;
pane_name = AREF (menu_items, MENU_ITEMS_PANE_NAME);
- prefix = AREF (menu_items, MENU_ITEMS_PANE_PREFIX);
pane_string = (NILP (pane_name)
? "" : SSDATA (pane_name));
prev_wv = xmalloc_widget_value ();
prev_wv->value = pane_string;
- if (keymaps && !NILP (prefix))
- prev_wv->name++;
prev_wv->enabled = 1;
prev_wv->name = "message";
prev_wv->help = Qnil;
@@ -1052,32 +1048,18 @@
the proper value. */
if (menu_item_selection != 0)
{
- Lisp_Object prefix;
-
- prefix = Qnil;
i = 0;
while (i < menu_items_used)
{
Lisp_Object entry;
if (EQ (AREF (menu_items, i), Qt))
- {
- prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
- i += MENU_ITEMS_PANE_LENGTH;
- }
+ i += MENU_ITEMS_PANE_LENGTH;
else
{
- entry = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);
+ entry = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);
if (menu_item_selection == i)
- {
- if (keymaps != 0)
- {
- entry = Fcons (entry, Qnil);
- if (!NILP (prefix))
- entry = Fcons (prefix, entry);
- }
- return entry;
- }
+ return entry;
i += MENU_ITEMS_ITEM_LENGTH;
}
}
=== modified file 'src/xmenu.c'
--- a/src/xmenu.c 2014-01-29 18:39:11 +0000
+++ b/src/xmenu.c 2014-05-29 17:16:00 +0000
@@ -110,11 +110,6 @@
static Lisp_Object Qdebug_on_next_call;
-#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
-static Lisp_Object xdialog_show (struct frame *, bool, Lisp_Object,
Lisp_Object,
- const char **);
-#endif
-
/* Flag which when set indicates a dialog or menu has been posted by
Xt on behalf of one of the widget sets. */
static int popup_activated_flag;
@@ -1839,11 +1834,8 @@
"button6", "button7", "button8", "button9", "button10" };
static Lisp_Object
-xdialog_show (struct frame *f,
- bool keymaps,
- Lisp_Object title,
- Lisp_Object header,
- const char **error_name)
+x_dialog_show (struct frame *f, Lisp_Object title,
+ Lisp_Object header, const char **error_name)
{
int i, nb_buttons=0;
char dialog_name[6];
@@ -1870,16 +1862,13 @@
/* Create a tree of widget_value objects
representing the text label and buttons. */
{
- Lisp_Object pane_name, prefix;
+ Lisp_Object pane_name;
const char *pane_string;
pane_name = AREF (menu_items, MENU_ITEMS_PANE_NAME);
- prefix = AREF (menu_items, MENU_ITEMS_PANE_PREFIX);
pane_string = (NILP (pane_name)
? "" : SSDATA (pane_name));
prev_wv = xmalloc_widget_value ();
prev_wv->value = (char *) pane_string;
- if (keymaps && !NILP (prefix))
- prev_wv->name++;
prev_wv->enabled = 1;
prev_wv->name = "message";
prev_wv->help = Qnil;
@@ -1982,20 +1971,13 @@
the proper value. */
if (menu_item_selection != 0)
{
- Lisp_Object prefix;
-
- prefix = Qnil;
i = 0;
while (i < menu_items_used)
{
Lisp_Object entry;
if (EQ (AREF (menu_items, i), Qt))
- {
- prefix
- = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
- i += MENU_ITEMS_PANE_LENGTH;
- }
+ i += MENU_ITEMS_PANE_LENGTH;
else if (EQ (AREF (menu_items, i), Qquote))
{
/* This is the boundary between left-side elts and
@@ -2007,15 +1989,7 @@
entry
= AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);
if (menu_item_selection == aref_addr (menu_items, i))
- {
- if (keymaps != 0)
- {
- entry = list1 (entry);
- if (!NILP (prefix))
- entry = Fcons (prefix, entry);
- }
- return entry;
- }
+ return entry;
i += MENU_ITEMS_ITEM_LENGTH;
}
}
@@ -2052,7 +2026,7 @@
/* Display them in a dialog box. */
block_input ();
- selection = xdialog_show (f, 0, title, header, &error_name);
+ selection = x_dialog_show (f, title, header, &error_name);
unblock_input ();
unbind_to (specpdl_count, Qnil);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117192: * xmenu.c (xdialog_show): Remove prototype, rename to,
Dmitry Antipov <=