void load_tab(unsigned char tab) { struct widget_config *w_cfg; DTABS("Loading tab %d\n", tab); /* stop rendering */ video_pause(); /* reset widgets module */ widgets_reset(); /* default video profile */ video_apply_config(0); if (tab == 0) { w_cfg = (struct widget_config*) tab0_widgets; } else { w_cfg = config.widgets; } /* load widgets config */ while (w_cfg->tab != TABS_END) { if (w_cfg->tab == tab) load_widget_config(w_cfg); w_cfg++; } load_widgets(); /* resume video rendering */ video_resume(); active_tab = tab; DTABS("Loaded\n"); }
void ConnectWindow::on_show() { if (!_widgets_loaded) { load_widgets(); if (_attached) set_connected_to(App::instance().engine()); } Gtk::Dialog::on_show(); }