summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r--apps/gui/skin_engine/skin_engine.h8
-rw-r--r--apps/gui/skin_engine/wps_parser.c50
2 files changed, 5 insertions, 53 deletions
diff --git a/apps/gui/skin_engine/skin_engine.h b/apps/gui/skin_engine/skin_engine.h
index 498444e8ea..1f5236fc15 100644
--- a/apps/gui/skin_engine/skin_engine.h
+++ b/apps/gui/skin_engine/skin_engine.h
@@ -37,11 +37,11 @@ bool gui_wps_display(struct gui_wps *gwps);
37/* Do a update_type update of the skinned screen */ 37/* Do a update_type update of the skinned screen */
38bool skin_update(struct gui_wps *gwps, unsigned int update_type); 38bool skin_update(struct gui_wps *gwps, unsigned int update_type);
39 39
40/* to setup up the wps-data from a format-buffer (isfile = false) 40/*
41 from a (wps-)file (isfile = true) 41 * setup up the skin-data from a format-buffer (isfile = false)
42 if buf == NULL it will load the hardcoded default 42 * or from a skinfile (isfile = true)
43 */ 43 */
44void skin_data_load(struct wps_data *wps_data, 44bool skin_data_load(struct wps_data *wps_data,
45 struct screen *display, 45 struct screen *display,
46 const char *buf, 46 const char *buf,
47 bool isfile); 47 bool isfile);
diff --git a/apps/gui/skin_engine/wps_parser.c b/apps/gui/skin_engine/wps_parser.c
index 2c6d5ded95..1a903c98ec 100644
--- a/apps/gui/skin_engine/wps_parser.c
+++ b/apps/gui/skin_engine/wps_parser.c
@@ -1666,7 +1666,7 @@ static bool load_wps_bitmaps(struct wps_data *wps_data, char *bmpdir)
1666 1666
1667/* to setup up the wps-data from a format-buffer (isfile = false) 1667/* to setup up the wps-data from a format-buffer (isfile = false)
1668 from a (wps-)file (isfile = true)*/ 1668 from a (wps-)file (isfile = true)*/
1669static bool _skin_data_load(struct wps_data *wps_data, 1669bool skin_data_load(struct wps_data *wps_data,
1670 struct screen *display, 1670 struct screen *display,
1671 const char *buf, 1671 const char *buf,
1672 bool isfile) 1672 bool isfile)
@@ -1815,54 +1815,6 @@ static bool _skin_data_load(struct wps_data *wps_data,
1815 } 1815 }
1816} 1816}
1817 1817
1818void skin_data_load(struct wps_data *wps_data,
1819 struct screen *display,
1820 const char *buf,
1821 bool isfile)
1822{
1823 bool loaded_ok = buf && _skin_data_load(wps_data, display, buf, isfile);
1824 if (!loaded_ok) /* load the hardcoded default */
1825 {
1826 /* set the default wps for the main-screen */
1827 if(display->screen_type == SCREEN_MAIN)
1828 {
1829#if LCD_DEPTH > 1
1830 unload_wps_backdrop();
1831#endif
1832 _skin_data_load(wps_data,
1833 display,
1834#ifdef HAVE_LCD_BITMAP
1835 "%s%?it<%?in<%in. |>%it|%fn>\n"
1836 "%s%?ia<%ia|%?d2<%d2|(root)>>\n"
1837 "%s%?id<%id|%?d1<%d1|(root)>> %?iy<(%iy)|>\n"
1838 "\n"
1839 "%al%pc/%pt%ar[%pp:%pe]\n"
1840 "%fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>\n"
1841 "%pb\n"
1842 "%pm\n", false);
1843#else
1844 "%s%pp/%pe: %?it<%it|%fn> - %?ia<%ia|%d2> - %?id<%id|%d1>\n"
1845 "%pc%?ps<*|/>%pt\n", false);
1846#endif
1847 }
1848#ifdef HAVE_REMOTE_LCD
1849 /* set the default wps for the remote-screen */
1850 else if(display->screen_type == SCREEN_REMOTE)
1851 {
1852#if LCD_REMOTE_DEPTH > 1
1853 unload_remote_wps_backdrop();
1854#endif
1855 _skin_data_load(wps_data,
1856 display,
1857 "%s%?ia<%ia|%?d2<%d2|(root)>>\n"
1858 "%s%?it<%?in<%in. |>%it|%fn>\n"
1859 "%al%pc/%pt%ar[%pp:%pe]\n"
1860 "%fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>\n"
1861 "%pb\n", false);
1862 }
1863#endif
1864 }
1865}
1866 1818
1867int wps_subline_index(struct wps_data *data, int line, int subline) 1819int wps_subline_index(struct wps_data *data, int line, int subline)
1868{ 1820{