PDA

View Full Version : UI add/play text in single line mode



Triode
2005-08-07, 10:30
Dean (others as interested),

The attached diff covers two things I would like feedback on:

1) It displays a "brief" version of the add/play text on a player in single line mode when add/play is pressed. There is scope for
refining the actual text, but I find having some visual feedback that the button press has occured is useful. I found I needed to
define new strings as the normal ones don't fit fully on the the screen in some player's single line modes.

I think there are several other showBriefly's in the UI code that could benefit from this?

2) Second is more of an infrastructure thing: changed $client->symbols() so that it can be sent the symbol name directly, rather
than via Slim::Display::Display::symbols. If a parts hash is used for showBriefly, then this avoids going through the code to build
strings with escape sequences for graphical players. I've used this in the example for 1) hence included in same diff.

Note showBriefly and update both accept a parts hash now, so there is no need to call renderOverlay etc.

Ideally I would like to convince people to use a hash for their lines functions going forward as it misses out lots of code,
especially on a graphics player...

Adrian

dean
2005-08-07, 15:49
Looks reasonable, though I'd make the brief "Now Playing" be
"Playing" instead of "Play"...

Would be great to have an automated way to do this...

(I agree, using a hash for screens is preferred. We should update
whenever feasible in the main tree AND the sample plugins...)


On Aug 7, 2005, at 10:30 AM, Triode wrote:

> Dean (others as interested),
>
> The attached diff covers two things I would like feedback on:
>
> 1) It displays a "brief" version of the add/play text on a player
> in single line mode when add/play is pressed. There is scope for
> refining the actual text, but I find having some visual feedback
> that the button press has occured is useful. I found I needed to
> define new strings as the normal ones don't fit fully on the the
> screen in some player's single line modes.
>
> I think there are several other showBriefly's in the UI code that
> could benefit from this?
>
> 2) Second is more of an infrastructure thing: changed $client-
> >symbols() so that it can be sent the symbol name directly, rather
> than via Slim::Display::Display::symbols. If a parts hash is used
> for showBriefly, then this avoids going through the code to build
> strings with escape sequences for graphical players. I've used
> this in the example for 1) hence included in same diff.
>
> Note showBriefly and update both accept a parts hash now, so there
> is no need to call renderOverlay etc.
>
> Ideally I would like to convince people to use a hash for their
> lines functions going forward as it misses out lots of code,
> especially on a graphics player...
>
> Adrian
>
> <singleline.diff>
>

kdf
2005-08-08, 10:54
Quoting Triode <triode1 (AT) btinternet (DOT) com>:

> Dean (others as interested),
>
> The attached diff covers two things I would like feedback on:
>
> 1) It displays a "brief" version of the add/play text on a player in single
> line mode when add/play is pressed. There is scope for
> refining the actual text, but I find having some visual feedback that the
> button press has occured is useful. I found I needed to
> define new strings as the normal ones don't fit fully on the the screen in
> some player's single line modes.
>
> I think there are several other showBriefly's in the UI code that could
> benefit from this?

Strings.pm, doubleString() allows for handling of strings for sing line by
adding _DBL to the string token. If not found, it falls back to the normal
version.

> Ideally I would like to convince people to use a hash for their lines
> functions going forward as it misses out lots of code,
> especially on a graphics player...
>
I'm convinced :) A summpary of the kind of changes that need to be made for
lines fucntions might be a useful post when you are done with this, so that all
plugin authors have an easy reference. We should probably handle older style
with a log warning as well for a while.

-kdf

Triode
2005-08-08, 11:59
>
> Strings.pm, doubleString() allows for handling of strings for sing line by
> adding _DBL to the string token. If not found, it falls back to the normal
> version.
>

Right - I'll look at that before committing then. I think it still needs something to make showBriefly show the relavent string.

>> Ideally I would like to convince people to use a hash for their lines
>> functions going forward as it misses out lots of code,
>> especially on a graphics player...
>>
> I'm convinced :) A summpary of the kind of changes that need to be made for
> lines fucntions might be a useful post when you are done with this, so that all
> plugin authors have an easy reference. We should probably handle older style
> with a log warning as well for a while.

Yes - I have one thing left that I want to change (to allow a mode/lines function to specify fonts) and then was thinking about
adding something to the plugin help page. I'll think about posting something as an interim if I don't get round to this in the next
week or so. There's quite a few places to change the server too before we get round to depreciating the old api though....