;+ ;NAME: ; thm_ui_update_data_display ;PURPOSE: ; update the loaded-data display for the themis_w widget ;CALLIMG SEQUENCE: ; thm_ui_update_data_display, widget_id ;INPUT: ; widget_id = the id number of the widget ; ;$LastChangedBy: kenb-mac $ ;$LastChangedDate: 2007-01-26 15:52:34 -0800 (Fri, 26 Jan 2007) $ ;$LastChangedRevision: 241 $ ;$URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/thmsoc/trunk/idl/themis/common/thm_ui_update_data_display.pro $ ; ;- Pro thm_ui_update_data_display, id, add_active = add_active ;change the data list display widget_control, id, get_uval = state, /no_copy display_id = state.datalist If(ptr_valid(state.data_id)) Then Begin loaded_ids = *state.data_id If(ptr_valid(state.active_vnames)) Then Begin temp_names = tnames() data_ss = where_arr(temp_names, *state.active_vnames) Endif Else data_ss = -1 If(n_elements(loaded_ids) Gt 1) Then Begin loaded_ids = loaded_ids[1:*] If(keyword_set(add_active)) Then Begin If(data_ss[0] Ne -1) Then $ loaded_ids[data_ss] = 'Active -> '+loaded_ids[data_ss] Endif Endif Else loaded_ids = 'No Data loaded' widget_control, display_id, set_val = loaded_ids Endif widget_control, id, set_uval = state, /no_copy Return End