From fee217551c12754db517d1badd448fc9064a48a8 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Thu, 26 Nov 2020 16:15:09 +1100 Subject: Drop unneeded parameters to the ScreenManager constructor All calls to ScreenManager_new always pass the same first five values, the orientation is always HORIZONTAL and the y1 parameter is always the height of the passed-in header struct pointer. I think its safe to assert at this point that no VERTICAL orientation will arrive (if it does, its no harm in re-adding this then) - so we can remove unused conditionals (and TODOs) based on orientation too. --- Action.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Action.c') diff --git a/Action.c b/Action.c index f6e8fab5..dc57974d 100644 --- a/Action.c +++ b/Action.c @@ -46,7 +46,7 @@ Object* Action_pickFromVector(State* st, Panel* list, int x, bool followProcess) Settings* settings = st->settings; int y = panel->y; - ScreenManager* scr = ScreenManager_new(0, header->height, 0, -1, HORIZONTAL, header, settings, st, false); + ScreenManager* scr = ScreenManager_new(header, settings, st, false); scr->allowFocusChange = false; ScreenManager_add(scr, list, x - 1); ScreenManager_add(scr, panel, -1); @@ -83,7 +83,7 @@ Object* Action_pickFromVector(State* st, Panel* list, int x, bool followProcess) // ---------------------------------------- static void Action_runSetup(State* st) { - ScreenManager* scr = ScreenManager_new(0, st->header->height, 0, -1, HORIZONTAL, st->header, st->settings, st, true); + 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); -- cgit v1.2.3