Commit graph

1760 commits

Author SHA1 Message Date
Cástor Muñoz
d20185ac96 iPod Classic: reads HDD S.M.A.R.T. data
Adds ata_read_smart() function to storage ATA driver, current
SMART data can be displayed and optionally written to hard
disk using System->Debug menu.

Change-Id: Ie8817bb311d5d956df2f0fbfaf554e2d53e89a93
2015-10-07 06:15:04 +02:00
Amaury Pouly
dc127f213c Clarify usb_powered() and fix some code.
Either by mistake or because its meaning changed, usb_powered() doesn't mean
what the name suggest, so clarify its meaning by renaming it to usb_powered_only.
So use of usb_powered() are replaced by usb_inserted() when it makes more sense.

Change-Id: I112887e2d8560e84587bee5f55c826dde8c806d8
Reviewed-on: http://gerrit.rockbox.org/1097
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2015-01-08 16:45:32 +01:00
Thomas Jarosch
1ff5fd4d6b Fix broken buflib_handle check in backdrop settings loader
The logic was messed up and always evaluated to true
if buflib_handle is non-zero.

Thanks to JdGordon for verifying the change.

cppcheck reported:
[rockbox/apps/gui/skin_engine/skin_backdrops.c:262]: (warning) Comparison of a boolean expression with an integer other than 0 or 1.

Change-Id: Ib52a73e0a6a2017a631e2dec19b638a2974dab83
2014-12-20 12:33:26 +01:00
Szymon Dziok
4c6939fc3d Correct some file permissions.
Change-Id: I4a092a19d6a9c66dfeb2777c9655aa4b19d11e16
2014-09-08 16:04:39 +02:00
Michael Sevakis
29f5385263 Fix up some more red
find_first_set_bit() becomes a small inline on ARMv5+ and checkwps now gets
made with -std=gnu99 (it eats all the GCCOPTS) like the rest of things.

Change-Id: Ie6039b17fec057a3dcb0f453d8fd5efac984df89
2014-08-05 21:32:13 -04:00
Chiwen Chang
9fb65294fb add supports for x,y value in percentage to several tags.
including
BAR_PARAMS, %xl, %dr, %T,%St, %xl and %Cl

Change-Id: I0811ebfff5f83085481dcbf08f97b7223f677bfe
Reviewed-on: http://gerrit.rockbox.org/900
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2014-07-21 04:54:53 +02:00
Jonathan Gordon
7b377d29fb skin_engine: kill scrolling if the buffer moves
I have a suspicion that if there is any scrolling skin lines when
the buflib buffer moves it will cause the lcd code to crash.

This *hopefully* explains the random skin related crashed which
have been reported.

Change-Id: I04ee58292e1cea7c77ef9737b0641192f4f7e4ba
Reviewed-on: http://gerrit.rockbox.org/877
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2014-06-29 11:48:25 +02:00
Thomas Martitz
a1842c04f9 lcd-24bit: Introduce a 24-bit mid-level LCD driver
With LCD driver all calculation will be performed on RGB888 and the hardware/OS
can display from our 24bit framebuffer.

It is not yet as performance optimized as the existing drivers but should be
good enough.The vast number of small changes is due to the fact that
fb_data can be a struct type now, while most of the code expected a scalar type.

lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit
it enforces the generic C code.

All plugins are ported over. Except for rockpaint. It uses so much memory that
it wouldnt fit into the 512k plugin buffer anymore (patches welcome).

Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754
2014-06-21 00:15:53 +02:00
Jonathan Gordon
6e701d3232 fix indenting, editor went nuts
Change-Id: Ibe363e5c75260f50c6c6c6fc58a2758a7902ffc3
2014-06-02 22:01:36 +10:00
Jonathan Gordon
e417036f60 skin_engine: Don't double free buflib handles shared by skin images
Change-Id: I4158fb7dae664a746141f458c08bdcb84e148041
2014-06-02 21:26:22 +10:00
Jonathan Gordon
8fb0bbcc20 Also make sure progressbars don't tihnk their images are loaded
Change-Id: I83bb8e246e4858396ca0b5d0d90fbd2d08a88c1e
2014-05-18 20:58:00 +10:00
Jonathan Gordon
62d357b601 fix skin buffer crashes, img's are not loaded initialy
Change-Id: I32b5d5e446f5ae9340be2bd47841b06a5dbabeec
2014-05-18 20:47:32 +10:00
Jonathan Gordon
01cbb795e9 don't load the same bmp image more than once in a skin
Change-Id: Ie38146a80bb356f40810f017c262b81edac69688
2014-05-14 19:41:55 +10:00
Thomas Martitz
532b8141ab skin_engine: Make %Vs affect the whole line.
Previously %Vs styles only took effect upon the first character of text, i.e.
on the right if the line is %arXXX. Now the style is applied for the whole
line width.

