aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2014-06-03 09:51:18 +0300
committerEli Zaretskii2014-06-03 09:51:18 +0300
commit0031c9530d24fb25d8bdcadaf7457b7dee51da0c (patch)
tree0af47de2177ab3b9cd5c552b760a6d774701ef11 /src
parent0882152e225d4cb722782545441fd38a22cacef5 (diff)
downloademacs-0031c9530d24fb25d8bdcadaf7457b7dee51da0c.tar.gz
emacs-0031c9530d24fb25d8bdcadaf7457b7dee51da0c.zip
Fix MS-Windows build broken by menu changes on 2014-06-02.
src/w32menu.c (w32_menu_show): Fix a typo that broke compilation. src/menu.h (enum button_type, struct _widget_value) [HAVE_NTGUI]: Define instead of including ../lwlib/lwlib.h, which causes compilation errors due to missing X11 headers.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/menu.h44
-rw-r--r--src/w32menu.c2
3 files changed, 52 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ded001073ae..0a31818070f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12014-06-03 Eli Zaretskii <eliz@gnu.org>
2
3 Fix MS-Windows build broken by menu changes on 2014-06-02.
4 * w32menu.c (w32_menu_show): Fix a typo that broke compilation.
5
6 * menu.h (enum button_type, struct _widget_value) [HAVE_NTGUI]:
7 Define instead of including ../lwlib/lwlib.h, which causes
8 compilation errors due to missing X11 headers.
9
12014-06-03 Paul Eggert <eggert@cs.ucla.edu> 102014-06-03 Paul Eggert <eggert@cs.ucla.edu>
2 11
3 * process.c (wait_reading_process_output): Omit incorrect test 12 * process.c (wait_reading_process_output): Omit incorrect test
diff --git a/src/menu.h b/src/menu.h
index 89a8729fd43..d71989ea1ef 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -20,12 +20,52 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20#define MENU_H 20#define MENU_H
21 21
22#include "systime.h" /* for Time */ 22#include "systime.h" /* for Time */
23#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI) \ 23#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS)
24 || defined (HAVE_NS)
25#include "../lwlib/lwlib.h" /* for widget_value */ 24#include "../lwlib/lwlib.h" /* for widget_value */
26#endif 25#endif
27 26
28#ifdef HAVE_NTGUI 27#ifdef HAVE_NTGUI
28/* This is based on the one in ../lwlib/lwlib.h, with unused portions
29 removed. HAVE_NTGUI cannot include lwlib.h, as that pulls in X11
30 headers. */
31
32enum button_type
33{
34 BUTTON_TYPE_NONE,
35 BUTTON_TYPE_TOGGLE,
36 BUTTON_TYPE_RADIO
37};
38
39typedef struct _widget_value
40{
41 /* name of widget */
42 Lisp_Object lname;
43 const char* name;
44 /* value (meaning depend on widget type) */
45 const char* value;
46 /* keyboard equivalent. no implications for XtTranslations */
47 Lisp_Object lkey;
48 const char* key;
49 /* Help string or nil if none.
50 GC finds this string through the frame's menu_bar_vector
51 or through menu_items. */
52 Lisp_Object help;
53 /* true if enabled */
54 unsigned char enabled;
55 /* true if selected */
56 unsigned char selected;
57 /* The type of a button. */
58 enum button_type button_type;
59 /* true if menu title */
60 unsigned char title;
61 /* Contents of the sub-widgets, also selected slot for checkbox */
62 struct _widget_value* contents;
63 /* data passed to callback */
64 void *call_data;
65 /* next one in the list */
66 struct _widget_value* next;
67} widget_value;
68
29extern Lisp_Object Qunsupported__w32_dialog; 69extern Lisp_Object Qunsupported__w32_dialog;
30#endif 70#endif
31 71
diff --git a/src/w32menu.c b/src/w32menu.c
index 36b06bafad2..467eb7a5710 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -697,7 +697,7 @@ w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps,
697 ASET (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY, descrip); 697 ASET (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY, descrip);
698 } 698 }
699 699
700 wv = make_widget_value (SSDATA (item_name), NULL, !NILP (enabled), 700 wv = make_widget_value (SSDATA (item_name), NULL, !NILP (enable),
701 STRINGP (help) ? help : Qnil); 701 STRINGP (help) ? help : Qnil);
702 if (prev_wv) 702 if (prev_wv)
703 prev_wv->next = wv; 703 prev_wv->next = wv;