Fix static initialization order problem with Horus GUI (#4141)

* [480x272] Fix static initialization order problem with Layout, Theme, & Widget factories.

* [480x272] Fix return from drawTimerMode().

* [480x272] Remove use of macros for registered Layout, Widget, & Theme class lists; remove extern declarations (cosmetic).

* [480x272] Convert Layout and Theme registry to dynamic lists (still max. of 10 each);
  Hide indicator arrow when user is at start/end of available widgets in spinner UI;
  Add some sanity checking to pointer usage in screens_setup;
  Add an (arbitrary) limit of 20 Widgets;
  And a line break! :)
This commit is contained in:
Max Paperno
2016-12-17 23:29:26 +01:00
committed by Bertrand Songis
parent d4d3d51a9d
commit bce42bb25c
8 changed files with 137 additions and 87 deletions
+3 -1
View File
@@ -186,7 +186,9 @@ inline const ZoneOption * Widget::getOptions() const
return getFactory()->getOptions();
}
extern std::list<const WidgetFactory *> registeredWidgets;
Widget * loadWidget(const char * name, const Zone & zone, Widget::PersistentData * persistentData);
#define MAX_REGISTERED_WIDGETS 20 // TODO: arbitrary limit, not checked
std::list<const WidgetFactory *> & getRegisteredWidgets();
#endif // _WIDGET_H_