2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
24 * $XConsortium: pal_mainwin.c /main/5 1996/08/08 18:02:22 mustafa $
26 * @(#)pal_mainwin.c 1.67 11 Aug 1995 cde_app_builder/src/ab
28 * RESTRICTED CONFIDENTIAL INFORMATION:
30 * The information in this document is subject to special
31 * restrictions in a confidential disclosure agreement between
32 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
33 * document outside HP, IBM, Sun, USL, SCO, or Univel without
34 * Sun's specific written approval. This document and all copies
35 * and derivative works thereof must be returned or destroyed at
38 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
44 * pal_mainwin.c - Implements Palette Main Window object functionality
48 #include <ab_private/ab.h>
49 #include <ab_private/pal.h>
50 #include <ab_private/prop.h>
51 #include <ab_private/abobj.h>
52 #include <ab_private/abobj_set.h>
53 #include <ab_private/ui_util.h>
54 #include "mainwin_ui.h"
56 const int mainwin_init_height = 175;
57 const int mainwin_init_width = 400;
59 typedef struct PROP_MAINWIN_SETTINGS
62 PropFieldSettingRec name;
63 PropFieldSettingRec title;
64 PropRadioSettingRec size_policy;
65 PropGeometrySettingRec geometry;
66 PropRadioSettingRec resize_mode;
67 PropFieldSettingRec icon;
68 PropFieldSettingRec icon_mask;
69 PropFieldSettingRec icon_label;
70 PropCheckboxSettingRec areas;
71 PropCheckboxSettingRec init_state;
72 PropColorSettingRec bg_color;
73 PropColorSettingRec fg_color;
75 } PropMainwinSettingsRec, *PropMainwinSettings;
77 /*************************************************************************
79 ** Private Function Declarations **
81 **************************************************************************/
85 static int mainwin_initialize(
88 static Widget mainwin_prop_init(
92 static int mainwin_prop_activate(
96 static int mainwin_prop_clear(
99 static int mainwin_prop_load(
102 unsigned long loadkey
104 static int mainwin_prop_apply(
108 static BOOL mainwin_prop_pending(
112 static BOOL verify_props(
115 static void turnoff_changebars(
119 static void mainwin_create_area(
121 AB_CONTAINER_TYPE area_type
124 static void mainwin_remove_area(
130 /*************************************************************************
134 **************************************************************************/
136 PalItemInfo mainwin_palitem_rec = {
138 /* type */ AB_TYPE_BASE_WINDOW,
139 /* name */ "Main Window",
140 /* animation pixmaps*/ NULL,
141 /* number of pixmaps*/ 0,
142 /* rev_prop_frame */ NULL,
143 /* fix_prop_dialog */ NULL,
144 /* initialize */ mainwin_initialize,
145 /* is_a_test */ obj_is_base_win,
146 /* prop_initialize */ mainwin_prop_init,
147 /* prop_active */ mainwin_prop_activate,
148 /* prop_clear */ mainwin_prop_clear,
149 /* prop_load */ mainwin_prop_load,
150 /* prop_apply */ mainwin_prop_apply,
151 /* prop_pending */ mainwin_prop_pending
155 PalItemInfo *ab_mainwin_palitem = &mainwin_palitem_rec;
156 PropMainwinSettingsRec prop_mainwin_settings_rec[AB_PROP_TYPE_NUM_VALUES];
158 /*************************************************************************
160 ** Function Definitions **
162 **************************************************************************/
168 ABObj project = proj_get_project();
170 obj_set_unique_name(obj, "mainwindow");
172 obj_set_label(obj, catgets(Dtb_project_catd, 100, 258, "Main Window"));
173 obj_set_bg_color(obj, "white");
174 obj_set_is_initially_visible(obj, True);
175 obj_set_is_initially_iconic(obj, False);
176 obj_set_is_initially_active(obj, True);
177 obj->width = mainwin_init_width;
178 obj->height = mainwin_init_height;
180 /* If no Main Windows are currently designated as the
181 * "Primary" MainWindow (root window), then set this
184 if (obj_get_root_window(project) == NULL)
185 obj_set_root_window(project, obj);
196 DtbMainwinPropDialogInfoRec rev_mainwin_prop_dialog; /* Revolving Props */
197 DtbMainwinPropDialogInfo cgen;
198 DtbRevolvPropDialogInfo rpd = &(dtb_revolv_prop_dialog);
199 PropMainwinSettingsRec *pms = &(prop_mainwin_settings_rec[type]);
204 if (type == AB_PROP_REVOLVING)
207 * Only the Attributes ControlPanel needs to be created within
208 * the existing Revolving Prop dialog, so fill out all other
209 * fields with the Revolving Prop dialog equivelents, so the
210 * dtb initialize proc will skip those non-NULL fields...
212 dtbMainwinPropDialogInfo_clear(&rev_mainwin_prop_dialog);
214 cgen = &(rev_mainwin_prop_dialog);
215 cgen->prop_dialog = rpd->prop_dialog;
216 cgen->prop_dialog_shellform = rpd->prop_dialog_shellform;
217 cgen->prop_dialog_panedwin = rpd->prop_dialog_panedwin;
218 cgen->prop_dialog_form = rpd->prop_dialog_form;
219 cgen->objlist_panel = rpd->objlist_panel;
220 cgen->objlist_label = rpd->objlist_label2;
221 cgen->objlist_scrolledwin = rpd->objlist_scrolledwin;
222 cgen->objlist = rpd->objlist;
223 cgen->attrs_ctrlpanel_frame = rpd->attrs_ctrlpanel_frame;
224 cgen->activate_panel = rpd->activate_panel;
225 cgen->ok_button = rpd->ok_button;
226 cgen->cancel_button = rpd->cancel_button;
227 cgen->apply_button = rpd->apply_button;
228 cgen->reset_button = rpd->reset_button;
229 cgen->help_button = rpd->help_button;
232 else /* AB_PROP_FIXED */
233 cgen = &dtb_mainwin_prop_dialog;
235 if (dtb_mainwin_prop_dialog_initialize(cgen, parent) == 0)
237 pms->prop_sheet = cgen->attrs_ctrlpanel;
238 pms->current_obj = NULL;
240 if (type == AB_PROP_REVOLVING)
241 XtVaSetValues(parent,
242 XmNuserData, pms->current_obj,
245 /* Dialog/Object List */
246 if (type == AB_PROP_FIXED)
248 prop_fixed_dialog_init(ab_mainwin_palitem,
249 cgen->prop_dialog_shellform, cgen->objlist);
250 prop_activate_panel_init(type, ab_mainwin_palitem,
251 cgen->ok_button, cgen->apply_button,
252 cgen->reset_button, cgen->cancel_button,
255 /* Alternate Editor Buttons */
256 prop_editors_panel_init(type, ab_mainwin_palitem,
257 NULL, cgen->conn_button, cgen->helptxt_button);
260 * Prop Sheet Settings....
264 prop_field_init(&(pms->name), cgen->name_field_label,
265 cgen->name_field, cgen->name_cb);
268 prop_field_init(&(pms->title), cgen->title_field_label,
274 item[n] = cgen->resizemode_rbox_items.Adjustable_item;
275 item_val[n] = True; n++;
276 item[n] = cgen->resizemode_rbox_items.Fixed_item;
277 item_val[n] = False; n++;
278 prop_radiobox_init(&(pms->resize_mode), cgen->resizemode_rbox_label,
279 cgen->resizemode_rbox, n, item, (XtPointer*)item_val,
280 cgen->resizemode_cb);
283 prop_field_init(&(pms->icon), cgen->icon_field_label,
284 cgen->icon_field, cgen->icon_cb);
286 /* Icon Mask Filename */
287 prop_field_init(&(pms->icon_mask), cgen->iconmask_field_label,
288 cgen->iconmask_field, cgen->iconmask_cb);
291 prop_field_init(&(pms->icon_label), cgen->iconlabel_field_label,
292 cgen->iconlabel_field, cgen->iconlabel_cb);
296 item[n] = cgen->areas_ckbox_items.Menubar_item;
297 item_val[n] = AB_CONT_MENU_BAR; n++;
298 item[n] = cgen->areas_ckbox_items.Toolbar_item;
299 item_val[n] = AB_CONT_TOOL_BAR; n++;
300 item[n] = cgen->areas_ckbox_items.Footer_item;
301 item_val[n] = AB_CONT_FOOTER; n++;
302 prop_checkbox_init(&(pms->areas), cgen->areas_ckbox_label,
303 cgen->areas_ckbox, n, item, item_val,
308 item[n] = cgen->size_policy_rbox_items.Fit_Contents_item;
309 item_val[n] = SIZE_OF_CONTENTS_KEY; n++;
310 item[n] = cgen->size_policy_rbox_items.Fixed_item;
311 item_val[n] = SIZE_FIXED_KEY; n++;
312 prop_radiobox_init(&(pms->size_policy), cgen->size_policy_rbox_label,
313 cgen->size_policy_rbox, n, item, (XtPointer*)item_val,
314 cgen->size_policy_cb);
317 XtAddCallback(item[i], XmNvalueChangedCallback,
318 prop_size_policyCB, (XtPointer)&(pms->geometry));
321 prop_geomfield_init(&(pms->geometry), cgen->geom_label,
322 NULL, NULL, NULL, NULL,
323 cgen->width_field_label, cgen->width_field,
324 cgen->height_field_label, cgen->height_field,
329 item[n] = cgen->istate_ckbox_items.Visible_item;
330 item_val[n] = AB_STATE_VISIBLE; n++;
331 item[n] = cgen->istate_ckbox_items.Iconic_item;
332 item_val[n] = AB_STATE_ICONIC; n++;
333 prop_checkbox_init(&(pms->init_state), cgen->istate_ckbox_label,
334 cgen->istate_ckbox, n, item, item_val,
337 /* Background Setting */
338 prop_colorfield_init(&(pms->bg_color), cgen->bg_mbutton,
339 cgen->bg_mbutton_bg_mbutton_menu_items.None_item,
340 cgen->bg_mbutton_bg_mbutton_menu_items.Color_Chooser_item,
341 cgen->bg_swatch, cgen->bg_field, cgen->bg_cb);
343 /* Foreground Setting */
344 prop_colorfield_init(&(pms->fg_color), cgen->fg_mbutton,
345 cgen->fg_mbutton_fg_mbutton_menu_items.None_item,
346 cgen->fg_mbutton_fg_mbutton_menu_items.Color_Chooser_item,
347 cgen->fg_swatch, cgen->fg_field, cgen->fg_cb);
349 prop_changebars_cleared(pms->prop_sheet);
351 return (cgen->prop_dialog_shellform);
359 mainwin_prop_activate(
364 ui_set_active(prop_mainwin_settings_rec[type].prop_sheet, active);
373 PropMainwinSettingsRec *pms = &(prop_mainwin_settings_rec[type]);
375 if (pms->current_obj == NULL)
379 prop_field_set_value(&(pms->name), "", False);
382 prop_field_set_value(&(pms->title), "", False);
384 /* Clear Resize Mode */
385 prop_radiobox_set_value(&(pms->resize_mode), (XtPointer)True, False);
387 /* Clear Icon Filename */
388 prop_field_set_value(&(pms->icon), "", False);
390 /* Clear Icon Mask Filename */
391 prop_field_set_value(&(pms->icon_mask), "", False);
393 /* Clear Icon Label */
394 prop_field_set_value(&(pms->icon_label), "", False);
397 prop_checkbox_set_value(&(pms->areas), AB_CONT_MENU_BAR, False, False);
398 prop_checkbox_set_value(&(pms->areas), AB_CONT_TOOL_BAR, False, False);
399 prop_checkbox_set_value(&(pms->areas), AB_CONT_FOOTER, False, False);
401 /* Clear Size Policy */
402 prop_radiobox_set_value(&(pms->size_policy),
403 (XtPointer)SIZE_FIXED_KEY, False);
406 prop_geomfield_clear(&(pms->geometry), GEOM_WIDTH);
407 prop_geomfield_clear(&(pms->geometry), GEOM_HEIGHT);
409 /* Clear Initial State */
410 prop_checkbox_set_value(&(pms->init_state), AB_STATE_VISIBLE, True, False);
411 prop_checkbox_set_value(&(pms->init_state), AB_STATE_ICONIC, False, False);
414 prop_colorfield_set_value(&(pms->bg_color), "", False);
415 prop_colorfield_set_value(&(pms->fg_color), "", False);
417 pms->current_obj = NULL;
419 turnoff_changebars(type);
428 unsigned long loadkey
431 PropMainwinSettingsRec *pms = &(prop_mainwin_settings_rec[type]);
433 BOOL load_all = (loadkey & LoadAll);
437 if (pms->current_obj != NULL)
438 obj = pms->current_obj;
442 else if (!obj_is_base_win(obj))
445 pms->current_obj = obj;
448 if (load_all || loadkey & LoadName)
449 prop_field_set_value(&(pms->name), obj_get_name(obj), False);
454 prop_field_set_value(&(pms->title), obj_get_label(obj), False);
456 /* Load Resize Mode */
457 prop_radiobox_set_value(&(pms->resize_mode),
458 (XtPointer)obj_get_resizable(obj), False);
460 /* Load Icon Filename */
461 prop_field_set_value(&(pms->icon), obj_get_icon(obj), False);
463 /* Load Icon Mask Filename */
464 prop_field_set_value(&(pms->icon_mask), obj_get_icon_mask(obj), False);
466 /* Load Icon Label */
467 prop_field_set_value(&(pms->icon_label), obj_get_icon_label(obj), False);
469 /* Load Window Areas */
470 area = objxm_comp_mainwin_get_area(obj, AB_CONT_MENU_BAR);
471 prop_checkbox_set_value(&(pms->areas), AB_CONT_MENU_BAR,
472 area != NULL, False);
474 area = objxm_comp_mainwin_get_area(obj, AB_CONT_TOOL_BAR);
475 prop_checkbox_set_value(&(pms->areas), AB_CONT_TOOL_BAR,
476 area != NULL, False);
478 area = objxm_comp_mainwin_get_area(obj, AB_CONT_FOOTER);
479 prop_checkbox_set_value(&(pms->areas), AB_CONT_FOOTER,
480 area != NULL, False);
482 /* Load Size Policy */
483 prop_radiobox_set_value(&(pms->size_policy),
484 abobj_width_resizable(obj)?
485 (XtPointer)SIZE_FIXED_KEY :
486 (XtPointer)SIZE_OF_CONTENTS_KEY, False);
488 /* Load Initial State */
489 prop_checkbox_set_value(&(pms->init_state), AB_STATE_VISIBLE,
490 obj_is_initially_visible(obj), False);
491 prop_checkbox_set_value(&(pms->init_state), AB_STATE_ICONIC,
492 obj_is_initially_iconic(obj), False);
495 prop_colorfield_set_value(&(pms->bg_color), obj_get_bg_color(obj), False);
496 prop_colorfield_set_value(&(pms->fg_color), obj_get_fg_color(obj), False);
498 turnoff_changebars(type);
502 if (load_all || loadkey & LoadSize)
503 prop_load_obj_size(obj, &(pms->geometry));
513 PropMainwinSettingsRec *pms = &(prop_mainwin_settings_rec[type]);
517 STRING value, icon, icon_mask, icon_label;
518 BOOL reset_bg = False;
519 BOOL reset_fg = False;
520 BOOL size_chg = False;
523 if (!verify_props(type))
526 if (prop_changed(pms->name.changebar))
528 value = prop_field_get_value(&(pms->name));
529 abobj_set_name(pms->current_obj, value);
532 if (prop_changed(pms->title.changebar))
534 value = prop_field_get_value(&(pms->title));
535 abobj_set_label(pms->current_obj, pms->current_obj->label_type, value);
538 if (prop_changed(pms->resize_mode.changebar))
540 abobj_set_resize_mode(pms->current_obj,
541 (BOOL)prop_radiobox_get_value(&(pms->resize_mode)));
543 if (prop_changed(pms->icon.changebar) ||
544 prop_changed(pms->icon_mask.changebar) ||
545 prop_changed(pms->icon_label.changebar))
547 icon = prop_field_get_value(&(pms->icon));
548 icon_mask = prop_field_get_value(&(pms->icon_mask));
549 icon_label = prop_field_get_value(&(pms->icon_label));
550 abobj_set_icon(pms->current_obj, icon, icon_mask, icon_label);
552 util_free(icon_mask);
553 util_free(icon_label);
555 if (prop_changed(pms->areas.changebar))
557 module = obj_get_module(pms->current_obj);
560 area = objxm_comp_mainwin_get_area(pms->current_obj, AB_CONT_MENU_BAR);
561 area_set = prop_checkbox_get_value(&(pms->areas), AB_CONT_MENU_BAR);
563 if (area != NULL && !area_set) /* Remove Menubar */
564 mainwin_remove_area(pms->current_obj, area);
566 else if (area == NULL && area_set) /* Add Menubar */
567 mainwin_create_area(pms->current_obj, AB_CONT_MENU_BAR);
570 area = objxm_comp_mainwin_get_area(pms->current_obj, AB_CONT_TOOL_BAR);
571 area_set = prop_checkbox_get_value(&(pms->areas), AB_CONT_TOOL_BAR);
573 if (area != NULL && !area_set) /* Remove Toolbar */
574 mainwin_remove_area(pms->current_obj, area);
576 else if (area == NULL && area_set) /* Add Toolbar */
577 mainwin_create_area(pms->current_obj, AB_CONT_TOOL_BAR);
580 area = objxm_comp_mainwin_get_area(pms->current_obj, AB_CONT_FOOTER);
581 area_set = prop_checkbox_get_value(&(pms->areas), AB_CONT_FOOTER);
583 if (area != NULL && !area_set) /* Remove Footer */
584 mainwin_remove_area(pms->current_obj, area);
586 else if (area == NULL && area_set) /* Add Footer */
587 mainwin_create_area(pms->current_obj, AB_CONT_FOOTER);
589 if (prop_changed(pms->size_policy.changebar))
591 abobj_set_size_policy(pms->current_obj,
592 prop_radiobox_get_value(&(pms->size_policy)) == SIZE_FIXED_KEY);
596 if (prop_changed(pms->geometry.changebar))
598 if (abobj_width_resizable(pms->current_obj))
600 new_w = prop_geomfield_get_value(&(pms->geometry), GEOM_WIDTH);
601 abobj_set_pixel_width(pms->current_obj, new_w, 0);
603 if (abobj_height_resizable(pms->current_obj))
605 new_h = prop_geomfield_get_value(&(pms->geometry), GEOM_HEIGHT);
606 abobj_set_pixel_height(pms->current_obj, new_h, 0);
609 if (prop_changed(pms->init_state.changebar))
611 abobj_set_visible(pms->current_obj,
612 prop_checkbox_get_value(&(pms->init_state), AB_STATE_VISIBLE));
613 abobj_set_iconic(pms->current_obj,
614 prop_checkbox_get_value(&(pms->init_state), AB_STATE_ICONIC));
616 if (prop_changed(pms->fg_color.changebar))
618 value = prop_colorfield_get_value(&(pms->fg_color));
619 abobj_set_foreground_color(pms->current_obj, value);
620 if (util_strempty(value))
623 prop_colorfield_set_value(&(pms->fg_color),
624 obj_get_fg_color(pms->current_obj), False);
626 if (prop_changed(pms->bg_color.changebar))
628 value = prop_colorfield_get_value(&(pms->bg_color));
629 abobj_set_background_color(pms->current_obj, value);
630 if (util_strempty(value))
633 prop_colorfield_set_value(&(pms->bg_color),
634 obj_get_bg_color(pms->current_obj), False);
636 abobj_instantiate_changes(pms->current_obj);
638 if (reset_bg || reset_fg) /* Set back to No Color */
639 abobj_reset_colors(pms->current_obj, reset_bg, reset_fg);
641 turnoff_changebars(type);
648 mainwin_prop_pending(
652 return(prop_changebars_pending(prop_mainwin_settings_rec[type].prop_sheet));
660 PropMainwinSettingsRec *pms = &(prop_mainwin_settings_rec[type]);
664 if (prop_changed(pms->name.changebar) && !prop_name_ok(pms->current_obj, pms->name.field))
667 if (prop_changed(pms->areas.changebar))
669 DTB_MODAL_ANSWER answer;
672 area = objxm_comp_mainwin_get_area(pms->current_obj, AB_CONT_MENU_BAR);
673 area_set = prop_checkbox_get_value(&(pms->areas), AB_CONT_MENU_BAR);
674 if (area != NULL && !area_set) /* Remove Menubar */
676 pobj = objxm_comp_get_subobj(area, AB_CFG_PARENT_OBJ);
678 if (obj_get_num_children(pobj) > 0)
680 /* Popup Modal Message and wait for answer */
681 dtb_mainwin_remove_mbar_msg_initialize(
682 &dtb_mainwin_remove_mbar_msg);
683 answer = dtb_show_modal_message(pms->areas.checkbox,
684 &dtb_mainwin_remove_mbar_msg,
686 if (answer == DTB_ANSWER_CANCEL)
691 area = objxm_comp_mainwin_get_area(pms->current_obj, AB_CONT_TOOL_BAR);
692 area_set = prop_checkbox_get_value(&(pms->areas), AB_CONT_TOOL_BAR);
693 if (area != NULL && !area_set) /* Remove Toolbar */
695 pobj = objxm_comp_get_subobj(area, AB_CFG_PARENT_OBJ);
697 if (obj_get_num_children(pobj) > 0)
699 /* Popup Modal Message and wait for answer */
700 dtb_mainwin_remove_tbar_msg_initialize(
701 &dtb_mainwin_remove_tbar_msg);
702 answer = dtb_show_modal_message(pms->areas.checkbox,
703 &dtb_mainwin_remove_tbar_msg,
705 if (answer == DTB_ANSWER_CANCEL)
710 area = objxm_comp_mainwin_get_area(pms->current_obj, AB_CONT_FOOTER);
711 area_set = prop_checkbox_get_value(&(pms->areas), AB_CONT_FOOTER);
712 if (area != NULL && !area_set) /* Remove Footer */
714 pobj = objxm_comp_get_subobj(area, AB_CFG_PARENT_OBJ);
716 if (obj_get_num_children(pobj) > 0)
718 /* Popup Modal Message and wait for answer */
719 dtb_mainwin_remove_footer_msg_initialize(
720 &dtb_mainwin_remove_footer_msg);
721 answer = dtb_show_modal_message(pms->areas.checkbox,
722 &dtb_mainwin_remove_footer_msg,
724 if (answer == DTB_ANSWER_CANCEL)
729 if (prop_changed(pms->icon.changebar) &&
730 !prop_graphic_filename_ok(pms->icon.field, True))
733 if (prop_changed(pms->icon_mask.changebar) &&
734 !prop_graphic_filename_ok(pms->icon_mask.field, True))
737 if (prop_changed(pms->geometry.changebar) &&
738 (!prop_number_ok(pms->geometry.w_field, (STRING)WFieldStr, 1, SHRT_MAX) ||
739 !prop_number_ok(pms->geometry.h_field, (STRING)HFieldStr, 1, SHRT_MAX)))
742 if (prop_changed(pms->fg_color.changebar) && !prop_color_ok(pms->fg_color.field))
745 if (prop_changed(pms->bg_color.changebar) && !prop_color_ok(pms->bg_color.field))
756 PropMainwinSettingsRec *pms = &(prop_mainwin_settings_rec[type]);
758 prop_set_changebar(pms->name.changebar, PROP_CB_OFF);
759 prop_set_changebar(pms->title.changebar, PROP_CB_OFF);
760 prop_set_changebar(pms->resize_mode.changebar, PROP_CB_OFF);
761 prop_set_changebar(pms->icon.changebar, PROP_CB_OFF);
762 prop_set_changebar(pms->icon_mask.changebar, PROP_CB_OFF);
763 prop_set_changebar(pms->icon_label.changebar, PROP_CB_OFF);
764 prop_set_changebar(pms->areas.changebar, PROP_CB_OFF);
765 prop_set_changebar(pms->size_policy.changebar, PROP_CB_OFF);
766 prop_set_changebar(pms->geometry.changebar, PROP_CB_OFF);
767 prop_set_changebar(pms->init_state.changebar, PROP_CB_OFF);
768 prop_set_changebar(pms->bg_color.changebar, PROP_CB_OFF);
769 prop_set_changebar(pms->fg_color.changebar, PROP_CB_OFF);
771 prop_changebars_cleared(pms->prop_sheet);
778 AB_CONTAINER_TYPE area_type
786 mwobj = objxm_comp_get_subobj(obj, AB_CFG_WINDOW_MW_OBJ);
787 workobj = objxm_comp_get_subobj(obj, AB_CFG_PARENT_OBJ);
789 area = obj_create(AB_TYPE_CONTAINER, mwobj);
790 obj_set_subtype(area, area_type);
791 pal_initialize_obj(area);
793 if (area_type == AB_CONT_FOOTER)
795 label = obj_create(AB_TYPE_LABEL, area);
798 pal_initialize_obj(label);
799 obj_set_label(label, catgets(Dtb_project_catd, 100, 264, "footer message"));
800 obj_set_label_alignment(label, AB_ALIGN_LEFT);
801 obj_set_unique_name(label,
802 ab_ident_from_name_and_label(obj_get_name(obj), "label"));
805 * Workaround part1: MainWindow bug that causes MainWindow to shrink
806 * when a MessageWindow area is added
808 XtVaGetValues(objxm_get_widget(workobj),
812 abobj_show_tree(area, True);
814 /* Workaround part2 */
815 if (area_type == AB_CONT_FOOTER)
816 XtVaSetValues(objxm_get_widget(workobj),
820 abobj_set_save_needed(obj_get_module(obj), True);
831 XtUnmanageChild(objxm_get_widget(area));
833 objxm_tree_destroy(area);
835 abobj_set_save_needed(obj_get_module(obj), True);