12-04-2010, 07:41 AM | #1 |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
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 Last edited by Iņigo; 12-04-2010 at 12:21 PM. |
12-04-2010, 12:13 PM | #2 |
Guru
Posts: 999
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. |
Advert | |
|
12-04-2010, 12:32 PM | #3 | |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
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="<DownArrow>"/> <option name="Key1" value="<PageDown>"/> <option name="Key2" value="<PageUp>"/> <option name="Key3" value="<UpArrow>"/> <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 |
|
12-05-2010, 03:11 PM | #5 | |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
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 |
|
Advert | |
|
12-05-2010, 04:09 PM | #6 |
Guru
Posts: 999
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. |
12-05-2010, 04:26 PM | #7 |
Guru
Posts: 999
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.
|
12-08-2010, 12:01 PM | #8 |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
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 |
12-08-2010, 02:44 PM | #9 |
Guru
Posts: 999
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.) |
12-09-2010, 09:44 AM | #10 | |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
Let's see if I can write the code tonight. 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 10:07 AM. |
|
12-09-2010, 04:33 PM | #11 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
|
12-09-2010, 05:45 PM | #12 | |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
How could I get a reference of ZLGtkApplicationWindow in menu.cpp? EDIT: new code In ZLGtkApplicationWindow:ZLGtkApplicationWindow, I've added: Code:
menu_init(this); Code:
static ZLGtkApplicationWindow *zlgtkappwin; ... // initialise popup menu void menu_init ( ZLGtkApplicationWindow *appwin ) { ... zlgtkappwin = appwin; ... Code:
zlgtkappwin.application().doAction("toggleFullscreen"); 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* 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 08:02 PM. |
|
12-09-2010, 09:09 PM | #13 |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
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 |
12-10-2010, 03:34 AM | #14 |
Guru
Posts: 999
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. |
12-10-2010, 03:56 AM | #15 |
Addict
Posts: 326
Karma: 6908
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 ...
|
Tags |
fbreader, v0.12.x |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
iLiad uzbl for iLiad (experimental) | ericshliao | iRex Developer's Corner | 5 | 09-19-2009 02:05 PM |
FBReader port to (Lbook|Hanlin) V3 | lunohod | HanLin eBook | 39 | 06-26-2009 12:18 PM |
FBReader OSX Port | wallcraft | Reading and Management | 5 | 03-19-2009 10:41 AM |
PRS-500 FBReader? Is anyone working on a port? | delphidb96 | Sony Reader Dev Corner | 3 | 07-29-2008 04:08 AM |
iLiad FBReader 0.8.1d for iLiad port finished (fixes/new features) | Adam B. | iRex Developer's Corner | 29 | 04-30-2008 10:23 AM |