FS#2954 - Scrolling text margin for the wps
Attached to Project:
Rockbox
Opened by Ben Basha (paprica) - Saturday, 28 January 2006, 01:47 GMT
Last edited by Paul Louden (Llorean) - Wednesday, 14 November 2007, 20:02 GMT
Opened by Ben Basha (paprica) - Saturday, 28 January 2006, 01:47 GMT
Last edited by Paul Louden (Llorean) - Wednesday, 14 November 2007, 20:02 GMT
|
DetailsThe patch adds the possibility to restrict the width of a (scrolling) line.
It enables you to position the scroll text inside the line and give him a starting and ending position. It extents the %s WPS tag to the following: %s%m|x1|x2| where x1 is the x-position where the line text starts and x2 is the ending x-position of the scroll text (actually, when I look at the code, it should also work for nonscrolling text...) Only one margin is allowed per line. Thanks Massa for the description |
This task depends upon
Closed by Paul Louden (Llorean)
Wednesday, 14 November 2007, 20:02 GMT
Reason for closing: Rejected
Additional comments about closing: The desired parts of this task have been accepted, and the remainder is rejected, to be done via viewports instead.
Any patch that seeks acceptance should work in this direction and be a new task.
Wednesday, 14 November 2007, 20:02 GMT
Reason for closing: Rejected
Additional comments about closing: The desired parts of this task have been accepted, and the remainder is rejected, to be done via viewports instead.
Any patch that seeks acceptance should work in this direction and be a new task.
i found a bug
dont download it, i will upload new version in the noon
the bug fixed and now you can use also %ar & %ac
if you want a regular margin after a irregular one,
just use %m without nothing
work with the archos recorder too
iuoçiuç
CVS 2006-02-06
buggy, dont download.
old version for CVS 0207
http://takka.style.coocan.jp/wiki/?
plugin=attach&pcmd=open&file=scroll-
margins.patch&refer=RockBox
i synched this patch with the latest CVS (17.02.06). get it
here :
http://nicolas.pennequin.free.fr/scroll_margins.patch
nicolas_p's version doesn't compile.
neither does Paprica's orginal.
Massa version, synced with the cvs
But beware, I think it's not only synching - there has to be some rework to make it properly work again...
(I tried it a week ago and it had some weird effects...)
The recent changes in cvs (23.8,20:07,Mark Arigo):
Allow scrolling lines with different x-margins. The margin at the time of the call
to puts_scroll will be used as the margin for that line.
have broken the last patch. Does this mean that a similar functionality will be included in CVS soon, or can we adjust the patch to work with the new CVS code.
Thanks a lot and all the best
Norbert
Will check with CVS HEAD asap
just the order of two lines has switched
Updated patch to work against CVS from 20060824
Thanks a lot. The patch does work after some small changes:
drivers/lcd-h100-remote.c:1398: error: `xmargin' undeclared (first use in this function)
I changed it to leftmargin. And
debug_menu.c:1240: error: too few arguments to function `lcd_setmargins'
there is a lcd_setmargins(0,0) left over, I added in the middle the LCD_WIDTH. This way it did compile.
I attach a fixed patch against current cvs for those who want to have it.
Thanks a lot and all the best
Norbert
I only tried it for the simulator and x5 :-(
Thanks for fixing it
FS#3045):I tried to use margins with a bitmap right to it (the margins starts at x=1 and ends one
pixel before the bitmap begins)
If a line left of the bitmap starts to scroll, the line flickers inside the bitmap...
Any idea what can cause this behaviour?
Hunk #1 succeeded at 560 (offset -1 lines).
Hunk #2 succeeded at 574 (offset -1 lines).
Hunk #3 FAILED at 600.
Hunk #4 FAILED at 610.
2 out of 4 hunks FAILED -- saving rejects to file apps/plugin.c.rej
patching file apps/sound_menu.c
Hunk #1 succeeded at 742 (offset 1 line).
Hunk #2 succeeded at 790 (offset 1 line).
Hunk #3 FAILED at 1041.
1 out of 3 hunks FAILED -- saving rejects to file apps/sound_menu.c.rej
and sync to today's CVS...
debug_menu.c: In function 'dbg_lcd_power_off':
debug_menu.c:2069: error: too few arguments to function 'lcd_setmargins'
debug_menu.c: In function 'dbg_buttonlights':
debug_menu.c:2111: error: too few arguments to function 'lcd_setmargins'
I am able to compile a clean build and also after adding the album art patch.
Thanks for any help.
%s%m|18|209|%al%?ia<%ia|%?d2<%d2|(Artist Unknown)>>
the |18|209| actually come up on screen?
bookmark.c: In function 'select_bookmark':
bookmark.c:553: error: too few arguments to function 'screens[i]setmargins'
I don't get the error in compiling when I remove the patch. I'm compiling for a Gigabeat F.
Thanks for any help.
So it reads: screens[i].setmargins(XXXX, screens[i].width, XXXX);
Since revision 12704 this patch is not working due to changes in the files list.c and solitaire.c
CC drivers/lcd-remote-1bit-v.c
drivers/lcd-remote-1bit-v.c:82: error: conflicting types for 'lcd_remote_setmargins'
export/lcd-remote.h:145: error: previous declaration of 'lcd_remote_setmargins' was here
drivers/lcd-remote-1bit-v.c:82: error: conflicting types for 'lcd_remote_setmargins'
export/lcd-remote.h:145: error: previous declaration of 'lcd_remote_setmargins' was here
make[1]: *** [dir] Error 1
make: *** [all] Error 2
This is doubly annoying since I don't own an LCD remote so really don't care what is displayed on it!
%s%m|16|144|%?it<%it|%d2>
%s%m|16|144|%alNext: %?It<%It|%Fn>
The first line scrolls to the end of the text, stops and scrolls back to the beginning.
In the second line it seems the text will get copied several time.
Like:
strcpy(showntext, "Test ");
for(a=0;a<UNKNOWN_NUMBER;a++)
strcat(showntext, "Test ");
=> showntext="Test Test Test Test Test Test Test" (or something like that).
The result is, that the text keeps scrolling without changing direction.
Is this a bug or a feature?
The scrolling does change direction in this patch, at least it should :D
(which is 50% by default IMHO)
I just found that one out.
so it's a feature :)
This file has been removed from the current svn-tree.
Anyway previously I had got the 20070312 source from the archive daily builds page, and I had also applied the latest album art patch and eq wps tags patch, and there weren't any errors or conflicts applying any of the patches.
Thanks very much for your help.
Dano: hopefully this time the patch will work for you also, I've manually updated the 1bit remote driver
It appears to work fine on my iPods. (Famous last words.)
I get "gui/gwps-common.c: In function ‘get_line’:
gui/gwps-common.c:1421: error: ‘fmt’ undeclared (first use in this function)
gui/gwps-common.c:1421: error: (Each undeclared identifier is reported only once
gui/gwps-common.c:1421: error: for each function it appears in.)"
And 1421 is the whole "case 'm': /* margins */" hunk of code.
Can someone upload a sync'd patch, or at least tell me what I've done wrong?
I ask again: Would there be any problems to ADD this patch to the svn tree?
edit line 1140 in apps/debug_menu.c so it reads:
lcd_setmargins(0, LCD_WIDTH, 0);
Hunk 1 of apps/onplay.c and Hunk 20 of apps/debug_menu.c
Attached is the otherwise synced version.
rb->lcdsetmargins, this function (or whatever its called) isn't in bookmark.c anymore, so I tried compiling and it works. Did you try compiling?
what to do...
It's just the older version with the hunks that didn't patch taken out (they weren't needed anymore).
Only one small change; it should work with SVN as of 2007-08-15.
...
CC alarm_menu.c
alarm_menu.c: In function 'alarm_screen':
alarm_menu.c:73: error: too few arguments to function 'screens[i].setmargins'
make[1]: *** [/home/user/rockbox/build/apps/alarm_menu.o] Error 1
make: *** [build] Error 2
When including the previously included changes on alarm_menu.c it compiles fine.
Please test follow wps with 2 patches.
---
%wd
%s%m|25|100|%?it<%it |%fn>
%ar%pc/%pt
%arTrack %?in<%in|unknown> (%pp/%pe)
%s%m|100|175|%?it<%it |%fn>
---
So I fix it.
The attached patch fixes this for me. Does anybody see a reason why it shouldn't be merged into the scroll-margins patch?
Now all target can be supposed to use this patch...
Sorry for above buggy patch...
if (left_width || center_width || right_width) {
display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
display->fillrect(left_xpos, ypos, display->width, string_height);
display->set_drawmode(DRMODE_SOLID);
}
I don't understand what has occurred...
8 out of 14 hunks FAILED -- saving rejects to file apps/gui/gwps-common.c.rej
1 out of 1 hunk FAILED -- saving rejects to file apps/gui/gwps.h.rej
1 out of 3 hunks FAILED -- saving rejects to file apps/gui/wps_parser.c.rej
1 out of 16 hunks FAILED -- saving rejects to file apps/debug_menu.c.rej