libs/gt/src/gtRTL.h.cxx
// value 2 for reset_filters is a special case used now by minibrowser to just 
// update contnets of the list without resetting user filters	    
value 2 for reset_filters is a special case used now by minibrowser to just
update contnets of the list without resetting user filters
value 2 for reset_filters is a special case used now by minibrowser to just update contnets of the list without resetting user filters
void gtRTL::regenerate_rtl(RTLPtr r, int sort_order, int reset_filters)
{
    Initialize(gtRTL::regenerate_rtl);
    genString sort_spec;
    genString format_spec;
    genString show_spec;
    genString hide_spec;
    int save_specs = 0;
    if(rtl) {
	viewListHeader* old_vh = checked_cast(viewListHeader, dlg->get_view_ptr(0));
	if(old_vh) {
            sort_spec   = old_vh->sort_spec();
            format_spec = old_vh->format_spec();
	    if(rtl_get_APIhandler(rtl)) {
		if(reset_filters == 2) {
		    show_filter = old_vh->show_filter();
		    hide_filter = old_vh->hide_filter();
		} else {
		    show_filter = "";
		    hide_filter = "";
		}
	    } else {
		if(!reset_filters) {
		    show_filter = old_vh->show_filter();
		    hide_filter = old_vh->hide_filter();
		} else {
		    show_filter = "";
		    hide_filter = "";
		}
	    }
	    save_specs = 1;
	    dlg->close_window(0);
	    dlg->close_view(0, true);
	}
    }
    if(rtl = r) {
	if(handle_buttons)
	    list->set_special_buttons(0);
	miniBrowserRTL_API *api = rtl_get_APIhandler(rtl);
	if(api) {
	    if(reset_filters != 2) {
		char *new_sort = api->get_sort_spec(rtl);
		if(new_sort) {
		    sort_spec  = new_sort;
		    save_specs = 1;
		} else
		    sort_spec = "";
		format_spec = "";
		show_filter = "";
		hide_filter = "";
	    }
	    api->set_list(list);
	    if(handle_buttons) {
		if(api->need_vcr_control(rtl)) 
		    list->set_special_buttons(1);
		api->make_own_buttons(list->get_button_form(), this, rtl);
	    }
	}
	list->reset_pos();
	dlg->open_view(0, rtl, checked_cast(RTLNode, rtl->get_root()),
		       Rep_List, sort_order, rtlDisplayList);
	dlg->create_window(0, list->container()->rep()->widget());
	viewListHeader* vh = checked_cast(viewListHeader, dlg->get_view_ptr(0));
	notifier.set_prop(PROP_SWIDGET, vh, this);
        if(save_specs) {
            vh->sort_spec((char*)sort_spec);
            vh->format_spec((char*)format_spec);
            vh->show_filter((char*)show_filter);
            vh->hide_filter((char*)hide_filter);
            save_specs = 0;
        }
    } else if(list) {		
	if(handle_buttons)
	    list->set_special_buttons(0);
	list->delete_all_items();
    }
}
void gtRTL :: regenerate_rtl ( RTLPtr r , int sort_order , int reset_filters ) { Initialize ( gtRTL :: regenerate_rtl ) ; genString sort_spec ; genString format_spec ; genString show_spec ; genString hide_spec ; int save_specs = 0 ; if ( rtl ) { viewListHeader * old_vh = checked_cast ( viewListHeader , dlg -> get_view_ptr ( 0 ) ) ; if ( old_vh ) { sort_spec = old_vh -> sort_spec ( ) ; format_spec = old_vh -> format_spec ( ) ; if ( rtl_get_APIhandler ( rtl ) ) { if ( reset_filters == 2 ) { show_filter = old_vh -> show_filter ( ) ; hide_filter = old_vh -> hide_filter ( ) ; } else { show_filter = " " ; hide_filter = " " ; } } else { if ( ! reset_filters ) { show_filter = old_vh -> show_filter ( ) ; hide_filter = old_vh -> hide_filter ( ) ; } else { show_filter = " " ; hide_filter = " " ; } } save_specs = 1 ; dlg -> close_window ( 0 ) ; dlg -> close_view ( 0 , true ) ; } } if ( rtl = r ) { if ( handle_buttons ) list -> set_special_buttons ( 0 ) ; miniBrowserRTL_API * api = rtl_get_APIhandler ( rtl ) ; if ( api ) { if ( reset_filters != 2 ) { char * new_sort = api -> get_sort_spec ( rtl ) ; if ( new_sort ) { sort_spec = new_sort ; save_specs = 1 ; } else sort_spec = " " ; format_spec = " " ; show_filter = " " ; hide_filter = " " ; } api -> set_list ( list ) ; if ( handle_buttons ) { if ( api -> need_vcr_control ( rtl ) ) list -> set_special_buttons ( 1 ) ; api -> make_own_buttons ( list -> get_button_form ( ) , this , rtl ) ; } } list -> reset_pos ( ) ; dlg -> open_view ( 0 , rtl , checked_cast ( RTLNode , rtl -> get_root ( ) ) , Rep_List , sort_order , rtlDisplayList ) ; dlg -> create_window ( 0 , list -> container ( ) -> rep ( ) -> widget ( ) ) ; viewListHeader * vh = checked_cast ( viewListHeader , dlg -> get_view_ptr ( 0 ) ) ; notifier . set_prop ( PROP_SWIDGET , vh , this ) ; if ( save_specs ) { vh -> sort_spec ( ( char * ) sort_spec ) ; vh -> format_spec ( ( char * ) format_spec ) ; vh -> show_filter ( ( char * ) show_filter ) ; vh -> hide_filter ( ( char * ) hide_filter ) ; save_specs = 0 ; } } else if ( list ) { if ( handle_buttons ) list -> set_special_buttons ( 0 ) ; list -> delete_all_items ( ) ; } }
value 2 for reset_filters is a special case used now by minibrowser to just
update contnets of the list without resetting user filters
value 2 for reset_filters is a special case used now by minibrowser to just update contnets of the list without resetting user filters
//set notifier for update // list may be zeroed out by destructor.