Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-24-2009, 08:24 PM   #1
DesiLinguist
Computational Linguist
DesiLinguist doesn't litterDesiLinguist doesn't litter
 
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;
If I am not mistaken, the first two CASE statements handle the regular flips and the next two CASE statements handle the long flips. So, all one should have to do is to ensure that the long flips do *exactly* the same thing as the short flips. And that should be all that is needed to remove the 5-page turn function.

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
DesiLinguist is offline   Reply With Quote
Old 02-25-2009, 07:56 AM   #2
Fellball
Wizard
Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.
 
Fellball's Avatar
 
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...
Fellball is offline   Reply With Quote
Advert
Old 02-25-2009, 10:31 AM   #3
DesiLinguist
Computational Linguist
DesiLinguist doesn't litterDesiLinguist doesn't litter
 
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!
DesiLinguist is offline   Reply With Quote
Old 02-25-2009, 11:02 AM   #4
Max
Connoisseur
Max has a complete set of Star Wars action figures.Max has a complete set of Star Wars action figures.Max has a complete set of Star Wars action figures.Max has a complete set of Star Wars action figures.
 
Max's Avatar
 
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)
Max is offline   Reply With Quote
Old 02-25-2009, 11:07 AM   #5
Fellball
Wizard
Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.
 
Fellball's Avatar
 
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.
Attached Files
File Type: rar ipdf.rar (326.1 KB, 443 views)
Fellball is offline   Reply With Quote
Advert
Old 02-25-2009, 11:15 AM   #6
Ea
Wizard
Ea ought to be getting tired of karma fortunes by now.Ea ought to be getting tired of karma fortunes by now.Ea ought to be getting tired of karma fortunes by now.Ea ought to be getting tired of karma fortunes by now.Ea ought to be getting tired of karma fortunes by now.Ea ought to be getting tired of karma fortunes by now.Ea ought to be getting tired of karma fortunes by now.Ea ought to be getting tired of karma fortunes by now.Ea ought to be getting tired of karma fortunes by now.Ea ought to be getting tired of karma fortunes by now.Ea ought to be getting tired of karma fortunes by now.
 
Ea's Avatar
 
Posts: 3,490
Karma: 5239563
Join Date: Jan 2008
Location: Denmark
Device: Kindle 3|iPad air|iPhone 4S
Quote:
Originally Posted by Max View Post
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)
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.
Ea is offline   Reply With Quote
Old 02-25-2009, 11:20 AM   #7
DesiLinguist
Computational Linguist
DesiLinguist doesn't litterDesiLinguist doesn't litter
 
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.
DesiLinguist is offline   Reply With Quote
Old 02-25-2009, 11:48 AM   #8
Fellball
Wizard
Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.
 
Fellball's Avatar
 
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:
Originally Posted by DesiLinguist View Post
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!
Sorry, i changed the source and type 'make'.

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.
Fellball is offline   Reply With Quote
Old 02-25-2009, 11:57 AM   #9
DesiLinguist
Computational Linguist
DesiLinguist doesn't litterDesiLinguist doesn't litter
 
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.
DesiLinguist is offline   Reply With Quote
Old 02-25-2009, 03:42 PM   #10
DesiLinguist
Computational Linguist
DesiLinguist doesn't litterDesiLinguist doesn't litter
 
Posts: 110
Karma: 100
Join Date: Feb 2009
Device: iLiad BE, iPhone, Kindle DX
Fellball, I stripped the binary for you. Please look at this thread for the updated ipdf installers.

Thanks again for your help!
DesiLinguist is offline   Reply With Quote
Old 02-26-2009, 03:22 AM   #11
Fellball
Wizard
Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.
 
Fellball's Avatar
 
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:
Originally Posted by DesiLinguist View Post
Fellball, I stripped the binary for you. Please look at this thread for the updated ipdf installers.
thx
Fellball is offline   Reply With Quote
Old 02-26-2009, 08:57 AM   #12
DesiLinguist
Computational Linguist
DesiLinguist doesn't litterDesiLinguist doesn't litter
 
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.
DesiLinguist is offline   Reply With Quote
Old 02-26-2009, 10:26 AM   #13
Fellball
Wizard
Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.Fellball knows how to set a laser printer to stun.
 
Fellball's Avatar
 
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:
Originally Posted by DesiLinguist View Post
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.
I use this way: https://www.mobileread.com/forums/sho...d.php?t=19406&
Fellball is offline   Reply With Quote
Old 02-26-2009, 10:40 AM   #14
DesiLinguist
Computational Linguist
DesiLinguist doesn't litterDesiLinguist doesn't litter
 
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.
DesiLinguist is offline   Reply With Quote
Old 02-26-2009, 11:37 AM   #15
Shaggy
Wizard
Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.
 
Shaggy's Avatar
 
Posts: 4,293
Karma: 529619
Join Date: May 2007
Device: iRex iLiad, DR800SG
Quote:
Originally Posted by Fellball View Post
Hello,

i modified the define in settings.h from
"#define JumpWidth 5 // long press"
in
"#define JumpWidth 1 // long press".

this works for me...
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.
Shaggy is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 06:45 PM.


MobileRead.com is a privately owned, operated and funded community.