Commit graph

39 commits

Author SHA1 Message Date
Christian Soffke
b321a719d3 option_select & time_menu : Fix unbalanced push/pop activity
Change-Id: Icabbabb16b2f173168a441af474ee8403b908dd4
2022-12-30 10:35:50 -05:00
William Wilgus
c85a4f1fa4 menus remove reserved 'param' parameter
-- missed the plugin menu --

Change-Id: Iac2c9b0b8212ab5f3ac2ef90e1ac2723d212f86c
2022-12-17 04:24:37 -05:00
William Wilgus
6b87bfadff wps.c cleanup gui_show_wps
remove some old cruft move a few things around clean-up flow

Change-Id: I138c6cd9e2d58ef526eb686333da413819df725d
2022-12-14 22:35:33 -05:00
Christian Soffke
dfd9c10589 Eliminate skin updates in between activities
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-12-11 11:50:33 +01:00
William Wilgus
43830d0128 alarm_menu share setter with settime
share the time picker with the alarm

block the date portion, seconds are ignored

Change-Id: Idc6974466772c33248ff532c8f3c62c744ee06d9
2022-03-30 09:05:28 -04:00
Wolfram Sang
95dfc489b5 sync clock with RDS time
Tested with my SansaClip+. I don't think this will need extra battery
but let me know if I am wrong.

Change-Id: I287dae134113e0f8a138af68f5087b8ea45b0f4c
2022-02-07 22:04:10 +01:00
William Wilgus
3237ae4a4f LCD core move buf ptr and address look up function viewport struct
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-10-26 12:28:48 -04:00
Solomon Peachy
092c340a20 [1/4] Remove SH support and all archos targets
This removes all code specific to SH targets

Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-24 21:20:13 +00:00
William Wilgus
c39f95465b do_menu pass internal synclist reference to callback
keep running into the rigid nature of do_menu
it isn't too bad when you don't need voice but once
you do the fun awaits

do_menu likes to talk on menu enter which is in a loop when you use do_menu
I would like to move the processing to the callback
TOO BAD you only get an action and the menu_item_ex struct
you sent it when calling the function

Change-Id: Iaefd0cc133435d675b7dd27a558c504d6ccb327a
2020-07-19 22:10:26 +00:00
Sebastian Leonhardt
1c095a1323 YH-820: prohibit to change time/date on some hardware versions
This patch will autodetect these players, where setting the time/date
would leave the player in an unusable state.

Change-Id: I0579610ce7c10152ace27bb9c06cf6cb2aab8052
2019-02-07 23:06:54 +01:00
William Wilgus
dd40c46d50 Fix menu warnings
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
2018-10-18 00:06:31 +02:00
Marcin Bukat
fbaa97496f Agptek Rocker: Implement RTC support
Add define in config file to enable RTC support in rockbox,
Fix time_menu.c to include radio.h only when tuner is present
Implement time setting function on linux (was empty stub)

Not tested.

Change-Id: I40e6c4a6c1b66ada9cf4e698e502e221d0fc44df
2018-06-12 10:31:15 +02:00
Thomas Martitz
4978094480 lcd-common: Remove support for custom line heights from viewport.
Since scrolling is now pixel-based this is not necessary anymore. custom line
height is handled by put_line() but can also possible to implement with
lcd_puts_scroll_func().

Change-Id: Iee9b12bf99afac93d95d2a1a6f5d5b4db237b21c
2014-01-07 14:13:48 +01:00
Nick Peskett
2ecaca91f0 New General Settings submenu: Startup/Shutdown
A dedicated submenu for items which are run at startup, or initiate a shutdown.

Currently containing: Start Screen, Idle Poweroff, Sleep Timer & Start Sleep Timer on Boot.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31435 a1c6a512-1295-4272-9138-f99709370657
2011-12-26 08:26:38 +00:00
Jonathan Gordon
29b1ba3445 shortcuts: talk the time and configure the sleep timeout
Use "type: time" and "data: talk" to have the time voiced when the shortcut is run.
use "type: time" and "data: sleep X" where X is the number of minutes to run the sleep timer for (0 means disable)
the name field is required

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31178 a1c6a512-1295-4272-9138-f99709370657
2011-12-08 10:23:46 +00:00
Thomas Martitz
93c6c79e8d Better fix for FS#12337. Use 0 to make the line height calculated from the font height, as before r30773.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30850 a1c6a512-1295-4272-9138-f99709370657
2011-10-29 15:16:02 +00:00
Thomas Martitz
5c509d17db Fix buttonbar and line padding in time&date screen.
The time&date screen uses a custom parent for do_menu(), and doesn't
account for the buttonbar and list line height. Introduce
gui_synclist_set_viewport_defaults() to set those for viewports that are
going to be list parents and use that so that time&date screen doesn't need
to know about buttonbar/line padding.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30824 a1c6a512-1295-4272-9138-f99709370657
2011-10-22 10:09:23 +00:00
Thomas Martitz
e347146b62 Sleep timer options: persistent duration and start on boot.
This makes the sleep timer persistent, so that the duration is remembered
across reboots. Additionally, it adds a setting to automatically apply
it at boot.

