summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-10-20 23:29:13 +0000
committerThomas Martitz <kugel@rockbox.org>2009-10-20 23:29:13 +0000
commit3ddbe63ff50dbf882e7c1bd4a2b23bdf8713765e (patch)
tree0a77f4dd85391caed7ea9421c0fc034c866b6655 /apps
parent8f11075f8556bfefd06da297e2eb014e45905abf (diff)
downloadrockbox-3ddbe63ff50dbf882e7c1bd4a2b23bdf8713765e.tar.gz
rockbox-3ddbe63ff50dbf882e7c1bd4a2b23bdf8713765e.zip
Remove all update event callbacks if the custom statusbar is unused.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23306 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/statusbar-skinned.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c
index 7b2aae81f5..9756401ccb 100644
--- a/apps/gui/statusbar-skinned.c
+++ b/apps/gui/statusbar-skinned.c
@@ -118,13 +118,19 @@ void sb_skin_set_state(int state, enum screen_type screen)
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
add_event(LCD_EVENT_ACTIVATION, false, do_update_callback);
#endif
+ add_event(PLAYBACK_EVENT_TRACK_CHANGE, false,
+ do_update_callback);
+ add_event(PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE, false,
+ do_update_callback);
add_event(GUI_EVENT_ACTIONUPDATE, false, sb_skin_update);
}
else
{
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
- add_event(LCD_EVENT_ACTIVATION, false, do_update_callback);
+ remove_event(LCD_EVENT_ACTIVATION, do_update_callback);
#endif
+ remove_event(PLAYBACK_EVENT_TRACK_CHANGE, do_update_callback);
+ remove_event(PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE, do_update_callback);
remove_event(GUI_EVENT_ACTIONUPDATE, sb_skin_update);
}
@@ -182,6 +188,4 @@ void sb_skin_init(void)
sb_skin_sync_data.statusbars = VP_SB_HIDE_ALL;
sb_skin[i].sync_data = &sb_skin_sync_data;
}
- add_event(PLAYBACK_EVENT_TRACK_CHANGE, false, do_update_callback);
- add_event(PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE, false, do_update_callback);
}