Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-04-2010, 06:41 AM   #1
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 711
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, in love with iRex DR800S. Also a K4NT. Now a Kobo Aura
Question Experimental FBReader v0.12.10 port

UPDATE 2010/12/04 17:10 -> new version v1, now fully features comparable to Mackx's v0.10.7 port

Sources in: https://bitbucket.org/inigoserna/fbreader-dr-0.12.x


Hi there,

during this crazy sleepless night I've been doing some silly things... like compiling last version of FBReader - v0.12.10 - for DR devices.

Unlike my past experiments with v0.12.7, this newer version works ok, being as fast as v0.10.7 port, both in emulator and in my DR800.

Could you please test this on your devices, specially on a DR1000?

Beware that you should backup your v0.10.7 configuration directory before (<SD_CARD>/Programs/_config/.FBReader) in order to return to your normal v0.10.7 version after these tests, as configuration is upgraded, so changed and incompatible with v0.10.x.

I've also noted that some keyshorcuts (long left, long right) must be configured again.

Note this is just a plain compilation of original sources, using Mackx's way, but without additional code (no Mackx's DR tabs support).
Thus, the only changes are:
- configuration directory
- DR port toolbar, with some new icons


If this port works, I think we (me, Mackx ;-)... anyone?) could add the DR "touch":
- make it compatible with tabs
- use system menu:
. toggle fullscreen
. rotate screen
. close doc
. increase font size
. decrease font size
. open preferences dialog
. search word
. go to page


I feel the same speed of v0.10.7 port, with no problems by now, but remember I haven't used it extensively.

I expect your comments,
Iņigo
Attached Files
File Type: gz FBReader-0.12.10-dr-v1.tar.gz (1.85 MB, 106 views)

Last edited by Iņigo; 12-04-2010 at 11:21 AM.
Iņigo is offline   Reply With Quote
Old 12-04-2010, 11:13 AM   #2
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 998
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Hi Iņigo,

The binary is also running on the DR1000. The 0.10.7 version mapped the down and long-down irex-keys to smallScroll and largeScroll, allowing to scroll down on a chm-page and go to next chm-pages with a long-press. However it seems that the 'actioncodes' in fbreader have changed, so the down-arrow does not have the same effect as before. Currently this does not allow me to scroll down in chm-files. (I still need to check what to change.)

I will see if there are more issues related to the changes in fbreader.

Unfortunately I will not have much time coming days/weeks, so I will do my best and publish progress here.

Marcel.
Mackx is offline   Reply With Quote
 
Enthusiast
Old 12-04-2010, 11:32 AM   #3
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 711
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, in love with iRex DR800S. Also a K4NT. Now a Kobo Aura
Quote:
Originally Posted by Mackx View Post
Hi Iņigo,

The binary is also running on the DR1000. The 0.10.7 version mapped the down and long-down irex-keys to smallScroll and largeScroll, allowing to scroll down on a chm-page and go to next chm-pages with a long-press. However it seems that the 'actioncodes' in fbreader have changed, so the down-arrow does not have the same effect as before. Currently this does not allow me to scroll down in chm-files. (I still need to check what to change.)

I will see if there are more issues related to the changes in fbreader.

Unfortunately I will not have much time coming days/weeks, so I will do my best and publish progress here.

Marcel.
Ok, thanks for the quick answer Mackx.

Here there is an extract of my options.xml file. It works perfectly for .fb2 files:
Code:
  <group name="Keys">
    <option name="Action0" value="pageForward"/>
    <option name="Action1" value="nextTOCSection"/>
    <option name="Action2" value="previousTOCSection"/>
    <option name="Action3" value="pageBackward"/>
    <option name="Key0" value="&lt;DownArrow&gt;"/>
    <option name="Key1" value="&lt;PageDown&gt;"/>
    <option name="Key2" value="&lt;PageUp&gt;"/>
    <option name="Key3" value="&lt;UpArrow&gt;"/>
    <option name="Number" value="4"/>
  </group>

I've updated the first message with a new version and the source code, nothing new for you ;-)

I'll take a look at the menu code these days.

Iņigo
Iņigo is offline   Reply With Quote
Old 12-05-2010, 08:10 AM   #4
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 998
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
See bitbucket for the changes that I made. I will make some time later to give some hints for the menu.
Mackx is offline   Reply With Quote
Old 12-05-2010, 02:11 PM   #5
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 711
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, in love with iRex DR800S. Also a K4NT. Now a Kobo Aura
Quote:
Originally Posted by Mackx View Post
See bitbucket for the changes that I made. I will make some time later to give some hints for the menu.
Thanks, that was what I did, I copied & pasted your code yesterday, the v1 includes your changes to make FBReader compatible with DR tabs.

