emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117245: Fix MS-Windows build broken by menu changes


From: Eli Zaretskii
Subject: [Emacs-diffs] trunk r117245: Fix MS-Windows build broken by menu changes on 2014-06-02.
Date: Tue, 03 Jun 2014 06:52:03 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117245
revision-id: address@hidden
parent: address@hidden
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Tue 2014-06-03 09:51:18 +0300
message:
  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.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/menu.h                     menu.h-20091113204419-o5vbwnq5f7feedwu-8702
  src/w32menu.c                  w32menu.c-20091113204419-o5vbwnq5f7feedwu-947
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-06-03 00:44:30 +0000
+++ b/src/ChangeLog     2014-06-03 06:51:18 +0000
@@ -1,3 +1,12 @@
+2014-06-03  Eli Zaretskii  <address@hidden>
+
+       Fix MS-Windows build broken by menu changes on 2014-06-02.
+       * w32menu.c (w32_menu_show): Fix a typo that broke compilation.
+
+       * 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.
+
 2014-06-03  Paul Eggert  <address@hidden>
 
        * process.c (wait_reading_process_output): Omit incorrect test

=== modified file 'src/menu.h'
--- a/src/menu.h        2014-06-02 18:01:21 +0000
+++ b/src/menu.h        2014-06-03 06:51:18 +0000
@@ -20,12 +20,52 @@
 #define MENU_H
 
 #include "systime.h" /* for Time */
-#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI) \
-  || defined (HAVE_NS)
+#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS)
 #include "../lwlib/lwlib.h" /* for widget_value */
 #endif
 
 #ifdef HAVE_NTGUI
+/* This is based on the one in ../lwlib/lwlib.h, with unused portions
+   removed.  HAVE_NTGUI cannot include lwlib.h, as that pulls in X11
+   headers.  */
+
+enum button_type
+{
+  BUTTON_TYPE_NONE,
+  BUTTON_TYPE_TOGGLE,
+  BUTTON_TYPE_RADIO
+};
+
+typedef struct _widget_value
+{
+  /* name of widget */
+  Lisp_Object   lname;
+  const char*   name;
+  /* value (meaning depend on widget type) */
+  const char*   value;
+  /* keyboard equivalent. no implications for XtTranslations */
+  Lisp_Object   lkey;
+  const char*   key;
+  /* Help string or nil if none.
+     GC finds this string through the frame's menu_bar_vector
+     or through menu_items.  */
+  Lisp_Object   help;
+  /* true if enabled */
+  unsigned char enabled;
+  /* true if selected */
+  unsigned char selected;
+  /* The type of a button.  */
+  enum button_type button_type;
+  /* true if menu title */
+  unsigned char title;
+  /* Contents of the sub-widgets, also selected slot for checkbox */
+  struct _widget_value* contents;
+  /* data passed to callback */
+  void  *call_data;
+  /* next one in the list */
+  struct _widget_value* next;
+} widget_value;
+
 extern Lisp_Object Qunsupported__w32_dialog;
 #endif
 

=== modified file 'src/w32menu.c'
--- a/src/w32menu.c     2014-06-02 18:01:21 +0000
+++ b/src/w32menu.c     2014-06-03 06:51:18 +0000
@@ -697,7 +697,7 @@
              ASET (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY, descrip);
            }
 
-         wv = make_widget_value (SSDATA (item_name), NULL, !NILP (enabled),
+         wv = make_widget_value (SSDATA (item_name), NULL, !NILP (enable),
                                  STRINGP (help) ? help : Qnil);
          if (prev_wv)
            prev_wv->next = wv;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]