diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-01-07 07:52:32 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-01-07 07:52:32 +0000 |
commit | f9329e4c9273f1b82aa5dbb36f243546ce55036d (patch) | |
tree | b9904700ec79a7edd0fe54edcd95a44666f32aa5 /apps/gui | |
parent | f56298aee433847c21d5e81027bd6301ef590d13 (diff) | |
download | rockbox-f9329e4c9273f1b82aa5dbb36f243546ce55036d.tar.gz rockbox-f9329e4c9273f1b82aa5dbb36f243546ce55036d.zip |
Fix some wierdness with the debug menus...
Set the current viewport back to NULL after the list is finished drawing, Screens
should be setting it before they start drawing so this probably only effects the debug menus.
Also change how the statusbars are handled there to make things easier. (this change also forces the bars back on (if enabled) in the simple list widget.. hopefully this doesnt cause problems later)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19703 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/bitmap/list.c | 1 | ||||
-rw-r--r-- | apps/gui/list.c | 11 |
2 files changed, 5 insertions, 7 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index 074f72a179..6e1876912e 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c | |||
@@ -280,6 +280,7 @@ void list_draw(struct screen *display, struct gui_synclist *list) | |||
280 | } | 280 | } |
281 | display->set_viewport(parent); | 281 | display->set_viewport(parent); |
282 | display->update_viewport(); | 282 | display->update_viewport(); |
283 | display->set_viewport(NULL); | ||
283 | } | 284 | } |
284 | 285 | ||
285 | 286 | ||
diff --git a/apps/gui/list.c b/apps/gui/list.c index 04bd7e4c3f..2107d3a593 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c | |||
@@ -844,20 +844,16 @@ static char* simplelist_static_getname(int item, | |||
844 | bool simplelist_show_list(struct simplelist_info *info) | 844 | bool simplelist_show_list(struct simplelist_info *info) |
845 | { | 845 | { |
846 | struct gui_synclist lists; | 846 | struct gui_synclist lists; |
847 | struct viewport vp[NB_SCREENS]; | 847 | int action, old_line_count = simplelist_line_count; |
848 | int action, old_line_count = simplelist_line_count,i; | 848 | bool oldbars = viewportmanager_set_statusbar(true); |
849 | char* (*getname)(int item, void * data, char *buffer, size_t buffer_len); | 849 | char* (*getname)(int item, void * data, char *buffer, size_t buffer_len); |
850 | int wrap = LIST_WRAP_UNLESS_HELD; | 850 | int wrap = LIST_WRAP_UNLESS_HELD; |
851 | if (info->get_name) | 851 | if (info->get_name) |
852 | getname = info->get_name; | 852 | getname = info->get_name; |
853 | else | 853 | else |
854 | getname = simplelist_static_getname; | 854 | getname = simplelist_static_getname; |
855 | FOR_NB_SCREENS(i) | ||
856 | { | ||
857 | viewport_set_defaults(&vp[i], i); | ||
858 | } | ||
859 | gui_synclist_init(&lists, getname, info->callback_data, | 855 | gui_synclist_init(&lists, getname, info->callback_data, |
860 | info->scroll_all, info->selection_size, vp); | 856 | info->scroll_all, info->selection_size, NULL); |
861 | 857 | ||
862 | if (info->title) | 858 | if (info->title) |
863 | gui_synclist_set_title(&lists, info->title, NOICON); | 859 | gui_synclist_set_title(&lists, info->title, NOICON); |
@@ -929,6 +925,7 @@ bool simplelist_show_list(struct simplelist_info *info) | |||
929 | return true; | 925 | return true; |
930 | } | 926 | } |
931 | talk_shutup(); | 927 | talk_shutup(); |
928 | viewportmanager_set_statusbar(oldbars); | ||
932 | return false; | 929 | return false; |
933 | } | 930 | } |
934 | 931 | ||