![]() |
#1 |
Computational Linguist
![]() ![]() Posts: 110
Karma: 100
Join Date: Feb 2009
Device: iLiad BE, iPhone, Kindle DX
|
Modifying flipbar behavior
In a recent thread about the weirdness of the flipbar wherein it would randomly turn 5 pages when it should have only done a single page, Shaggy suggested that it might be useful to completely furn off that feature since the ipdf sources are now available.
I am very comfortable with linux and have done some embedded system development back in the day. So, I guess I wouldn't mind taking a shot at taking the fantastic jharker fullscreen ipdf (which is my default ipdf now) and modifying it to disable the 5 page turn completely. However, I would still prefer if someone well-versed with developing for the iLiad took a shot at doing this before me primarily because the turn around time would be so much shorter. IMHO, this modification shouldn't be that difficult for someone who knows their way around the source already. So, I would really really appreciate it if one of the more experienced iLiad developers could try their hand at this before I took a shot. Thanks in advance! Update: I downloaded jharker's sources and explored a bit and found the changes that I think should be made according to my (so far very preliminary) understanding of the code. The first set of changes should be in PDFPortraitView.cpp in the range between lines 318 and 361: Code:
case GDK_Page_Up: view->ctrl->settings.setRenderDir(RenderPrev); if (view->ctrl->settings.getCurrentPage() <= 1) { displayPage(1, ScrollToPrevPage); } else { displayPage(view->ctrl->settings.getCurrentPage() - 1, ScrollToPrevPage); } break; case GDK_Page_Down: view->ctrl->settings.setRenderDir(RenderNext); if (view->ctrl->settings.getCurrentPage() >= view->ctrl->core->getNumPages()) { displayPage(view->ctrl->settings.getCurrentPage(), ScrollToNextPage); } else { displayPage(view->ctrl->settings.getCurrentPage() + 1, ScrollToNextPage); } break; case GDK_F1: // iRex: long pageflip forward view->ctrl->settings.setRenderDir(RenderNext); if (view->ctrl->settings.getCurrentPage() + JumpWidth > view->ctrl->core->getNumPages()) { displayPage(view->ctrl->core->getNumPages()); } else { displayPage(view->ctrl->settings.getCurrentPage() + JumpWidth, ScrollToNextPages); } break; case GDK_F2: // iRex: long pageflip backward view->ctrl->settings.setRenderDir(RenderPrev); if ((view->ctrl->settings.getCurrentPage() - JumpWidth) < 1) { displayPage(1); } else { displayPage(view->ctrl->settings.getCurrentPage() - JumpWidth, ScrollToPrevPages); } break; Of course, the same changes need to be made in PDFLandscapeView.cpp as well but the changes should be pretty much identical. To developers: If I am wrong about the changes that need to be made, please let me know. If I am right, I would really appreciate it if you could produce a version of this ipdf (jharker's) that incorporated these changes. Like I said, I could do it myself but it would take me a looong time to set up the toolchain and produce a final result whereas one of you veteran developers could probably do it in very little time. I would be happy to package up the new ipdf into daudi's all-in-one ipdf installer once this binary was produced. Please help a fellow iLiad lover! ![]() Last edited by DesiLinguist; 02-25-2009 at 12:54 AM. Reason: Added code |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,430
Karma: 95000
Join Date: Dec 2007
Location: Germany, near Bingen/Rhein
Device: K3,K4,PB360,PB360+,PB701-IQ und noch diverse andere Lesegeräte....
|
Hello,
i modified the define in settings.h from "#define JumpWidth 5 // long press" in "#define JumpWidth 1 // long press". this works for me... |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Computational Linguist
![]() ![]() Posts: 110
Karma: 100
Join Date: Feb 2009
Device: iLiad BE, iPhone, Kindle DX
|
Oh that's even simpler! I didn't think of that. I checked and JumpWidth is not used anywhere else in the code and so this change shouldn't affect anything else.
Fellball, can you provide a binary that includes this change? I am hoping you made this change to jharker's fullscreen ipdf? Thanks! |
![]() |
![]() |
![]() |
#4 |
Connoisseur
![]() ![]() ![]() ![]() Posts: 79
Karma: 380
Join Date: Mar 2008
Location: Girona, Spain
Device: iLiad, DR1000s
|
Hello, another solution could be to set up a longer time for long press (you can configure for a minimun duration of 2 secons for a long press)
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,430
Karma: 95000
Join Date: Dec 2007
Location: Germany, near Bingen/Rhein
Device: K3,K4,PB360,PB360+,PB701-IQ und noch diverse andere Lesegeräte....
|
i used the fullscreen-1.0a1-svn25 - Version.
i hope this binary is working for you. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,490
Karma: 5239563
Join Date: Jan 2008
Location: Denmark
Device: Kindle 3|iPad air|iPhone 4S
|
We discussed this earlier, and it seems that the flipbar may not be included in that min. duration setting. At least the way it's stated in the manual make it seem that it isn't and then that setting won't affect this.
|
![]() |
![]() |
![]() |
#7 |
Computational Linguist
![]() ![]() Posts: 110
Karma: 100
Join Date: Feb 2009
Device: iLiad BE, iPhone, Kindle DX
|
Fellball, thank you so much! However, I have a question: it seems that the size of your ipdf binary is 1.1MB whereas the original fullscreen ipdf binary was only 81K. I think you forgot to strip your binary. Could you please do that and then repost?
Thanks again so much! Last edited by DesiLinguist; 02-25-2009 at 11:33 AM. |
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,430
Karma: 95000
Join Date: Dec 2007
Location: Germany, near Bingen/Rhein
Device: K3,K4,PB360,PB360+,PB701-IQ und noch diverse andere Lesegeräte....
|
Quote:
![]() I think the debugging-informations are included. i'm not a linux programmer and i don't know how to change it. but i will try it. |
|
![]() |
![]() |
![]() |
#9 |
Computational Linguist
![]() ![]() Posts: 110
Karma: 100
Join Date: Feb 2009
Device: iLiad BE, iPhone, Kindle DX
|
Fellball, did you set up the full toolchain as described in the forums? I mean, did you use the VMware image? If so, then I think you need to change the target from iliad-dev to iliad-irex or something and I think that should automatically produce an optimized binary.
I hope someone more knowledgeable will chime in here if I am wrong. |
![]() |
![]() |
![]() |
#11 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,430
Karma: 95000
Join Date: Dec 2007
Location: Germany, near Bingen/Rhein
Device: K3,K4,PB360,PB360+,PB701-IQ und noch diverse andere Lesegeräte....
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#12 |
Computational Linguist
![]() ![]() Posts: 110
Karma: 100
Join Date: Feb 2009
Device: iLiad BE, iPhone, Kindle DX
|
BTW, Fellball, I am curious. How were you able to produce an unstripped binary? Were you using the VMWare image? I was not able to compile ipdf at all and so I would like to know what I need to set up the development environment properly.
|
![]() |
![]() |
![]() |
#13 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,430
Karma: 95000
Join Date: Dec 2007
Location: Germany, near Bingen/Rhein
Device: K3,K4,PB360,PB360+,PB701-IQ und noch diverse andere Lesegeräte....
|
Quote:
|
|
![]() |
![]() |
![]() |
#14 |
Computational Linguist
![]() ![]() Posts: 110
Karma: 100
Join Date: Feb 2009
Device: iLiad BE, iPhone, Kindle DX
|
Fellball,
Thank you so much! I had completely missed that thread. This is extremely useful ![]() So, I guess the vmware image really is out of date and it's best to just do things with debian and the official sdk. Last edited by DesiLinguist; 02-26-2009 at 10:45 AM. |
![]() |
![]() |
![]() |
#15 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,293
Karma: 529619
Join Date: May 2007
Device: iRex iLiad, DR800SG
|
Would it make sense to pull it out of the settings.h #define and instead put it into a config file? That way users can change whether they want the long press or not themselves, without having it hard coded.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
DR800 Strange flipbar behavior | penartur | iRex | 8 | 08-05-2010 09:17 PM |
multiple page turns when pressing flipbar | bazmi | iRex | 27 | 06-14-2009 01:19 PM |
Flipbar Poll | axel77 | iRex | 17 | 04-25-2008 09:12 PM |
Iliad flipbar landscape use/price/hanlin | johngreen99 | iRex | 4 | 03-09-2008 06:56 AM |
Flipbar question | JWLaRue | iRex | 9 | 03-09-2008 12:09 AM |