diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-01-26 20:14:42 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-01-26 20:14:42 +0000 |
commit | 5629d551d710bd57a1cef129ce5a69b76cbbdd12 (patch) | |
tree | 1196849b9a02ebf39fa5d6c33df1db9334aeead2 /apps/gui | |
parent | 7a73a9cd4e882ebbc37831160ec18d0f251f14bd (diff) | |
download | rockbox-5629d551d710bd57a1cef129ce5a69b76cbbdd12.tar.gz rockbox-5629d551d710bd57a1cef129ce5a69b76cbbdd12.zip |
Accept the last patch FS#10797 with a few changes by me (fixing side effects and adding the new backdrop_hide() to the multi screen api). It changes the hide_bars parameter to mean hide_theme.
This makes plugins show the menu backdrop in their backdrop so that they don't look like crap if you have an sbs and look more integrated. I've test about all plugins and all work fine.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24335 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/backdrop.c | 13 | ||||
-rw-r--r-- | apps/gui/backdrop.h | 4 | ||||
-rw-r--r-- | apps/gui/viewport.c | 6 | ||||
-rw-r--r-- | apps/gui/wps.c | 3 |
4 files changed, 24 insertions, 2 deletions
diff --git a/apps/gui/backdrop.c b/apps/gui/backdrop.c index c220d06493..7e56dcb7db 100644 --- a/apps/gui/backdrop.c +++ b/apps/gui/backdrop.c | |||
@@ -124,6 +124,12 @@ void backdrop_show(enum backdrop_type bdrop) | |||
124 | show_skin_backdrop(); | 124 | show_skin_backdrop(); |
125 | } | 125 | } |
126 | 126 | ||
127 | void backdrop_hide(void) | ||
128 | { | ||
129 | lcd_set_backdrop(NULL); | ||
130 | } | ||
131 | |||
132 | |||
127 | 133 | ||
128 | #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 | 134 | #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 |
129 | 135 | ||
@@ -201,4 +207,11 @@ void remote_backdrop_unload(enum backdrop_type bdrop) | |||
201 | } | 207 | } |
202 | 208 | ||
203 | 209 | ||
210 | void remote_backdrop_hide(void) | ||
211 | { | ||
212 | lcd_remote_set_backdrop(NULL); | ||
213 | } | ||
214 | |||
204 | #endif | 215 | #endif |
216 | |||
217 | |||
diff --git a/apps/gui/backdrop.h b/apps/gui/backdrop.h index b37071b5d4..4083464cee 100644 --- a/apps/gui/backdrop.h +++ b/apps/gui/backdrop.h | |||
@@ -35,6 +35,7 @@ enum backdrop_type { | |||
35 | bool backdrop_load(enum backdrop_type bdrop, const char*); | 35 | bool backdrop_load(enum backdrop_type bdrop, const char*); |
36 | void backdrop_unload(enum backdrop_type bdrop); | 36 | void backdrop_unload(enum backdrop_type bdrop); |
37 | void backdrop_show(enum backdrop_type bdrop); | 37 | void backdrop_show(enum backdrop_type bdrop); |
38 | void backdrop_hide(void); | ||
38 | 39 | ||
39 | #else /* LCD_DEPTH <= 1 || __PCTOOL__ */ | 40 | #else /* LCD_DEPTH <= 1 || __PCTOOL__ */ |
40 | 41 | ||
@@ -52,6 +53,7 @@ static inline void backdrop_show(enum backdrop_type bdrop) | |||
52 | (void)bdrop; | 53 | (void)bdrop; |
53 | } | 54 | } |
54 | 55 | ||
56 | static inline void backdrop_hide(void) {} | ||
55 | #endif | 57 | #endif |
56 | 58 | ||
57 | #if defined(HAVE_REMOTE_LCD) | 59 | #if defined(HAVE_REMOTE_LCD) |
@@ -60,6 +62,7 @@ static inline void backdrop_show(enum backdrop_type bdrop) | |||
60 | bool remote_backdrop_load(enum backdrop_type bdrop,const char* filename); | 62 | bool remote_backdrop_load(enum backdrop_type bdrop,const char* filename); |
61 | void remote_backdrop_unload(enum backdrop_type bdrop); | 63 | void remote_backdrop_unload(enum backdrop_type bdrop); |
62 | void remote_backdrop_show(enum backdrop_type bdrop); | 64 | void remote_backdrop_show(enum backdrop_type bdrop); |
65 | void remote_backdrop_hide(void); | ||
63 | #else | 66 | #else |
64 | static inline | 67 | static inline |
65 | bool remote_backdrop_load(enum backdrop_type bdrop,const char* filename) | 68 | bool remote_backdrop_load(enum backdrop_type bdrop,const char* filename) |
@@ -76,6 +79,7 @@ static inline void remote_backdrop_show(enum backdrop_type bdrop) | |||
76 | { | 79 | { |
77 | (void)bdrop; | 80 | (void)bdrop; |
78 | } | 81 | } |
82 | static inline void remote_backdrop_hide(void) {} | ||
79 | #endif | 83 | #endif |
80 | #endif | 84 | #endif |
81 | 85 | ||
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index 22eccc161f..3c5249cff9 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c | |||
@@ -89,6 +89,8 @@ static void toggle_theme(enum screen_type screen, bool force) | |||
89 | add_event(PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE, false, | 89 | add_event(PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE, false, |
90 | do_sbs_update_callback); | 90 | do_sbs_update_callback); |
91 | 91 | ||
92 | screens[screen].backdrop_show(BACKDROP_MAIN); | ||
93 | |||
92 | /* remove the left overs from the previous screen. | 94 | /* remove the left overs from the previous screen. |
93 | * could cause a tiny flicker. Redo your screen code if that happens */ | 95 | * could cause a tiny flicker. Redo your screen code if that happens */ |
94 | if (!was_enabled[screen] || force) | 96 | if (!was_enabled[screen] || force) |
@@ -142,7 +144,11 @@ static void toggle_theme(enum screen_type screen, bool force) | |||
142 | else | 144 | else |
143 | { | 145 | { |
144 | FOR_NB_SCREENS(i) | 146 | FOR_NB_SCREENS(i) |
147 | { | ||
148 | screens[i].backdrop_hide(); | ||
145 | screens[i].stop_scroll(); | 149 | screens[i].stop_scroll(); |
150 | } | ||
151 | |||
146 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | 152 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) |
147 | remove_event(LCD_EVENT_ACTIVATION, do_sbs_update_callback); | 153 | remove_event(LCD_EVENT_ACTIVATION, do_sbs_update_callback); |
148 | #endif | 154 | #endif |
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 14fb848ebe..a5394981ae 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -611,6 +611,7 @@ static void gwps_enter_wps(void) | |||
611 | vp->bg_pattern = display->get_background(); | 611 | vp->bg_pattern = display->get_background(); |
612 | } | 612 | } |
613 | #endif | 613 | #endif |
614 | display->backdrop_show(BACKDROP_SKIN_WPS); | ||
614 | skin_update(gwps, WPS_REFRESH_ALL); | 615 | skin_update(gwps, WPS_REFRESH_ALL); |
615 | } | 616 | } |
616 | } | 617 | } |
@@ -1180,8 +1181,6 @@ long gui_wps_show(void) | |||
1180 | /* we remove the update delay since it's not very usable in the wps, | 1181 | /* we remove the update delay since it's not very usable in the wps, |
1181 | * e.g. during volume changing or ffwd/rewind */ | 1182 | * e.g. during volume changing or ffwd/rewind */ |
1182 | sb_skin_set_update_delay(0); | 1183 | sb_skin_set_update_delay(0); |
1183 | FOR_NB_SCREENS(i) | ||
1184 | gui_wps[i].display->backdrop_show(BACKDROP_SKIN_WPS); | ||
1185 | wps_sync_data.do_full_update = update = false; | 1184 | wps_sync_data.do_full_update = update = false; |
1186 | gwps_enter_wps(); | 1185 | gwps_enter_wps(); |
1187 | } | 1186 | } |