I've been looking at hello-world and techpdf sources, it doesn't look very difficult even for me, so I think I'll make some progress these next days when I get some free time.

Thanks,
Iņigo
Iņigo is offline   Reply With Quote
Old 12-05-2010, 03:09 PM   #6
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 998
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Hi Iņigo,

Some more tips for getting a quick-start with the menus. You can take a look at ipc.c and menu.c in xournal.
Most of the ipc.c file can be used as is, only the on_prepare_unmount(), on_changed_orientation() and the on_status_item_activated() need some attention and the xournal specific include files.
The menu.c has separate functions to:
- Create the menu (menu_init())
- Settings the text of the menu items (menu_set_text())
- Showing the menu (menu_show(), called from ipc.c-on_window_activated())
- Handling menu selections (menu_on_item_activated(), called from ipc.c - on_menu_item().

The menu.c file also shows how to get icons from the local program directories.

ipc_menu_add_menu( MENU_MAIN, GROUP_BROWSE, GROUP_ACTIONS, GROUP_FILE); is used to add 3 sub-groups to the MENU_MAIN-menu. If you do not need tree groups you can use a NULL-pointer for the unused menus. The unused ones should be at the end (If I remember well). (Note that an older version of ipc.c is used, I believe that more menu-groups can be added in newer versions.)
ipc_menu_show_menu( MENU_MAIN ); shows the MENU_MAIN-menu.

I did not yet experiment with sub-menu-items, so I can not support on that part.

Hope this gives you a quick-start with the dr-menus,
Marcel.
Mackx is offline   Reply With Quote
Old 12-05-2010, 03:26 PM   #7
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 998
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
I forgot to mention that the v1 version gets its own tab (as expected) on the DR1000.
Mackx is offline   Reply With Quote
Old 12-08-2010, 11:01 AM   #8
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 711
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, in love with iRex DR800S. Also a K4NT. Now a Kobo Aura
Menu working

Hi there,

after fighting with ipc.[ch] and techpdf for some hours at night, I deleted all the work and started from scratch using hello-world. Menu is working now.
Code is at r6 in http://bitbucket.org/inigoserna/fbre....12.x/overview

Next step is to dive into FBReader dark waters and write the functionality.

Iņigo
Iņigo is offline   Reply With Quote
Old 12-08-2010, 01:44 PM   #9
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 998
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Hi Iņigo,

I was inspired by you and also started looking at adding a menu to fbreader.0.10.7. I used some code from xournal and had basically reached the same level as you have. (It was late last night so I decided so send you my progress today, seems we have been working on the same thing last night.)

I also looked at how to trigger the real functionality. It seems that ZLApplication::doAction(const std::string &actionId) in \zlibrary\core\src\application\ZLApplication.cpp should do the trick, but I did not have time to try it yet. It is also used by the toolbar and menu code.


Marcel.

(Next step would be to make the fbreader-DR-menu configurable with an xml-file like all the other stuff in fbreader.)
Mackx is offline   Reply With Quote
Old 12-09-2010, 08:44 AM   #10
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 711
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, in love with iRex DR800S. Also a K4NT. Now a Kobo Aura
Quote:
Originally Posted by Mackx View Post
Hi Iņigo,

I was inspired by you and also started looking at adding a menu to fbreader.0.10.7. I used some code from xournal and had basically reached the same level as you have. (It was late last night so I decided so send you my progress today, seems we have been working on the same thing last night.)

I also looked at how to trigger the real functionality. It seems that ZLApplication::doAction(const std::string &actionId) in \zlibrary\core\src\application\ZLApplication.cpp should do the trick, but I did not have time to try it yet. It is also used by the toolbar and menu code.

Marcel.
And the actions definitions are on fbreader/src/fbreader/FBReaderActions.h and fbreader/src/fbreader/FBReaderActionCode.cpp files.

Let's see if I can write the code tonight.

Quote:
Originally Posted by Mackx View Post
(Next step would be to make the fbreader-DR-menu configurable with an xml-file like all the other stuff in fbreader.)
Uhmmm... I don't think it's a good idea... which other actions would you like to appear?

Last edited by Iņigo; 12-09-2010 at 09:07 AM.
Iņigo is offline   Reply With Quote
Old 12-09-2010, 03:33 PM   #11
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 998
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Quote:
Originally Posted by Iņigo View Post
Uhmmm... I don't think it's a good idea... which other actions would you like to appear?
It was not a serious remark, just wanted to keep you busy for any future sleepless nights
Mackx is offline   Reply With Quote
Old 12-09-2010, 04:45 PM   #12
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 711
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, in love with iRex DR800S. Also a K4NT. Now a Kobo Aura
Quote:
Originally Posted by Mackx View Post
It was not a serious remark, just wanted to keep you busy for any future sleepless nights
Well, now I'm fighting against my missing C++ skills...

How could I get a reference of ZLGtkApplicationWindow in menu.cpp?

EDIT: new code

In ZLGtkApplicationWindow:ZLGtkApplicationWindow, I've added:
Code:
menu_init(this);
And in menu.cpp:
Code:
static ZLGtkApplicationWindow *zlgtkappwin;
...
// initialise popup menu
void menu_init ( ZLGtkApplicationWindow *appwin )
{
    ...
    zlgtkappwin = appwin;
...
And finally, in menu.cpp menu_on_item_activated():
Code:
zlgtkappwin.application().doAction("toggleFullscreen");
but it doesn't work. Compiler shows this error:
Code:
Compiling dr-menu.o ...dr-menu.cpp: In function ‘void menu_on_item_activated(const gchar*, const gchar*, const gchar*, const gchar*)’:
dr-menu.cpp:269: error: request for member ‘application’ in ‘zlgtkappwin’, which is of non-class type ‘ZLGtkApplicationWindow*’
Any hint?


EDIT 2: It's compiling now, have to test on the emu ;-)


EDIT 3: It works! It works!
after some silly issues with the linker menu->fullscreen finally works, so the remaining items should be easy...



Iņigo

Last edited by Iņigo; 12-09-2010 at 07:02 PM.
Iņigo is offline   Reply With Quote
Old 12-09-2010, 08:09 PM   #13
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 711
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, in love with iRex DR800S. Also a K4NT. Now a Kobo Aura
Ok, here you have a version of FBReader v0.12.10 with working DR menus

The source code for this package is in the r8 at http://bitbucket.org/inigoserna/fbreader-dr-0.12.x

Please test it and provide feedback.

My plans before the v2 release include:
- some testing, aka real reading session for 1 or 2 hours
- clean code
- study if we add/delete menu items... suggestions?
- make FBReader start in fullscreen mode by default
- ...

once this is completed I'll publish the package in non-devel forum, and mark my previous 0.10.x port as obsolete.

Iņigo
Attached Files
File Type: gz FBReader-0.12.10-dr-v2pre.tar.gz (1.85 MB, 85 views)
Iņigo is offline   Reply With Quote
Old 12-10-2010, 02:34 AM   #14
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 998
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Hi Iņigo,

Great, the menus work fine on my DR1000.

However for me the changed functionality in the FBR 0.12.10 w.r.t. navigating chm-files makes it not yet very usefull. Until now I only used FBR to read chm-files, which could be read using the keys only, with this version I need to use the stylus.
I need to make some time to check how to get a simular 'reading-experience' with this new version.
Mackx is offline   Reply With Quote
Old 12-10-2010, 02:56 AM   #15
fekhner
Addict
fekhner is kind to children and small, furry animalsfekhner is kind to children and small, furry animalsfekhner is kind to children and small, furry animalsfekhner is kind to children and small, furry animalsfekhner is kind to children and small, furry animalsfekhner is kind to children and small, furry animalsfekhner is kind to children and small, furry animalsfekhner is kind to children and small, furry animalsfekhner is kind to children and small, furry animalsfekhner is kind to children and small, furry animalsfekhner is kind to children and small, furry animals
 
Posts: 326
Karma: 6720
Join Date: Sep 2010
Device: DRs, EE, ipad/iphone, Helix
I made a short test on a large chm file that I had problems with before and it seems to work very well on DR1000, it indeed creates its own tab ...
fekhner is offline   Reply With Quote
Reply

Tags
fbreader, v0.12.x

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iLiad uzbl for iLiad (experimental) ericshliao iRex Developer's Corner 5 09-19-2009 01:05 PM
FBReader port to (Lbook|Hanlin) V3 lunohod HanLin eBook 39 06-26-2009 11:18 AM
FBReader OSX Port wallcraft Reading and Management 5 03-19-2009 09:41 AM
PRS-500 FBReader? Is anyone working on a port? delphidb96 Sony Reader Dev Corner 3 07-29-2008 03:08 AM
iLiad FBReader 0.8.1d for iLiad port finished (fixes/new features) Adam B. iRex Developer's Corner 29 04-30-2008 09:23 AM


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


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