Mercurial > hg > xemacs-beta
comparison src/toolbar-x.c @ 165:5a88923fcbfe r20-3b9
Import from CVS: tag r20-3b9
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:44:42 +0200 |
parents | fe104dbd9147 |
children | 3d6bfa290dbd |
comparison
equal
deleted
inserted
replaced
164:4e0740e5aab2 | 165:5a88923fcbfe |
---|---|
602 current size and then adjust it for the change in the toolbar | 602 current size and then adjust it for the change in the toolbar |
603 size. */ | 603 size. */ |
604 | 604 |
605 in_specifier_change_function++; | 605 in_specifier_change_function++; |
606 if (!in_resource_setting) | 606 if (!in_resource_setting) |
607 /* mirror the value in the frame resources, unless it was already | 607 /* mirror the value in the frame resources, unless already done. */ |
608 done. */ | 608 { |
609 XtVaSetValues (FRAME_X_TEXT_WIDGET (f), | 609 Arg al [1]; |
610 pos == TOP_TOOLBAR ? XtNtopToolBarHeight : | 610 XtSetArg (al [0], |
611 pos == BOTTOM_TOOLBAR ? XtNbottomToolBarHeight : | 611 pos == TOP_TOOLBAR ? XtNtopToolBarHeight : |
612 pos == LEFT_TOOLBAR ? XtNleftToolBarWidth : | 612 pos == BOTTOM_TOOLBAR ? XtNbottomToolBarHeight : |
613 XtNrightToolBarWidth, | 613 pos == LEFT_TOOLBAR ? XtNleftToolBarWidth : |
614 newval, 0); | 614 XtNrightToolBarWidth, |
615 newval); | |
616 XtSetValues (FRAME_X_TEXT_WIDGET (f), al, 1); | |
617 } | |
615 if (XtIsRealized (FRAME_X_CONTAINER_WIDGET (f))) | 618 if (XtIsRealized (FRAME_X_CONTAINER_WIDGET (f))) |
616 { | 619 { |
617 int change = newval - oldval; | 620 int change = newval - oldval; |
618 Lisp_Object new_visibility = f->toolbar_visible_p[pos]; | 621 Lisp_Object new_visibility = f->toolbar_visible_p[pos]; |
619 | 622 |
742 #endif | 745 #endif |
743 XtReleaseGC (ew, FRAME_X_TOOLBAR_TOP_SHADOW_GC (f)); | 746 XtReleaseGC (ew, FRAME_X_TOOLBAR_TOP_SHADOW_GC (f)); |
744 XtReleaseGC (ew, FRAME_X_TOOLBAR_BOTTOM_SHADOW_GC (f)); | 747 XtReleaseGC (ew, FRAME_X_TOOLBAR_BOTTOM_SHADOW_GC (f)); |
745 | 748 |
746 /* Seg fault if we try and use these again. */ | 749 /* Seg fault if we try and use these again. */ |
747 FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC (f) = (GC) -1; | 750 FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC (f) = (GC) - 1; |
748 FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC (f) = (GC) -1; | 751 FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC (f) = (GC) - 1; |
749 FRAME_X_TOOLBAR_TOP_SHADOW_GC (f) = (GC) -1; | 752 FRAME_X_TOOLBAR_TOP_SHADOW_GC (f) = (GC) - 1; |
750 FRAME_X_TOOLBAR_BOTTOM_SHADOW_GC (f) = (GC) -1; | 753 FRAME_X_TOOLBAR_BOTTOM_SHADOW_GC (f) = (GC) - 1; |
751 } | 754 } |
752 | 755 |
753 static void | 756 static void |
754 x_initialize_frame_toolbars (struct frame *f) | 757 x_initialize_frame_toolbars (struct frame *f) |
755 { | 758 { |
756 EmacsFrame ef = (EmacsFrame) FRAME_X_TEXT_WIDGET (f); | 759 EmacsFrame ef = (EmacsFrame) FRAME_X_TEXT_WIDGET (f); |
757 | 760 |
758 if (ef->emacs_frame.toolbar_shadow_thickness < MINIMUM_SHADOW_THICKNESS) | 761 if (ef->emacs_frame.toolbar_shadow_thickness < MINIMUM_SHADOW_THICKNESS) |
759 { | 762 { |
760 XtVaSetValues (FRAME_X_TEXT_WIDGET (f), XtNtoolBarShadowThickness, | 763 Arg al [1]; |
761 MINIMUM_SHADOW_THICKNESS, 0); | 764 XtSetArg (al [0], XtNtoolBarShadowThickness, MINIMUM_SHADOW_THICKNESS); |
765 XtSetValues (FRAME_X_TEXT_WIDGET (f), al, 1); | |
762 } | 766 } |
763 | 767 |
764 x_initialize_frame_toolbar_gcs (f); | 768 x_initialize_frame_toolbar_gcs (f); |
765 } | 769 } |
766 | 770 |