;+
;NAME:
; thm_ui_update_progress
;PURPOSE:
; Write a string into the progress widget for the THEMIS GUI
;CALLING SEQUENCE:
; thm_ui_update_progress, gui_id, input_string
;INPUT:
; gui_id = the widget_id for the GUI
; input_string = a 1 line string to be displayed
;OUTPUT:
; None
;HISTORY:
; jmm, 9-may-2007, jimm@ssl.berkeley.edu
;$LastChangedBy$
;$LastChangedDate$
;$LastChangedRevision$
;$URL$
;-
Pro thm_ui_update_progress, gui_id, input_string

;Extract the state from the widget
  If(widget_valid(gui_id) And is_string(input_string)) Then Begin
    widget_control, gui_id, get_uval = state, /no_copy
    If(is_struct(state)) Then Begin
      widget_control, state.progress_text, set_val = input_string
      widget_control, gui_id, set_uval = state, /no_copy
    Endif
  Endif Else Begin
    message, /cont, 'Invalid message or widget_id'
  Endelse
  Return
End