summaryrefslogtreecommitdiffstats
path: root/apps/screens.c
AgeCommit message (Collapse)AuthorFilesLines
2023-10-19Track Info [Playlist] field: Add playlist nameChristian Soffke1-4/+40
For any selected track that is part of a playlist, additional info about the list is now provided in the [Playlist] field of the Track Info screen. 1) Asterisk indicates if playlist has been modified. 2) Playlist filename is visible, unless the current playlist is *not* associated with a file on disk, in which case the following will be shown instead: - (Folder) for unmodified folder playlists. - (Dynamic) for playlists that are neither associated with a playlist file, nor with a folder. Change-Id: I9dcf7cbba4ac2e37b23413180a2b2bf4bbe5ee2a
2023-06-15Track Info: Never return NULL in list item name callbackChristian Soffke1-5/+5
Just for good measure Change-Id: I9dc25b2fd687da2b1fddf31ce1c1ea8895e4399c
2023-06-15Current Track Info: Respond to track changes or finished playlistChristian Soffke1-6/+21
Properly update displayed playlist index and all available metadata for the currently playing track. Also exit screen when playlist has finished to prevent nonsense data from being displayed. Change-Id: Iecc53c0eda5cbd374b51827a25916ee4e2c6456f
2023-04-13Track Info: Show number of tracks being inspectedChristian Soffke1-8/+18
Applies to the database and PictureFlow + fix red 6ca57ec Change-Id: If708851ebdfe075e9d6ea3f2e2dd790cc9deac94
2023-04-13Track Info: Display larger file size and length valuesChristian Soffke1-5/+26
When displaying Track Info for multiple tracks, the value for combined file sizes or length was capped at 2 GiB / ~596h. Limit has been raised by a factor of 1000. Change-Id: I942c64e81864cba3f719c83a24912883fafeb70e
2023-01-10PictureFlow: Add 'Track Info' for tracks or whole albumsChristian Soffke1-0/+6
Context menu gains new option to view metadata for individual tracks or albums. Will display an album's length and total file size. Other fields are displayed only if they are identical across all tracks (except for the album year, which is determined by the highest value encountered). Change-Id: Ibc14cfaf2cb3d91b8d1cfbee05c6261db4975355
2023-01-06plugins: Properties: Add 'Last Modified' for audio filesChristian Soffke1-1/+29
In commit f3358eb, the Properties plugin started using the Track Info screen for audio files, which didn't show when the file was last modified. This adds it back. Change-Id: I3ce519da234a4bcadab1d64b67de0298cada8f6e
2023-01-06browse_id3: Only push activity when called from WPSChristian Soffke1-3/+7
The Properties plugin and playlist viewer have each started using the existing Track Info screen. In both cases, it may not be necessary to push a new activity. Which eliminates the need to perform an additional skin refresh. I've also noticed at least one theme in the wild that assumes ACTIVITY_ID3SCREEN will only ever display info for the currently playing track (as it did previously) and adjusts the skin specifically for that purpose. Change-Id: Ic436d0d4e075a865225839a524387ff2b9058428
2022-12-14wps.c cleanup gui_show_wpsWilliam Wilgus1-1/+1
remove some old cruft move a few things around clean-up flow Change-Id: I138c6cd9e2d58ef526eb686333da413819df725d
2022-12-11Eliminate skin updates in between activitiesChristian Soffke1-1/+1
1) Adds way to pop activity without refreshing the skin at the same time. Activities are sometimes popped in immediate succession, or one activity is popped before another one is pushed right away. This can lead to the UI appearing glitchy, due to an activity only appearing for a split-second, which is especially noticeable with complex skins that change the dimensions of the UI viewport depending on the current activity To fix this, prevent superfluous skin updates * when switching between: - WPS and browser - WPS and Playlist Catalogue - WPS and playlist - WPS and Settings/System/Plugins * when accessing Track Info or when displaying bookmarks using the context menu on the WPS * when switching from QuickScreen to Shortcuts Menu 2) The playlist viewer activity was pushed & popped redundantly by playlist_view. ---- NB: Behavior has remained unchanged in all instances of the code where pop_current_activity() has been replaced by pop_current_activity(ACTIVITY_REFRESH_NOW). Change-Id: I56b517b8c9dba823a9fed3a3f558d7469dcea9fd
2022-11-14replace strlcpy with strmemccpyWilliam Wilgus1-5/+3
replace applicable calls to strlcpy with calls to strmemccpy which null terminates on truncation in theory the strmemccpy calls should be slightly faster since they don't traverse the rest of the source string on truncation but I seriously doubt there is too much of that going on in the code base Change-Id: Ia0251514e36a6242bbf3f03c5e0df123aba60ed2
2022-11-15add memccpy.cWilliam Wilgus1-2/+8
Not sure if this is worth the added bin size yet but I will see where I can use it to try and make it worth it Change-Id: Icc299d3986172ff224a14be48da3bf065d728a66
2022-11-04screen.c remove unused getstringsizeWilliam Wilgus1-6/+4
getstringsize on SEPARATOR was overwritten by another call to getstringsize lang files use position to decide target strings 'RTC' was after targets using different buttons therefore in error gained precedence Change-Id: I40edc6c99140ac81bffd4c47d5e055ebc94ab1b2
2022-10-05gui: Remove "enum list_wrap" from list action functionsAidan MacDonald1-4/+2
Removing the "list_wrap" argument is actually pretty easy. In practice, almost all lists are using LIST_WRAP_UNLESS_HELD behavior so we can make that the default. A couple of lists disable wraparound with LIST_WRAP_OFF; this is now achieved by setting the list "wraparound" flag to false when setting up the list. LIST_WRAP_ON was unused and is of questionable value, so it has been removed entirely. This makes list wraparound behavior a property of the list, controlled solely by the "wraparound" flag. The result is a simpler list API and implementation, without changing the behavior of any lists. Change-Id: Ib55d17519e6d92fc95ae17b84ab0aaf4233bcb5a
2022-05-09Properties plugin: Eliminate redundant Track Info codeChristian Soffke1-0/+3
When opening an audio file from the file browser or database using the Properties plugin, it will now use existing code from the Show Track Info screen for displaying metadata. The menu option has been renamed accordingly. Change-Id: I5a824865b9f980151b91aff3c3c18ec45830a12c
2022-04-17Fix red from 6f5af8e53cAidan MacDonald1-2/+2
Change-Id: I02dbc3e91856eaef081446ca77919e6182a85e1d
2022-04-17Add Codec to Track Info screenChristian Soffke1-0/+9
Change-Id: Ieec0e49d0b5e1ca14fa828a510edf30d548969b2
2022-03-30alarm_menu share setter with settimeWilliam Wilgus1-3/+8
share the time picker with the alarm block the date portion, seconds are ignored Change-Id: Idc6974466772c33248ff532c8f3c62c744ee06d9
2021-12-28Playlist Viewer: Add Track InfoChristian Soffke1-6/+8
Adds a command for showing track info to the Playlist Viewer's context menu, which brings up the same screen used by the WPS for currently playing tracks. Change-Id: I17d99671935934dad565d290a0d6fb3b0dfd8b01
2020-10-26Whitespace cleanup on fb_viewport RewriteWilliam Wilgus1-4/+4
Change-Id: I24aac41c8abecf7b78a44d7f59e842b791be4563
2020-10-26LCD core move buf ptr and address look up function viewport structWilliam Wilgus1-2/+3
I'm currently running up against the limitations of the lcd_draw functions I want these functions to be able to be used on any size buffer not just buffers with a stride matching the underlying device [DONE] allow the framebuffer to be decoupled from the device framebuffer [DONE need examples] allow for some simple blit like transformations [DONE] remove the device framebuffer from the plugin api [DONE}ditto remote framebuffer [DONE] remove _viewport_get_framebuffer you can call struct *vp = lcd_set_viewport(NULL) and vp->buffer->fb_ptr while remote lcds may compile (and work in the sim) its not been tested on targets [FIXED] backdrops need work to be screen agnostic [FIXED] screen statusbar is not being combined into the main viewport correctly yet [FIXED] screen elements are displayed incorrectly after switch to void* [FIXED] core didn't restore proper viewport on splash etc. [NEEDS TESTING] remote lcd garbled data [FIXED] osd lib garbled screen on bmp_part [FIXED] grey_set_vp needs to return old viewport like lcd_set_viewport [FIXED] Viewport update now handles viewports with differing buffers/strides by copying to the main buffer [FIXED] splash on top of WPS leaves old framebuffer data (doesn't redraw) [UPDATE] refined this a bit more to have clear_viewport set the clean bit and have skin_render do its own screen clear scrolling viewports no longer trigger wps refresh also fixed a bug where guisyncyesno was displaying and then disappearing [ADDED!] New LCD macros that allow you to create properly size frame buffers in you desired size without wasting bytes (LCD_ and LCD_REMOTE_) LCD_STRIDE(w, h) same as STRIDE_MAIN LCD_FBSTRIDE(w, h) returns target specific stride for a buffer W x H LCD_NBELEMS(w, h) returns the number of fb_data sized elemenst needed for a buffer W x H LCD_NATIVE_STRIDE(s) conversion between rockbox native vertical and lcd native stride (2bitH) test_viewports.c has an example of usage [FIXED!!] 2bit targets don't respect non-native strides [FIXED] Few define snags Change-Id: I0d04c3834e464eca84a5a715743a297a0cefd0af
2020-07-24[4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.Solomon Peachy1-2/+2
Note: I left behind lcd_bitmap in features.txt, because removing it would require considerable work in the manual and the translations. Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24[3/4] Completely remove HWCODEC supportSolomon Peachy1-8/+1
'swcodec' is now always set (and recording_swcodec for recording-capable units) in feature.txt so the manual and language strings don't need to all be fixed up. Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-24[2/4] get rid of HAVE_LCD_CHARCELLSSolomon Peachy1-4/+0
HAVE_LCD_BITMAP is now redundant. lcd_bitmap is always-on in features.txt so manual and lang strings don't have to change Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
2020-07-24[1/4] Remove SH support and all archos targetsSolomon Peachy1-260/+0
This removes all code specific to SH targets Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2019-08-06Improved reliability of runtime accounting and speaking it.Solomon Peachy1-2/+8
Change-Id: I6f0fb907e0378487cec387a2cfd3a20b9a596c4e
2019-07-20Increase set_time_screen() buffer size for hosted to keep the compiler happy.Frank Gevaerts1-0/+9
The format strings in the snprintf can in theory need 60 characters This will not happen in practice (because seconds are 0..60 and not full-range integers etc.), but -D_FORTIFY_SOURCE will still warn about it, so we use 60 characters for HOSTED to make the compiler happy. Native builds still use 20, which is enough in practice. Change-Id: I22a2bab8134442e531a10bf883f3a369ade0fdc3
2018-12-22Auto-Ranging Time Formatting For Menus (hh:mm:ss:mss)William Wilgus1-3/+3
Unifies time formatting in settings_list.c allows time format to display as HH:MM:SS.MSS or any consecutive combination thereof (hh:mm:ss, mm:ss, mm:ss.mss, ss.mss, hh, mm, ss ,mss) works in INT and TABLE settings with the addition of flag 'F_TIME_SETTING' Time is auto-ranged dependent on value Adds talk_time_intervals to allow time values to be spoken similar to display format: x Hours, x Minutes, x Seconds, x Milliseconds Table lookups merged or removed from recording, clip meter and lcd timeout -String_Choice replaced with TABLE_SETTING or INT_SETTING for these functions as well, cleaned-up cfg_vals that get saved to cfgfile RTL Languages ARE supported Negative values ARE supported Backlight on/off are now Always and Never to share formatter with LCD Timeout Added flag to allow ranged units to be locked to a minimum index Added flag to allow leading zero to be supressed from the largest unit merged talk_time_unit() and talk_time_intervals() optimized time_split() optimized format_time_auto() Backlight time-out list same as original Change-Id: I59027c62d3f2956bd16fdcc1a48b2ac32c084abd
2018-12-15Fix HWCODEC builds.Solomon Peachy1-0/+2
Change-Id: I7abed5dab9b4d0d053c274404dc4dc06864aa060
2018-12-15Fix compile failure due to a merge error in ↵Solomon Peachy1-1/+1
4adad0bc1f508360999de176048f89025ce84b3e Change-Id: I7aa013e99c1f20c4f62299a5fa65dc7db65bf386
2018-12-15FS#6323: Speech for ID3 viewer, playlist catalog and playlist viewerSolomon Peachy1-4/+177
Modified from original ticket, Taken from Igor Poretsky's tree, and further modified by myself to incorporate feedback. Change-Id: Ibc2180e52af76890b1448d23f79386fd0f88f709
2018-12-09Fix possible truncation misc.c->output_dyn_value + use KibytesWilliam Wilgus1-1/+1
output_dyn_value now requires the count for number of units Binary scale now shows Kibibytes instead of kilobytes (g#1742) Fixes output for negative values as well Change-Id: I8aa896860e97d2453fa35069e2dfe1caac60109f
2018-10-18Fix menu warningsWilliam Wilgus1-3/+3
change offending bool return to int warning: cast between incompatible function types from '_Bool (*)(void)' to 'int (*)(void)' [-Wcast-function-type] forgot to remove -- typedef int (*menu_function)(void); Change-Id: Ie4c8d3ddb0fb7843c4ec584203350d658d6bee3e
2013-12-15Fix more reds.Thomas Martitz1-0/+1
Change-Id: Ie62386a8f3e9986381f96eb83abb69bfc42b42e1
2013-12-14scroll_engine: Rename scroll_stop* functions to be more consistent with the ↵Thomas Martitz1-2/+2
lcd api. Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
2012-04-29Make rbcodec/dsp includes more specific.Michael Sevakis1-4/+0
Change-Id: Idb6af40df26f5b8499a40e8b98602261ef227044
2012-03-03Add a %cs(current screen) state for the "Track Info" screenOsborne Jacobs1-2/+13
Added a new state (current activity) to the %cs tag for the Track Info screen. This will allow the Track Info screen to be detectable when skinning using sbs files. Change-Id: I9319ebce2f8e64b0c974f4a6e3b44f9accee32c5 Reviewed-on: http://gerrit.rockbox.org/170 Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2011-12-31Fix FS#7631 : Archos V2 and FM Recorder charging screen problemsBoris Gjenero1-4/+12
ATA power is off in the charging screen to avoid problems when the battery is deeply discharged. Without ATA power, Archos FM and V2 Recorders measure battery voltage as 0V, leading to an unwanted low battery shutdown. This change delays powermgmt_init() on those targets until after ATA power is turned on by storage_init(). The charging screen displays input current, so there is some visible feedback on charging progress. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31484 a1c6a512-1295-4272-9138-f99709370657
2011-10-15Missed two spots.Björn Stenberg1-1/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30757 a1c6a512-1295-4272-9138-f99709370657
2011-10-15Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg1-1/+0
own loop variable. This removes the need to declare this variable in the outer scope. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-10-07Fix exit/return behavior in the id3 info screen.Fixes returning immediately ↵Thomas Martitz1-3/+6
on touchscreen. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30727 a1c6a512-1295-4272-9138-f99709370657
2011-07-23imx233/fuze+: huge reworkAmaury Pouly1-1/+1
- enable MMU -rework lcd frame buffer - add rtc/adc/power stubs (or not) - fix a few MMC related defines (hopefully) - implement cache handling for DMA - more SD work - add keymap (based on clip) - add virtual buttons - update linker scripts - big step toward apps actually compiling git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30200 a1c6a512-1295-4272-9138-f99709370657
2011-04-04Rework parts of the replaygain code to be able to differentiate between 0.00 ↵Andree Buschmann1-4/+4
dB set intentionally and having no replaygain information at all. Bump codec api. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29679 a1c6a512-1295-4272-9138-f99709370657
2011-02-24FS#11964. Rework replaygain handling to save metadata buffer and binsize. ↵Andree Buschmann1-2/+5
Remove string representation of replaygain and use a dedicated ftoa implementation for WPS/screen info. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29388 a1c6a512-1295-4272-9138-f99709370657
2011-02-20FS#11939: Simplify talk_time_unit().Andree Buschmann1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29347 a1c6a512-1295-4272-9138-f99709370657
2011-02-15Undo unwanted commit r29310.Andree Buschmann1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29311 a1c6a512-1295-4272-9138-f99709370657
2011-02-15All AAC-HE files will double the frame sample count, not only AAC-HE files ↵Andree Buschmann1-1/+1
with SBR upsampling. This change fixes issues with some m4a files reported in the forums. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29310 a1c6a512-1295-4272-9138-f99709370657
2011-02-13Explicitly say 'minutes' when speaking the runtime, fixes FS#11934.Andree Buschmann1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29299 a1c6a512-1295-4272-9138-f99709370657
2010-12-24Add "file size" to the track information screen of WPS.Mustapha Senhaji1-0/+5
Reuse "LANG_FILE_SIZE" from recording settings, with now a unified "LANG_FILESIZE" string. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28886 a1c6a512-1295-4272-9138-f99709370657
2010-05-30fix red. no replaygain on hwcodecJonathan Gordon1-0/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26410 a1c6a512-1295-4272-9138-f99709370657