From 5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 10 Apr 2012 14:58:33 +0200 Subject: Updated following packages: bigreqsproto-1.1.2 fontsproto-2.1.2 recordproto-1.14.2 scrnsaverproto-1.2.2 xcmiscproto-1.2.2 libXt-1.1.3 xhost-1.0.5 kbproto-1.0.6 libXrender-0.9.7 libxkbfile-1.0.8 freetype-2.4.9 libXaw-1.0.10 libXpm-3.5.10 xproto-7.0.23 --- libXaw/src/MenuButton.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'libXaw/src/MenuButton.c') 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 #include #include -#include #include #include #include "Private.h" @@ -65,7 +64,7 @@ static void PopupMenu(Widget, XEvent*, String*, Cardinal*); */ #define superclass ((CommandWidgetClass)&commandClassRec) -static char defaultTranslations[] = +static char defaultTranslations[] = ":" "highlight()\n" ":" "reset()\n" "Any:" "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; -- cgit v1.2.3