Mercurial > emacs
comparison lwlib/lwlib-Xm.c @ 36782:2f7bd108e82f
(make_menu_in_widget): Remove code forcing LessTif to
recompute centered text; it works fine without with current LessTif.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 13 Mar 2001 16:51:13 +0000 |
parents | 85a9fd1b9e41 |
children | 7e04c5d86fe6 |
comparison
equal
deleted
inserted
replaced
36781:249d3e1ba617 | 36782:2f7bd108e82f |
---|---|
491 unsigned int old_num_children; | 491 unsigned int old_num_children; |
492 | 492 |
493 old_children = XtCompositeChildren (widget, &old_num_children); | 493 old_children = XtCompositeChildren (widget, &old_num_children); |
494 | 494 |
495 /* Allocate the children array */ | 495 /* Allocate the children array */ |
496 for (num_children = 0, cur = val; cur; num_children++, cur = cur->next); | 496 for (num_children = 0, cur = val; cur; num_children++, cur = cur->next) |
497 ; | |
497 children = (Widget*)XtMalloc (num_children * sizeof (Widget)); | 498 children = (Widget*)XtMalloc (num_children * sizeof (Widget)); |
498 | 499 |
499 /* WIDGET should be a RowColumn. */ | 500 /* WIDGET should be a RowColumn. */ |
500 if (!XmIsRowColumn (widget)) | 501 if (!XmIsRowColumn (widget)) |
501 abort (); | 502 abort (); |
607 4 pixels high." This is no longer true, and to make | 608 4 pixels high." This is no longer true, and to make |
608 XmNmenuHelpWidget work, we need to set it before managing the | 609 XmNmenuHelpWidget work, we need to set it before managing the |
609 children.. --gerd. */ | 610 children.. --gerd. */ |
610 if (button) | 611 if (button) |
611 XtVaSetValues (widget, XmNmenuHelpWidget, button, NULL); | 612 XtVaSetValues (widget, XmNmenuHelpWidget, button, NULL); |
612 | |
613 /* LessTif apparently doesn't recompute centered text when more | |
614 widgets are added. So, do it after all widgets have been | |
615 created. */ | |
616 if (title) | |
617 XtVaSetValues (title, XmNalignment, XmALIGNMENT_CENTER, NULL); | |
618 | 613 |
619 if (num_children) | 614 if (num_children) |
620 XtManageChildren (children, num_children); | 615 XtManageChildren (children, num_children); |
621 | 616 |
622 XtFree ((char *) children); | 617 XtFree ((char *) children); |
1904 Widget widget; | 1899 Widget widget; |
1905 XtPointer closure; | 1900 XtPointer closure; |
1906 XtPointer call_data; | 1901 XtPointer call_data; |
1907 { | 1902 { |
1908 widget_instance *instance = (widget_instance *) closure; | 1903 widget_instance *instance = (widget_instance *) closure; |
1909 fprintf (stderr, "%p\n", call_data); | |
1910 | 1904 |
1911 if ((!instance->pop_up_p && XtParent (widget) == instance->widget) | 1905 if ((!instance->pop_up_p && XtParent (widget) == instance->widget) |
1912 || XtParent (widget) == instance->parent) | 1906 || XtParent (widget) == instance->parent) |
1913 do_call (widget, closure, post_activate); | 1907 do_call (widget, closure, post_activate); |
1914 } | 1908 } |