rockbox/apps/gui
William Wilgus 58462184d1 folder_select.c partial rewrite -- remove static, add full notification
| with some code refactoring we can eliminate the static
  char buffer in get_full_path()

  I'm guessing making the functions recursive prompted the static buffer
  I don't see any reason we can't just pass the same buffer
|
  During tested I noted failure after buffer was full
   -- splash added for buffer full notification

  added some logic to not add partial entries and try to find a
| selected item that will fit in the remaing buffer
------------------------------------------------------------------------

While looking through the source I noticed a few potential
pitfalls with the current code.

Namely the stack allocated temporary buffer
sized to setting_len.

I also noted the rigid vect[32] with the timeless --
/* 32 separate folders should be Enough For Everybody(TM) */
and decided to make it a bit more robust

The saved items are hashed with crc32 on all the paths
and a hashed_len is kept to aid in the buffer full message before the
user actually goes to save the changes
(assuming they even get the message)

In the old code, buffer might be the same since it ran out of
space and didn't get their later selections

the hashed_len could easily be turned into a way to get a needed buffer
size as well for someone in the future just pass a really large maxlen

I made get_full_path non recursive since it liked to blow the stack
while embedded in all the other recursive calls making it a pain to debug
(the real reason the buffer was static?)
traverse first from the current folder to root mutating the
parent pointers to point at the previous child
next traverse back to the folder unmutating & taking names on the way

Folder depth is now uint16 65535 levels is probably excessive
children_count is also uint16 as well
I made the first folders below root '/' stay below root
instead of shifting since the horizontal real estate is limited

slightly smaller than it began but hopefully faster & more reliable

Change-Id: I348f61baf865cccdeacddfd9d50641a882e890fc
2021-11-10 02:34:06 -05:00
..
bitmap touchscreen: fix smooth scrolling in lists 2021-08-22 14:57:54 +00:00
skin_engine skin engine - fail gracefully when %Sx is used on non lang id string 2021-10-13 18:02:19 -04:00
backdrop.c really the last of the red this time 2010-01-29 08:39:08 +00:00
backdrop.h fix the last of the red... note to self, fix backdrop.h! 2010-01-29 08:25:24 +00:00
color_picker.c LCD core move buf ptr and address look up function viewport struct 2020-10-26 12:28:48 -04:00
color_picker.h color_picker: a bit of rework for color_picker. 2010-02-11 14:18:31 +00:00
folder_select.c folder_select.c partial rewrite -- remove static, add full notification 2021-11-10 02:34:06 -05:00
folder_select.h New GUI browser to select one (or more) folders. 2012-07-30 21:20:51 +02:00
icon.c icon.c bug fix handle read errors 2021-08-15 11:27:30 +00:00
icon.h [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
line.c [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
line.h lcd-24bit: Introduce a 24-bit mid-level LCD driver 2014-06-21 00:15:53 +02:00
list.c Have ACTION_TREE_ROOT_INIT cause ACTION_STD_MENU 2021-10-30 01:20:35 +02:00
list.h touchscreen: fix smooth scrolling in lists 2021-08-22 14:57:54 +00:00
mask_select.c mask_select guard against null pointers 2021-08-03 11:00:59 +00:00
mask_select.h Selective Backlight/Advanced Softlock - Selective actions based on context 2017-01-17 23:06:17 +01:00
option_select.c whitespace fixes 2021-10-21 22:42:01 +02:00
option_select.h New port: FiiO M3K on bare metal 2021-03-28 00:01:37 +00:00
pitchscreen.c RFC: Fix a couple more dangling stack-allocated viewports 2021-07-07 15:19:43 +00:00
pitchscreen.h Fix red in bootloaders 2009-07-11 17:16:23 +00:00
quickscreen.c QuickScreen: Update status bar after changing volume 2021-04-04 00:14:37 +02:00
quickscreen.h Shortcuts.c -- Update 2021-03-07 10:07:49 -05:00
scrollbar.c [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
scrollbar.h [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
splash.c Whitespace cleanup on fb_viewport Rewrite 2020-10-26 12:38:22 -04:00
splash.h Move some gcc extensions to new gcc_extensions.h header 2010-07-25 14:44:29 +00:00
statusbar-skinned.c Document intentional fallthroughs + fix harmless unintended ones 2021-08-04 18:59:46 +00:00
statusbar-skinned.h [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
statusbar.c Battery Icon, Remove Hardcoded Overall Width 2021-03-03 03:11:02 +00:00
statusbar.h statusbar: Make statusbar height equal SYSFONT_HEIGHT 2020-10-26 19:52:40 +00:00
usb_screen.c LCD core move buf ptr and address look up function viewport struct 2020-10-26 12:28:48 -04:00
usb_screen.h Fix warning on USB_NONE targets 2010-10-14 12:29:19 +00:00
viewport.c Whitespace cleanup on fb_viewport Rewrite 2020-10-26 12:38:22 -04:00
viewport.h Whitespace cleanup on fb_viewport Rewrite 2020-10-26 12:38:22 -04:00
wps.c Drop HAVE_RTC_RAM 2021-08-15 20:41:58 +01:00
wps.h Add more INIT_ATTR and add config.h includes to header files with INIT_ATTR. 2011-12-19 20:12:52 +00:00
yesno.c bugfix: redraw yes/no screen after a full skin update 2021-08-29 21:15:34 +01:00
yesno.h Pull yesno_pop out of the radio code as it is a nice simple resuasble yesno api worth reusing 2011-07-21 06:40:01 +00:00