tasksGUI and calendarGUI: reduce binary size by sharing more code.