aboutsummaryrefslogtreecommitdiff
path: root/libXaw/src/MenuButton.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-10 15:05:45 +0200
committermarha <marha@users.sourceforge.net>2012-04-10 15:05:45 +0200
commit4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8 (patch)
tree3ddf28be6916dd5ea27837431b5be8c94017cd9a /libXaw/src/MenuButton.c
parent5564e91e3cf4ba5cb2fbebbc2d63d18f588016b8 (diff)
parent5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6 (diff)
downloadvcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.tar.gz
vcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.tar.bz2
vcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'libXaw/src/MenuButton.c')
-rw-r--r--libXaw/src/MenuButton.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/libXaw/src/MenuButton.c b/libXaw/src/MenuButton.c
index 2732a72b3..e1908512d 100644
--- a/libXaw/src/MenuButton.c
+++ b/libXaw/src/MenuButton.c
@@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group.
* Date: May 2, 1989
*
* By: Chris D. Peterson
- * MIT X Consortium
+ * MIT X Consortium
* kit@expo.lcs.mit.edu
*/
@@ -42,7 +42,6 @@ in this Software without prior written authorization from The Open Group.
#include <stdio.h>
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
-#include <X11/Xmu/SysUtil.h>
#include <X11/Xaw/MenuButtoP.h>
#include <X11/Xaw/XawInit.h>
#include "Private.h"
@@ -65,7 +64,7 @@ static void PopupMenu(Widget, XEvent*, String*, Cardinal*);
*/
#define superclass ((CommandWidgetClass)&commandClassRec)
-static char defaultTranslations[] =
+static char defaultTranslations[] =
"<Enter>:" "highlight()\n"
"<Leave>:" "reset()\n"
"Any<BtnDown>:" "reset() PopupMenu()\n";
@@ -96,7 +95,7 @@ MenuButtonClassRec menuButtonClassRec = {
{
(WidgetClass)superclass, /* superclass */
"MenuButton", /* class_name */
- sizeof(MenuButtonRec), /* size */
+ sizeof(MenuButtonRec), /* size */
XawMenuButtonClassInitialize, /* class_initialize */
NULL, /* class_part_initialize */
False, /* class_inited */
@@ -122,14 +121,14 @@ MenuButtonClassRec menuButtonClassRec = {
NULL, /* accept_focus */
XtVersion, /* version */
NULL, /* callback_private */
- defaultTranslations, /* tm_table */
+ defaultTranslations, /* tm_table */
XtInheritQueryGeometry, /* query_geometry */
XtInheritDisplayAccelerator, /* display_accelerator */
NULL, /* extension */
},
/* simple */
{
- XtInheritChangeSensitive /* change_sensitive */
+ XtInheritChangeSensitive /* change_sensitive */
},
/* label */
{
@@ -212,7 +211,7 @@ PopupMenu(Widget w, XEvent *event, String *params, Cardinal *num_params)
temp = w;
while(temp != NULL) {
menu = XtNameToWidget(temp, mbw->menu_button.menu_name);
- if (menu == NULL)
+ if (menu == NULL)
temp = XtParent(temp);
else
break;
@@ -221,16 +220,16 @@ PopupMenu(Widget w, XEvent *event, String *params, Cardinal *num_params)
if (menu == NULL) {
char error_buf[BUFSIZ];
- (void)XmuSnprintf(error_buf, sizeof(error_buf),
- "MenuButton: Could not find menu widget named %s.",
- mbw->menu_button.menu_name);
+ snprintf(error_buf, sizeof(error_buf),
+ "MenuButton: Could not find menu widget named %s.",
+ mbw->menu_button.menu_name);
XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
return;
}
if (!XtIsRealized(menu))
XtRealizeWidget(menu);
-
+
menu_width = XtWidth(menu) + (XtBorderWidth(menu) << 1);
button_height = XtHeight(w) + (XtBorderWidth(w) << 1);
menu_height = XtHeight(menu) + (XtBorderWidth(menu) << 1);
@@ -260,7 +259,7 @@ PopupMenu(Widget w, XEvent *event, String *params, Cardinal *num_params)
if (menu_x + menu_width > scr_width)
menu_x = scr_width - menu_width;
}
- if (menu_x < 0)
+ if (menu_x < 0)
menu_x = 0;
num_args = 0;