Fixes FS#12973.

Change-Id: I95f2cc76a90bfc0779e5a667d5bfa54c33896c89
2014-04-18 13:27:25 +02:00
Thomas Martitz
ea9621c018 Fix build reds caused by typos.
Change-Id: I71cdca3b6e73e29d487e0c6d02a69a31dcf3e6bf
2014-03-18 12:31:09 +01:00
Thomas Martitz
6f2726e79a usb screen: Stop scrolling the entire display.
It's not easy for the originating screen to perform cleanup in case of USB
because the usb screen is invoked indirectly via default_event_handler(). To
avoid stale scrolling lines perform the cleanup in the usb screen itself.

Side effect should be no worse than scrolling lines to restart in SBSes that
show during USB.

Change-Id: I9aa491b3d4b649c0b3be70048ebcb9d817c0356c
2014-03-18 12:24:44 +01:00
Thomas Martitz
395cdc5945 quickscreen: return true on USB connection.
This is consistent with other screens (pitch, id3) on the WPS and in other
places.

Change-Id: Iafae52507867ff9815a60cf44faaf09a29c55091
2014-03-18 12:24:16 +01:00
Thomas Martitz
470989bd70 events: Rework event subsystem (add_event, send_event) to be more versatile.
add_event_ex is added that takes an extra user_data pointer. This pointer is
passed to the callback (add_event and add_event_ex have slightly different
callbacks types). All callbacks also get the event id passed. Events added
with add_event_ex must be removed with remove_event_ex because the user_data
pointer must match in addition to the callback pointer.

On the other add_event is simplified to omit the oneshort parameter which
was almost always false (still there with add_event_ex).

As a side effect the ata_idle_notify callbacks are changed as well, they
do not take a data parameter anymore which was always NULL anyway.

This commit also adds some documentation to events.h

Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
2014-03-14 23:36:30 +01:00
Thomas Martitz
50f0dd80d6 ab_repeat: Move GUI bits to the skin engine. This allows ab_repeat to be compiled headless.
Change-Id: I4fa3b8ef7139313891ca70df11f7f17c5df38cb7
2014-03-10 22:55:26 +01:00
Michael Sevakis
31b7122867 Implement time-based resume and playback start.
This complements offset-based resume and playback start funcionality.
The implementation is global on both HWCODEC and SWCODEC.

Basically, if either the specified elapsed or offset are non-zero,
it indicates a mid-track resume.

To resume by time only, set elapsed to nonzero and offset to zero.
To resume by offset only, set offset to nonzero and elapsed to zero.

Which one the codec uses and which has priority is up to the codec;
however, using an elapsed time covers more cases:

* Codecs not able to use an offset such as VGM or other atomic
formats

* Starting playback at a nonzero elapsed time from a source that
contains no offset, such as a cuesheet

The change re-versions pretty much everything from tagcache to nvram.

Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38
Reviewed-on: http://gerrit.rockbox.org/516
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2014-03-10 04:12:30 +01:00
Thomas Martitz
00434be0f1 Fix greyscale and mono builds.
Change-Id: I511376eb42d1109dbe10d4fc5aa849b21d9f7582
2014-03-03 16:34:36 +01:00
Thomas Martitz
05a67d021c Touchscreen: Show a line separator in lists.
This patch adds a configurable line separator between list items, very
similar to lists in Android. Additionally, below the list item there is a
thicker line. It can be disabled in the settings. Its color can
be configured as well.

Remote and monochrome displays are explicitly unsupported. If there is desire
this can be changed but it doesn't seem useful to me.

Change-Id: I005313b0d8f5ecd15864bf20e66ea4e3390d8b7d
2014-03-03 15:14:16 +01:00
Thomas Martitz
ee28a706d4 Fix regression introduced by eec89a9.
The icon pixel position must be calculated before y is modified.

Change-Id: I16947dd8862683530dd7c5f00cfa7cf8d9636e61
2014-03-03 15:14:07 +01:00
Thomas Martitz
3ae07d48a2 Fix FS#12951: The icons could be a pixel to far down.
Since eec89a9 icons have been centered using same calculation as for fonts.
In edge cases this is visually different from before and didn't align
well to the font's baseline. Revert to the old calculation just for centering
icons to fix.

