Changeset 6675 for trunk/WINDOW/AW_window.cxx
- Timestamp:
- 02/06/10 09:01:31 (2 years ago)
- Files:
-
- 1 modified
-
trunk/WINDOW/AW_window.cxx (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WINDOW/AW_window.cxx
r6674 r6675 11 11 #include "aw_commn.hxx" 12 12 #include "aw_at.hxx" 13 #include "aw_ awar.hxx"13 #include "aw_nawar.hxx" 14 14 #include "aw_xfig.hxx" 15 15 #include "aw_Xm.hxx" … … 84 84 85 85 if (mask != AWM_ALL) { // no need to make widget sensitive, if its shown unconditionally 86 prvt->button_list = new AW_buttons_struct(mask, w, prvt->button_list);86 button_sens_list = new AW_buttons_struct(mask, w, button_sens_list); 87 87 if (!(mask & global_mask)) XtSetSensitive(w, False); // disable widget if mask doesn't match 88 88 } … … 99 99 100 100 AW_buttons_struct::~AW_buttons_struct() { 101 aw_assert(next == 0); // has to be removed from global list before calling dtor102 } 103 104 bool AW_r emove_button_from_sens_list(AW_root *root, Widget w) {101 delete next; 102 } 103 104 bool AW_root::remove_button_from_sens_list(Widget button) { 105 105 bool removed = false; 106 if ( p_global->button_list) {106 if (button_sens_list) { 107 107 AW_buttons_struct *prev = 0; 108 AW_buttons_struct *bl = p_global->button_list;108 AW_buttons_struct *bl = button_sens_list; 109 109 110 110 while (bl) { 111 if (bl->button == w) break; // found wanted widget111 if (bl->button == button) break; // found wanted widget 112 112 prev = bl; 113 113 bl = bl->next; … … 116 116 if (bl) { 117 117 // remove from list 118 if (prev) prev->next = bl->next;119 else p_global->button_list = bl->next;118 if (prev) prev->next = bl->next; 119 else button_sens_list = bl->next; 120 120 121 121 bl->next = 0; … … 129 129 130 130 AW_option_struct::AW_option_struct(const char *variable_valuei, 131 Widget choice_widgeti) :131 Widget choice_widgeti) : 132 132 variable_value(strdup(variable_valuei)), choice_widget(choice_widgeti), 133 133 next(0) { … … 273 273 274 274 AW_root::~AW_root() { 275 delete focus_callback_list; focus_callback_list = NULL; 276 delete button_sens_list; button_sens_list = NULL; 277 275 278 exit_root(); 276 279 exit_variables(); 277 280 aw_assert(this == AW_root::SINGLETON); 278 281 279 280 282 delete prvt; 281 283 … … 1464 1466 p_r->fontlist = XmFontListCreate(fontstruct, XmSTRING_DEFAULT_CHARSET); 1465 1467 1466 p_r->button_list = 0;1468 button_sens_list = 0; 1467 1469 1468 1470 p_r->last_option_menu = p_r->current_option_menu = p_r->option_menu_list = NULL; … … 1773 1775 char *var_value = is_awar->read_as_string(); 1774 1776 if (var_value) { 1775 aww->update_label( (int*)widget, var_value);1777 aww->update_label(widget, var_value); 1776 1778 } 1777 1779 else { 1778 1780 AW_ERROR("AW_label_in_awar_list:: AWAR %s not found\n", str); 1779 aww->update_label( (int*)widget, str);1781 aww->update_label(widget, str); 1780 1782 } 1781 1783 free(var_value); 1782 AW_INSERT_BUTTON_IN_AWAR_LIST(is_awar,0, widget, AW_WIDGET_LABEL_FIELD, aww);1784 is_awar->tie_widget(0, widget, AW_WIDGET_LABEL_FIELD, aww); 1783 1785 } 1784 1786 } … … 2654 2656 2655 2657 global_mask = mask; 2656 for (list = p_r->button_list; list; list = list->next) {2658 for (list = button_sens_list; list; list = list->next) { 2657 2659 XtSetSensitive(list->button, (list->mask & mask) ? True : False); 2658 2660 }