Flyspray: FS#10849
Author: Nick Peskett

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30777 a1c6a512-1295-4272-9138-f99709370657
2011-10-17 18:57:38 +00:00
Björn Stenberg
0942e2a0f7 Changed the FOR_NB_SCREENS macro to always be a for loop that declares its 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-15 19:35:02 +00:00
Michael Hohmuth
5c6fe5da9c Properly export sleep_timer_call from main_menu.c in exported_menus.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30292 a1c6a512-1295-4272-9138-f99709370657
2011-08-13 22:55:04 +00:00
Jonathan Gordon
835683b442 %cs (current screen) changes:
* Every top level menu item now has a different screen number
* Playlist viewer and Playlist Catalogue browsers no longer share the same number

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30261 a1c6a512-1295-4272-9138-f99709370657
2011-08-07 08:39:56 +00:00
Bertrik Sikken
5565a28c7d Remove some redundant #include's
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27183 a1c6a512-1295-4272-9138-f99709370657
2010-06-29 20:13:22 +00:00
Thomas Martitz
50a6ca39ad Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:04:40 +00:00
Teruaki Kawashima
93f9e7cbfb fix text scrolling handling in do_menu, set_time_screen and time_screen.
Don't scroll text in time_screen(). the lines will be redrawn before scrolling statrs, so they don't scroll anyway.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24591 a1c6a512-1295-4272-9138-f99709370657
2010-02-11 10:41:06 +00:00
Teruaki Kawashima
00d97d77e8 time menu: stop scrolling before leave the screen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24583 a1c6a512-1295-4272-9138-f99709370657
2010-02-10 15:06:03 +00:00
Bertrik Sikken
6fef14bd16 Set svn:keywords property on .c and .h files that didn't already have it. Correct svn:executable property on some files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24165 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 14:28:09 +00:00
Teruaki Kawashima
a404e9ae24 Fix time display in time menu when time is not valid.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23421 a1c6a512-1295-4272-9138-f99709370657
2009-10-30 14:34:13 +00:00
Tomer Shalev
d5b076b64a RTL: Cosmetic changes, no functional change - Rename constants
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23117 a1c6a512-1295-4272-9138-f99709370657
2009-10-11 20:15:22 +00:00
Thomas Martitz
a79dc87761 Add a center flag, next to the rtl flag, for viewports. That results in any text being drawn centered. It overrides the RTL flag if set.
Simplify splashes and time menu by using it.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23105 a1c6a512-1295-4272-9138-f99709370657
2009-10-11 12:21:27 +00:00
Nils Wallménius
46943ad40c Avoid more useless string copys and make some random cleanups
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23092 a1c6a512-1295-4272-9138-f99709370657
2009-10-11 08:45:47 +00:00
Tomer Shalev
a1dfe6441d Use helper function vp_puts_center() in time_menu.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22979 a1c6a512-1295-4272-9138-f99709370657
2009-10-06 08:17:36 +00:00
Teruaki Kawashima
b944901354 Change height calculation of viewport for time and date menu so that it doesn't break statusbar.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22437 a1c6a512-1295-4272-9138-f99709370657
2009-08-20 13:36:19 +00:00
Alexander Levin
8b5d32f556 Correct the slight misalignment of the clock (FS#10334 by Andre Lupa)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21489 a1c6a512-1295-4272-9138-f99709370657
2009-06-24 13:07:46 +00:00
Bertrik Sikken
30a2713b6e Clean up some more #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20243 a1c6a512-1295-4272-9138-f99709370657
2009-03-08 18:37:32 +00:00
Jonathan Gordon
e385ee18ce Decouple the statusbar drawing from the rest of the screen drawing. it is not drawn roughly 4x per second automatically.
viewport_Set_defaults() will setup the given viewport with the correct "full screen" dimensions (so start at 0,0 if statusbars are disabled or 0,8 if they are enabled.)
All screens should keep the statusbar enabled, but if you really want to ignore the user setting you can disbaled it with viewportmanager_set_statusbar(false).

This commit also includes some menu/list viewport cleanups from kugel in FS#9603


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19622 a1c6a512-1295-4272-9138-f99709370657
2008-12-31 05:59:26 +00:00
Jonathan Gordon
6c65b357bc fix FS#9569 - exiting the time&date screen goes to the wrong screen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19295 a1c6a512-1295-4272-9138-f99709370657
2008-12-02 00:03:34 +00:00
Bertrik Sikken
e5bf5beaee Static police.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19291 a1c6a512-1295-4272-9138-f99709370657
2008-12-01 18:51:43 +00:00
Jonathan Gordon
2d17541895 fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19283 a1c6a512-1295-4272-9138-f99709370657
2008-12-01 09:38:03 +00:00
Jonathan Gordon
c7fec13fd8 FS#9173 - move all time/clock related settings in the menus into system > "time & date" (this includes sleep timer, alarm settings)
The time/date dispaly has been moved out of the "rockbox info" screen and into this screen also (only displayed if there is at least 3 lines of text on the screen though)
The time/date is talked in this screen by pressing the usual context-menu button (usually long-select)

Targets without a RTC are not changed (i.e sleep timer isnt moved)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19282 a1c6a512-1295-4272-9138-f99709370657
2008-12-01 09:28:14 +00:00