A proper aligorithm would take the baseline into account but this has
worked sufficiently well for us (fix this if needed)

Change-Id: I86593529b16cd28ae4552641e216e73795f2450c
2014-03-03 11:20:13 +01:00
Thomas Martitz
8142c68bd2 Fix red on monochrome.
Change-Id: Ice40c81d0d07f7ec2014697e4de446dcb956afe8
2014-01-22 17:31:24 +01:00
Thomas Martitz
6cb11764e0 skin_engine/backdrops: Have to reload default backdrops from setting when it changed.
When skins use the default backdrop (via %X(-) or no %X at all) and the setting
changes it needs to be reloaded, otherwise when changing themes the new theme
could show the backdrop from the previous theme. The same needs to be
done when re-selecting the same theme after USB because the backdrop file was
potentially overwritten.

Fixes FS#12892 and FS#12942.

Change-Id: Ic2d20740cc385fa99667ce8a71507dbda2efceaf
2014-01-22 16:58:58 +01:00
Thomas Martitz
47f648fd92 Fix Player warning.
Change-Id: I43989c92935710b36b68891a637db2e2cafb0401
2014-01-16 00:44:06 +01:00
Thomas Martitz
aa4c2a53f3 usb screen: Crop logo to the UI viewport dimensions.
If the UI viewport is too small only the most top/left parts of the logo will
be displayed. This goes one step further than bac85f2.

Change-Id: I832b0e787e57e3b102a9c097cf1cccd7d4ad92d9
2014-01-16 00:28:18 +01:00
Thomas Martitz
a6483344f6 usb screen: Push the usb screen onto the activity stack. This enables %cs tag support for it.
Change-Id: Icecb72007aa3aba501c702e1aa65c801fcbc3857
2014-01-16 00:26:45 +01:00
Thomas Martitz
a969e1f456 usb: Do not disable themes in the USB screen.
Fonts can now be assumed (by the code) to be available during USB. Make
use of this fact in the USB screen and don't disable the skins.

Change-Id: I525359aae16660604e8fe89addc0bdf97a3fafc1
2014-01-15 23:37:39 +01:00
Thomas Martitz
2eb873cea6 skins: Update SBS when changing activities.
When changing activities (those that are indicated via %cs skin tag), the sbs
needs to be updated, so that the UI viewport can be applied before that
activity draws its UI.

Fixes FS#12804. I hope this commit doesn't have bad side effects.

Change-Id: If45654e356749f5f27991430dbd1da6f23e6f802
2014-01-15 18:57:46 +01:00
Szymon Dziok
bac85f2cb4 Always check, if the USB logo for remotes overrides their physical size.
This fixes displaying of the main USB screen on m:robe 100. A remote for
this particular target has no native remote USB logo and it uses a larger
one. However it's a good idea to perform this check always IMHO.

Change-Id: I56ceb2316c551269be011b60271d8da11cb8b073
2014-01-13 21:46:57 +01:00
PurlingNayuki
f0bec023d9 Implement volume limiter feature
Add a "volume limit" parameter to the configuration file. The maximum
value of volume setting in sound menu will be limited to the same as
volume limit. Also each time when setvol() is excuted, Rockbox will
check if the global_settings.volume value larger than
global_settings.volume_limit. If larger, take the value of volume_limit
instead. The volume_limit argument shares the same maximum and minimum values
with volume argument, while taking the maximum volume as its default value.

Change-Id: I8ca9bc6ea6e617b48fc346aae5f2a0a1d259ae36
Reviewed-on: http://gerrit.rockbox.org/697
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2014-01-13 11:32:03 +01:00
Thomas Martitz
4e1c690ea7 skin_engine: Stricter checking for x, y, width, height for bar tags.
Every theme that doesn't parse anymore now has broken values. I hope it's not
too many of them.

Change-Id: I6f52e55dc9197d0919f854240723a88f99c0b7da
2014-01-12 23:13:45 +01:00
Thomas Martitz
09e655f89d put_line(): Add another check against possible buffer overflow (see 193911a).
Change-Id: Idc6637cc42afe612375dab3acac8495278f68f0a
2014-01-12 19:19:05 +01:00
Thomas Martitz
193911af76 put_line(): Fix buffer overflow.
At the end of the format string it wrote a last byte (or inline string) past
the end of the lcd boundaries, potentially overwriting unrelated memory. It
now makes sure it won't exceed the viewport's width.

