- Status Closed
- Percent Complete
- Task Type Patches
- Category User Interface → Themes
- Assigned To No-one
- Operating System
- Severity Low
- Priority Very Low
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#2580 - Support for conditional images.
First crack at support for conditional images. Images
are loaded using %xl|n|filename.bmp|x|y| and displayed
with %xdn (where "n" is the image sequence number). %xl
can appear in the WPS after the %xd and still work just
fine.
Closed by linusnielsen
2005-09-01 08:21
Reason for closing: Accepted
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
2005-09-01 08:21
Reason for closing: Accepted
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
Logged In: YES
user_id=259137
Thanks, I have applied the patch, with some changes.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
This is a good idea. I have a few suggestions that would
make it better, and I would also like to merge this patch
into CVS soonish, so we can include it in the 2.5 release.
It is certainly a bug that the wps can't have conditional
images.
1) Keep the file name in the img struct and use that to
prevent the same BMP from being loaded twice, but instead
set the ptr to the already loaded bitmap. That way we can
have the same bitmap in several places without loading it twice.
2) Use a-z instead of 0-9 for the sequence numbers
3) Double the size of the bitmap buffer
The optimal solution for issue (1) would probably be to have
the coordinates in the %xd tag, but that may be a problem
for the parser.
I have a little time this week. I'm working out how to
reincorporate this into wps-display.c and I've got a couple
questions:
2) Using a-z is a bit overkill, don't you think? There are
only 10 slots in img (hence 0-9). MAX_IMAGES is currently 10.
You are correct about the parser having some problems with
the coordinates being housed with the display tag. Unless,
of course, we used a different separator character (like
','). I also think it's better to go with the display tag
but unless the conditionals are updated to handle the extra
'|' or a different separator is used I don't see how it can
happen.
The limitation of 10 isn't as sensible any more when you
start to use a new slot each time you position the same
picture on a new place. Thus it makes sense to extend the
MAX_IMAGES and if so, you need to support something else
than just 0-9…
Let's keep the display tag as you did it, as then this
should work fine with conditionals. Even with the upcoming
"enum conditonals" where you can set different things
depending on an enum (0,1,2,3, etc).
Thanks, I have applied the patch, with some changes.