changeset 9835:d2250d1b0f48

(make_menu_in_widget): Differentiate a separator entry ("--") from a title. (xm_pop_down_callback): Filter all but the last pop down callbacks.
author Paul Reilly <pmr@pajato.com>
date Tue, 08 Nov 1994 13:06:07 +0000
parents 5be536b91960
children 6714a42afa60
files lwlib/lwlib-Xm.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lwlib/lwlib-Xm.c	Tue Nov 08 05:18:09 1994 +0000
+++ b/lwlib/lwlib-Xm.c	Tue Nov 08 13:06:07 1994 +0000
@@ -345,7 +345,8 @@
       XtSetArg (al [ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
       XtSetArg (al [ac], XmNuserData, cur->call_data); ac++;
       
-      if (instance->pop_up_p && !cur->contents && !cur->call_data)
+      if (instance->pop_up_p && !cur->contents && !cur->call_data
+	  && !all_dashes_p (cur->name))
 	{
 	  ac = 0;
 	  XtSetArg (al[ac], XmNalignment, XmALIGNMENT_CENTER); ac++;
@@ -1510,7 +1511,10 @@
 static void
 xm_pop_down_callback (Widget widget, XtPointer closure, XtPointer call_data)
 {
-  do_call (widget, closure, post_activate);
+  widget_instance *instance = (widget_instance *) closure;
+
+  if (!instance->pop_up_p || (XtParent (widget) == instance->parent))
+    do_call (widget, closure, post_activate);
 }