Change-Id: Id4cfce918e8b070b7fc3c7d33f389f7a171963ff
2014-01-12 17:37:16 +01:00
Thomas Martitz
3ae73433ab skin_engine: New param "noborder" for the bar tags.
By specifying this param the bar will not have a border/box. Instead
the inner part that fills up is maximized on the bar area.

Note that this only affects bars using foreground and background colors,
not those constructed with images.

Change-Id: Ib8dd49ecbaf9e16b96de840f5f365871b73d4fa4
2014-01-12 15:22:29 +01:00
Thomas Martitz
6e882b43b6 put_line(): Do not lock up if the scroll engine runs out of lines.
Allocate MAX_LINES+1 because at the time get_line_desc() is called
the scroll engine did not yet determine that it ran out of lines
(because puts_scroll_func() wasn't called yet. Therefore we can
run out of lines before setting the used field. By allocating
one item more we can survive that point and set used to false
if the scroll engine runs out of lines.

Change-Id: I7a9af1bce256c6e07d254f096bd5865fa7cf2cee
2014-01-12 12:12:13 +01:00
Thomas Martitz
c0a02c98c1 touchscreen/skin_engine: The touchregion handler didn't handle that vertical bars are bottom-up by default
Change-Id: I4e7fc451c7ba318acb110c587bff4306c393e09f
2014-01-12 11:02:02 +01:00
Thomas Martitz
0a0d61e777 Fix remote warnings and charcell reds, and remove minor left-over tuff.
Change-Id: I10987ea9fcad94d502afd4ae4a80ab9022c75d2e
2014-01-12 01:50:21 +01:00
Thomas Martitz
488a1b983e put_line/scrolling: Make the scroll engine inform custom scrollers about start/stop of scrolling.
With the new lcd_putsxy_scroll_func() code can register custom scroll functions
(put_line() makes use of that). In order for the custom scroller to be able
to properly manage its userdata pointer (set via struct scrollinfo::userdata)
the scroll engine must inform the scroller about start and stop of scrolling.

To inform about start the lcd_scroll_* functions now return true when
the line will scroll. To inform about stop the scroll engine calls into the
scroller one last time, with the text set to NULL.

put_line() can use this to release the userdata registered per scrolling line
so that it can be recycled.

This fixes that some scrolling lines became glitchy after some time because
the userdata was recycled too early.

Change-Id: Iff0a6ce2a4f9ae2bada1b8e62f4f5950224942a9
2014-01-12 01:34:06 +01:00
Thomas Martitz
5d37d2579a icons: When loading mono icons keep them in mono format.
This enables monochrome icons them to work with the invert line selector.

Change-Id: Ic3e9219e93b4879166a10180e6067446a84a62bf
2014-01-11 14:19:43 +01:00
Thomas Martitz
d4d3f3c494 skin engine: Fix FS#12884.
The %Vf and %Vb tags change the colors for the rest of the viewport. This
requires the rest of the vp to be redrawn when they change due to a conditional.
The previous code did this redraw in all cases (conditional or not) which
led to visible blinking.

Change-Id: Ie59dfc6fe8ed76485a2a2bd7caf1315f1944c227
2014-01-10 21:54:06 +01:00
Thomas Martitz
99f3f77ee8 skin_engine: Pass string to put_line() via $t because they can be very large.
Change-Id: I02d6bf492bb42e173a7b436427e3cc3560d80183
2014-01-09 23:28:33 +01:00
Thomas Martitz
7ba2d0160b put_line(): Limit and truncate inline strings to MAX_PATH+32.
Because inline strings have to be copied (to escape '$') the local buffer
can be exhaused. The code didn't check for this. The buffer is increased
to handle filenames plus some extra chars but truncates to avoid overflow.

If you have longer strings please pass them via $t tag, in which case
put_line() imposes no additional length-limitation.

Change-Id: I0ca20adbe72f6d44cb442f34d665c16b12cbbaeb
2014-01-09 23:17:38 +01:00
Thomas Martitz
3be3a40138 put_line: Be more careful with changing fg and bg colors.
put_line() needs to change fore- and background colors if required by
the line style. This should really only be done if required, and be undone
as to not compromise subsequent lines. This fixes %Vf and %Vb skin tags.

Change-Id: I85e5a0d1d64aa9eb76a891d9ce1de1320274a69a
2014-01-09 17:42:47 +01:00
Thomas Martitz
81be2016bb Fix Player red and icons on mono displays.
Change-Id: Ib8adcb4c70f2dd3ddd25da8f0606f48926dfd89e
2014-01-07 23:39:37 +01:00
Thomas Martitz
10a2e6738d Oops, pasted to the wrong place.
Change-Id: Icb07ddd04171699e997eca171bf8756b5fd9f024
2014-01-07 22:46:45 +01:00
Thomas Martitz
0e6d86e4fe Fix a few reds and yellows.
Change-Id: I9ad2aca494f2ea3ca5453082ec5491ec031f9ae5
2014-01-07 22:41:00 +01:00
Thomas Martitz
e1c7b3b8f7 lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport.
These where used for line styling during scrolling, which is now done in apps/,
The  viewport struct doesn't need to record these anymore.

Change-Id: I810d9dcb2644b00a798c6e75acab69c74a78e77f
2014-01-07 14:13:48 +01:00
Thomas Martitz
36e469db8b lcd-common: Remove direct style (line decorations) from lcd-puts* functions.
This logic is moved into apps (put_line()) which can better handle line
decorations with respect to scrolling, mulitline and other complications.

Firmware doesn't need this. The remaining drawing function know only one style,
that is foreground on background/backdrop (changing drawmode is still supported).

Change-Id: I707060edc388a7d723a7d09b0cf5cbda6ec56708
2014-01-07 14:13:48 +01: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
Thomas Martitz
91ef65306b skin_engine: Adapt put_line().
This allows for code unification and removal of a workaround (STYLE_XY_PIXELS).

Change-Id: Ie92d377414cad943cdb06976af10b4f315f32710
2014-01-07 14:13:40 +01:00
Thomas Martitz
eec89a90ff lists: Adapt put_line().
This enables removing large portions of code, simplifiyng the drawing routine.
All of the removed code is functionaltiy now available through put_line().

Change-Id: Ib8e61772134189a8c3c6d22345c0b45e912bea76
2014-01-07 14:13:40 +01:00
Thomas Martitz
5d6974641b Introduce put_line().
This function is a fully-fletched, high-level pixel-based line printer, that
combines functionality of several firmware and list functions. It can
draw spacing, icons and text in a single call, in any order and each multiple
times. It can also apply line decorations at the same time.

It features printf-like semantics by accepting a format string that contain
format tags as well as inline text.

It's accessible directly, but also through the multi-screen api for plugins.

Change-Id: I70f5a77bbf4b0252521f2e47ead377b9d6d29b54
2014-01-07 14:13:17 +01:00
Thomas Martitz
5752d029fd icons: Provide accessors to the icon format (mono or native).
This is needed by the upcoming put_line() api to apply different drawmodes
depending on the format.

Change-Id: I626a7369a6e75c9c46af1ca5e4f1a9d401899b68
2014-01-07 11:49:53 +01:00
Thomas Martitz
bc9a45b05f icons: Remove automatic left padding if x == 0.
Since x is viewport-relative the icon isn't necessarily placed at the physical
display boundaries so that the padding isn't always useful. In fact it does
more harm if one wants to place an icon exactly at 0 of a (non-default)
viewport.

Calling code looks still mostly fine. I've only modified list drawer to include
the padding in the call-site.

Change-Id: I6b16b3d4377c3553234667b79837adde10e0edf2
2014-01-07 11:36:00 +01:00
Thomas Martitz
76476751d7 lcd-charcell: Correct get_icon_width() stub, everything is 1 char wide.
Change-Id: I2a76c306be8f11827cb8d1f12641d710f49274aa
2014-01-07 11:36:00 +01:00
Jonathan Gordon
124c969f49 Fix build error
Change-Id: I32e06cc41c70e225622c87539feaca5f92131065
2013-12-30 23:35:23 +11:00
Jonathan Gordon
00b3fd2a66 skin_engine: unload skin backdrops when the skins are reset
Hopefully this will fix various skin related bugs which happen
on usb plug/unplug!

Change-Id: Ie1d8378fca38dae02e42ed02a68bdb3663651b4d
2013-12-29 18:00:38 +11:00
Thomas Martitz
ec6258f936 fix some reds.
Change-Id: Iecb1305dbd1519434e0f476d2199e728b96091f9
2013-12-23 12:35:52 +01:00
Thomas Martitz
22e802e800 playback,talk: Share audiobuffer via core_alloc_maximum().
This fixes the radioart crash that was the result of buffering.c working
on a freed buffer at the same time as buflib (radioart uses buffering.c for the
images). With this change the buffer is owned by buflib exclusively so this
cannot happen.

As a result, audio_get_buffer() doesn't exist anymore. Callers should call
core_alloc_maximum() directly. This buffer needs to be protected as usual
against movement if necessary (previously it was not protected at all which
cased the radioart crash), To get most of it they can adjust the willingness of
the talk engine to give its buffer away (at the expense of disabling voice
interface) with the new talk_buffer_set_policy() function.

Change-Id: I52123012208d04967876a304451d634e2bef3a33
2013-12-23 12:17:38 +01:00
Thomas Martitz
50eb528bc1 scroll_engine: Major rework to support pixel-based scrolling and scroll callbacks.
Much of the scrolling work is moved from lcd-bitmap-common to lcd-scroll.c,
a small scroll callback routine remains. This callback can potentially be
overridden by more extensive scrollers.

The callback also gets fed with pixel-based scrolling information, which
finally removes the strict line-based nature of the scroll engine. Along with
this is the change from scroll_stop_viewport_line() to scroll_stop_viewport_rect()
which works on a pixel-based rectangle instead of lines.

The ultimate goal is to move most of the scroll work to apps, which can
much better decide which line decorations to apply etc. This work is laying
the ground work.

Change-Id: I3b2885cf7d8696ddd9253d5a9a73318d3d42831a
2013-12-14 23:11:31 +01:00
Thomas Martitz
1c5d0b41ee scroll_engine: Rename scroll_stop* functions to be more consistent with the lcd api.
Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
2013-12-14 23:11:30 +01:00
Michael Sevakis
023f6b6efd Get rid of some superfluous single-purpose functions in playback.
* Remove explicit tracking of elapsed time of previous track.
* Remove function to obtain auto skip flag.
* Most playback events now carry the extra information instead and
  pass 'struct track_event *' for data.
* Tweak scrobbler to use PLAYBACK_EVENT_TRACK_FINISH, which makes
  it cleaner and removes the struct mp3entry.

Change-Id: I500d2abb4056a32646496efc3617406e36811ec5
2013-07-13 00:08:51 -04:00
Michael Sevakis
ffa8626b0c Fix whitespace in files for following commit.
Change-Id: I4adb8a152e9b99fcd26d95da7334d7d0cbe2a036
2013-07-12 21:39:06 -04:00
Thomas Martitz
be5fadff94 skin_engine: Fix crash on skin_reset (e.g. on language change).
Change-Id: Ie2da1a1ba9d2dad76e2f1c45abd907c3ede4f56c
2013-06-23 20:55:46 +02:00
Thomas Martitz
4263f67e4b Fix warning (move variable into #ifdef section).
Change-Id: Ic6ba4b786eef00eab7f20abd5fbf2bcb8977993a
2013-06-09 21:08:49 +02:00
Thomas Martitz
770fadddd6 Fix reds (this code needs #ifdef HAVE_ALBUMART)
Change-Id: Ia50cd846d5451b0cb5cf3a6f8097ea9fe3b3c60a
2013-06-09 21:01:47 +02:00
Thomas Martitz
58b4e71d32 skin_engine: Fix albumart logic on skin reloading.
This logic checks whether the skin's albumart dimensions differ from the
previous skin to force rebuffering if necessary. This was broken since
a while as the necessary information was reset.

Change-Id: I3b9f3a819c6af202af8ad66c13742f704ce45ab1
Reviewed-on: http://gerrit.rockbox.org/476
Tested-by: Thomas Martitz <kugel@rockbox.org>
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2013-06-09 17:39:08 +02:00
Jonathan Gordon
83d3f1d3f6 simplelist: Fix simplelist_set_line_count() so it actually sets the count
(hopefully) Fixes FS#12838

Change-Id: I932184afaf7b65121a0c459cd03c8482e3bad22b
2013-03-28 22:32:57 +11:00
Jonathan Gordon
3a13150a81 Revert "skin tags: fix the id3 track/disc numbers in conditionals"
This reverts commit a395a34671.
And fixes FS#12836 - need to rethink how to do this later.
2013-02-28 16:53:41 +11:00
Jonathan Gordon
d76dca165b checkwps: show a helpful error if the parser callback errors out
Change-Id: Ie3e35292ba8d74f0ff3d1bb3483a5e83aae0e6b6
2013-02-26 21:18:16 +11:00
Jonathan Gordon
657b91acfa skin engine: Relax the AA load width/height checks
d6c6c07 changed the AA load tag to make sure the image width/heights
fit in the viewport, Revert this because it doesn't actually make
sense to check it here.

Change-Id: I3fe4b074ef8fe88560f2f894ec651027ea3642f4
2013-02-26 20:47:46 +11:00
Jonathan Gordon
a395a34671 skin tags: fix the id3 track/disc numbers in conditionals
Fix the %in tag so %xd(a, %in) works as expected

Change-Id: I33dd3ae092a66b1363c9cf3afa08075e4534af7c
2013-02-21 21:14:58 +11:00
Alex Mayer
ee758c5a97 Theme Engine: Fix progress bar slider (FS#12823)
Fix the need to resize progress bar when using a slider.
Slider stays in bounds. Progress bar is not resized.
Works well with square sliders that should not overlap
edge of progress bar. also works with rounded sliders.

You can also make progress bar the full width of screen
while using a slider. Before if you would make the
progress bar the full width of the screen and add a slider
the progress bar would look like it was padded on both ends.

This fixes FS#12823

Change-Id: I60345efc5cd0f46286f2591ed032f0d9320d1c3e
Reviewed-on: http://gerrit.rockbox.org/402
Reviewed-by: Hayden Pearce <saint.lascivious@gmail.com>
Tested-by: Hayden Pearce <saint.lascivious@gmail.com>
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2013-02-19 07:27:54 +01:00
Jonathan Gordon
1cc0809ca2 list widget: undo part of aaf3065
It fixed a simulator warning in the skin debug screen but broke
the icons in the database folder chooser. Proper fix shortly.

Change-Id: If366daacc440f937c40960112477b8f6136b72b9
2013-02-13 09:22:24 +11:00
Jonathan Gordon
aaf30651df skin_engine: Add a debug screen to display skin ram usage
Change-Id: Ida9c33211d9360ac88e30a2cf8df9f191bee8b45
2013-02-12 21:01:13 +11:00
Jonathan Gordon
69228f92db simplelist: Make better use of the static buffer and simplify API
Change-Id: I1327fcd01d6f817be6c7018d30d33446c9b57287
2013-02-12 21:01:13 +11:00
Jonathan Gordon
e41aed633f Fix (c) notice which was apparently copy/pasted from a completly unrelated file
Change-Id: I465bd6a70e911c7a56213af82b4db64c25c294f7
2013-02-12 21:01:13 +11:00
Jonathan Gordon
948dbed0af remove unused members
Change-Id: Ic0a0d300c9b7701c9173121d9d36a4dd4a28d8bd
2013-02-11 00:11:25 +11:00
Jonathan Gordon
d06779d987 gui: Fix \t indenting for RTL langs in the lists (DB folder chooser)
Change-Id: If033547ad979a2ebdd463723a31eb15e718e6f8b
2013-02-06 19:57:21 +11:00
Thomas Martitz
48bc762db1 lists: Fix item indentation in RTL to match LTR behavior (which is no indentation when the scrollbar isn't shown, apparently).
Change-Id: I5c36d34638fa7a9cba9468b7ee07a07a836fadec
2013-01-18 18:02:47 +01:00
Thomas Martitz
2ffde90c69 touchscreen: Fix kinetic and swipe scrolling outside of the list viewport.
There were some bugs, especially when the user scrolled above the
list viewport. One bug made Rockbox completely unusable once triggered.

Change-Id: I9bb4722ff4381db189058e9a19ea30b2c69e87d9
2013-01-17 23:29:35 +01:00
Jonathan Gordon
d6c6c0767c album art display: Fix RTL handling for the album art skin tag
AA was broken when an RTL language is used, causing it to not
be displayed.

Also fix th out of bounds handling when width/height > viewport

Change-Id: I4899cd32ec58107c987e3cc0e8df582963bdcf62
2013-01-15 23:10:37 +11:00
Jonathan Gordon
c500f4efe5 radio screen: Disable displaying radio art, FS#12797
With radioart enabled there appears to be buffer corruption when
the image is loaded causing the player to data abort in skin_render_line()

So, disable the code untill someone can fix it.

Change-Id: I6acf3f76ce38aa2784b1b24ed6da29a9c5bee479
2013-01-03 23:09:01 +11:00
Jonathan Gordon
685cf59008 9 segment bitmap drawing:
Use %x9(id) to draw an image in the whole current viewport using the
9 segment drawer (which draws the corners as normal and *tiles*
the middle segments to the needed width/height).

Future work is to make it scale instead of tile

Change-Id: Ic3ed1cad93f96091694801eb442e0da5a2401203
2012-12-09 17:11:19 +11:00
Frank Gevaerts
e6fd7d2d1f Make the recorder build with HAVE_LCD_FLIP disabled.
Change-Id: I5875dc5c59606867299cc0e30d869b817e879ade
2012-08-28 21:36:23 +02:00
Thomas Martitz
85a6715afa yesno/touchscreen: Only accept on touch release.
Keeping the touchscreen pressed during a screen transition can lead
to accidental actions. action_wait_for_release() currently doesn't work
properly for touchscreen, so it's better to not transition before release.

Change-Id: I37bd67945b05fff1b4a5452313f6415a247e3af9
2012-08-15 23:10:28 +02:00
Thomas Martitz
5d9b26f6a2 folder_select: fix problem when selecting / as folder.
Change-Id: Id4880267e8478cebe073b958a58fef1ac22dd336
2012-08-15 23:10:28 +02:00
Thomas Martitz
54e6bafada Fix missed buttons in action.c if action_wait_for_release() was called
with no button pressed.

If e.g. two yesno screens directly follow each other the button release of the
first one was incorrectly accepted in the second one. The fix exposed another
problem in action.c if action_wait_for_release() is called when no button is
actually pressed. The next press was silently eaten.

This time re-introducing FS#12723 is avoided by leaving the offending hunk
out in yesno.c.

Change-Id: Icfe57375067f51f5c8177f3585cd47ceec9dcf0d
2012-08-15 23:08:26 +02:00
Fred W. Bauer
53c6bab75b We should reload the playlist control file when leaving
USB mode to make sure the filedescriptor is correct.

Change-Id: I2905eaf27533d935a0458b630372584e353c7160
Reviewed-on: http://gerrit.rockbox.org/294
Reviewed-by: Michael Giacomelli <mgiacomelli@gmail.com>
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-08-14 06:23:24 +02:00
Jonathan Gordon
70eb3e6a56 Revert "fix erroneous button read in yesno screen and missed buttons in action.c."
This reverts commit 15775c8bad.
2012-08-14 12:12:15 +10:00
Jonathan Gordon
bd6e6ed403 folder selector: handle long press to invert selection/select all.
Doing a LONG PRESS on a:
- unopened folder will select all its sub-folders
- opened folder will invert the selection of its sub-folders

Change-Id: Ia7fd8dc3b940f60adee3f0314bf6bba5eb2c7b3b
2012-08-13 15:03:12 +10:00
Jonathan Gordon
7c31ff2fb0 Fix skin engine error message
Change-Id: I2250be6d4e82cd5d91ed1a2c080e263dd7543129
2012-08-06 10:35:22 +10:00
Thomas Martitz
8c655cfdc0 New GUI browser to select one (or more) folders.
The browser lets the user pick one or more directories in a convinient
GUI browser. The initial directory list is read from a string
(separated by colons) and the resulting list is written back to the same
string (again separated by colons).

Note: The work was initially done by Jonathan Gordon, however I changed
it substantially so I claim autorship.

This selector is going to be used for autoresume and database scan folders.

Change-Id: Id1d3186dad783411eb5c6056ce93f5b6123c7aa0
2012-07-30 21:20:51 +02:00
Jonathan Gordon
9dd2eb49be skin_engine: Support percentages for viewport positioning
%V(0,50%,75%,50%,-) - make a viewport at x=0, y=half the lcd height,
75% lcd width and the remaining height (the other half) of the lcd.

Change-Id: If26ccb65e8dc52c9225f3fd6d7b222d770add0f0
Reviewed-on: http://gerrit.rockbox.org/184
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Tested-by: Thomas Martitz <kugel@rockbox.org>
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-07-29 04:24:38 +02:00
Jonathan Gordon
08238178d3 lists: Support '\t' in list item text to indent the line containing it.
Change-Id: I1583371228ed477b504c135f81cb59a0c3c931e6
Reviewed-on: http://gerrit.rockbox.org/296
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
Tested-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-07-19 01:21:10 +02:00
Thomas Martitz
15775c8bad fix erroneous button read in yesno screen and missed buttons in action.c.
If two yesno screens directly follow each other the button release of the
first one was incorrectly accepted in the second one. The fix exposed another
problem in action.c if action_wait_for_release() is called when no button is
actually pressed. The next press was silently eaten.

Change-Id: Iaa5f246f7ea1fd775606620a989cdaec74a9305e
2012-07-18 10:28:08 +02:00
Jonathan Gordon
68ee7aac6e skin_engine: Make pressing the setting bar touch region work
might need some tweaking, but works.

Change-Id: I0784cd4fe9996531da6cc275491ff3b4e83cdbcf
2012-07-06 14:28:34 +10:00