]> code.delx.au - gnu-emacs/blobdiff - lwlib/lwlib-Xm.c
*** empty log message ***
[gnu-emacs] / lwlib / lwlib-Xm.c
index 340c8fda78495a4a0143cd7d2155478ec5b88906..766d3554e24a90e150d9568fa935b2721b1853bc 100644 (file)
@@ -139,6 +139,32 @@ void xm_manage_resizing P_ ((Widget, Boolean));
 #endif
 
 
+#if 0
+
+/* Print the complete X resource name of widget WIDGET to stderr.
+   This is sometimes handy to have available.  */
+
+void
+x_print_complete_resource_name (widget)
+     Widget widget;
+{
+  int i;
+  String names[100];
+
+  for (i = 0; i < 100 && widget != NULL; ++i)
+    {
+      names[i] = XtName (widget);
+      widget = XtParent (widget);
+    }
+
+  for (--i; i >= 1; --i)
+    fprintf (stderr, "%s.", names[i]);
+  fprintf (stderr, "%s\n", names[0]);
+}
+
+#endif /* 0 */
+
+
 static destroyed_instance *all_destroyed_instances = NULL;
 
 static destroyed_instance*
@@ -493,7 +519,8 @@ make_menu_in_widget (instance, widget, val, keep_first_children)
   old_children = XtCompositeChildren (widget, &old_num_children);
 
   /* Allocate the children array */
-  for (num_children = 0, cur = val; cur; num_children++, cur = cur->next);
+  for (num_children = 0, cur = val; cur; num_children++, cur = cur->next)
+    ;
   children = (Widget*)XtMalloc (num_children * sizeof (Widget));
 
   /* WIDGET should be a RowColumn.  */
@@ -610,12 +637,6 @@ make_menu_in_widget (instance, widget, val, keep_first_children)
   if (button)
     XtVaSetValues (widget, XmNmenuHelpWidget, button, NULL);
 
-  /* LessTif apparently doesn't recompute centered text when more
-     widgets are added.  So, do it after all widgets have been
-     created.  */
-  if (title)
-    XtVaSetValues (title, XmNalignment, XmALIGNMENT_CENTER, NULL);
-
   if (num_children)
     XtManageChildren (children, num_children);
 
@@ -1906,7 +1927,6 @@ xm_pop_down_callback (widget, closure, call_data)
      XtPointer call_data;
 {
   widget_instance *instance = (widget_instance *) closure;
-  fprintf (stderr, "%p\n", call_data);
 
   if ((!instance->pop_up_p && XtParent (widget) == instance->widget)
       || XtParent (widget) == instance->parent)