Simplify adding pages in one place

This commit is contained in:
Benny Baumann
2021-08-21 17:42:48 +02:00
parent 9060a4179d
commit 6e6334e603
3 changed files with 24 additions and 30 deletions

View File

@ -84,12 +84,8 @@ Object* Action_pickFromVector(State* st, Panel* list, int x, bool followProcess)
static void Action_runSetup(State* st) {
ScreenManager* scr = ScreenManager_new(st->header, st->settings, st, true);
CategoriesPanel* panelCategories = CategoriesPanel_new(scr, st->settings, st->header, st->pl);
ScreenManager_add(scr, (Panel*) panelCategories, 16);
CategoriesPanel_makeMetersPage(panelCategories);
Panel* panelFocus;
int ch;
ScreenManager_run(scr, &panelFocus, &ch);
CategoriesPanel_new(scr, st->settings, st->header, st->pl);
ScreenManager_run(scr, NULL, NULL);
ScreenManager_delete(scr);
if (st->settings->changed) {
Header_writeBackToSettings(st->header);