02-11-2009, 10:47 PM | #1 |
Grumpy Old Man
Posts: 267
Karma: 30194
Join Date: Jul 2006
Location: L.A., Euro ex-pat
Device: Kobo, Nook Classic,Color,ST/Glow, iRex DR1000, Sony 505, REB1100&1200
|
Leafpad Text editor
This may have flown a bit under the radar, but in light of the dearth of DR1000 apps (*) at this point:
UtterInanity has posted a port of the Leafpad text editor in the iRex DR1000 Developer forum! It has optional line numbering, word wrap etc., and UtterInanity has already adressed a couple of issues. I think this is a useful addition, an din part the reason for my renewed request for a visually improved on-screen keyboard. (*) Of course, the ones that are available (like FBReader and now Leafpad) are very worthwhile! |
04-12-2009, 12:27 PM | #2 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
(I wanted to react on the iRex forum, but they do not allow attachements, so I post it here)
I finally had some time to add an icon to the toolbar when running leafpad. This allows you to switch to other programs and switch back to leafpad again. I had some problems with the makefiles (autoreconf to be more specific), so I modified the Makefile directly... (If someone knows how to fix this please let me know.) I reused a small part of the ipc.c file from helloworld to signal that the app has started. This will add the icon in the taskbar and allow you to switch back to leafpad. (I had to include the ipc.c file in main.c because of the problems with autoreconf that I had.) (If you want to test the new code on the emulator, be sure to start the application from UDS, so via a .desktop-file, otherwise the icon will not show up) Since the patched code with the 'Close Keyboard'-button is not published, I publish my change and hope that UtterInanity will add these changes to his version with the button. The attached file contains the added ipc.c and ipc.h, the manually changed src/Makefile and the modified main.c. The same trick can also be applied to other programs that are ported to the DR. I also included the build leafpad application, but be carefull, this is without the Close Keyboard patch. |
Advert | |
|
04-13-2009, 09:47 PM | #3 |
Member
Posts: 24
Karma: 58
Join Date: Aug 2008
Device: Sony PRS-505, iRex DR1000S
|
Unfortunately, I managed to completely botch my VMWare environment to the point where it won't even boot any more. This means I can't get to the patch any more. However, it was literally one (maybe two) lines of code. Something like GtkButton* closeKeyboard = gtk_button_new_with_label("Close Keyboard"); but don't quote me on that.
And then I just stuck it in after the text box. It doesn't actually do anything, there's no other code linked to it. I might try adding it in again, if I get around to downloading the VMWare image again (or fixing the one I have... anybody know how to boot to the terminal? It's actually just the XServer that's screwed up.) |
04-14-2009, 02:34 AM | #4 | |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Quote:
Anyway, I did something simular as you described with the button, and (as I described in an other thread) when you give is focus when closing the app (i.e. call gtk_widget_grab_focus() in on_file_quit()-function) the keyboard will close automatically. It is still a little clumsy, but at least you can not forget to close the keyboard. I will see if I can find some time to do the change and post it here. |
|
04-21-2009, 01:21 PM | #5 |
Member
Posts: 10
Karma: 45
Join Date: Apr 2009
Device: DR1000S
|
I added Leafpad to the DR software wiki:
https://wiki.mobileread.com/wiki/Digital_Reader_Software |
Advert | |
|
04-22-2009, 03:04 PM | #6 | |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Quote:
Two enhancements compared to the pervious port: 1) An icon is now shown in the Task Manager of the DR menu. 2) The keybord is now removed when closing the program |
|
07-25-2009, 09:56 AM | #7 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
New file dialog
I am not sure how much this program is used, but I recompiled it so that it now uses gtk_file_selection i.s.o. gtk_file_chooser. Two advantages, the dialog is much bigger and it allows you to create directories, which is usefull for 'this kind of' editors.
Note that this is a dangerous tool and you should not start editing system files!! Unzip file on your SD card. |
07-25-2009, 04:11 PM | #8 |
Addict
Posts: 234
Karma: 214
Join Date: Nov 2008
Device: Galaxy Note 3, Galaxy NotePro 12.2, InkBook
|
Great job. Thanks, Mackx!
|
07-26-2009, 04:41 AM | #9 |
Member
Posts: 10
Karma: 10
Join Date: Feb 2009
Device: dr1000s
|
Many thanks!!!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Beaver -a lightweight text/src editor | yokos | iRex | 8 | 06-11-2010 11:13 PM |
Onyx Text Editor? | Risto | Andere Lesegeräte | 1 | 05-25-2010 05:34 AM |
Text Editor Problem | crutledge | Sigil | 2 | 08-10-2009 10:12 AM |
iLiad as a text editor | Capodasello | Introduce Yourself | 7 | 12-02-2007 08:43 AM |
iLiad Text editor/WP on iLiad? | nekokami | iRex Developer's Corner | 38 | 03-05-2007 03:14 PM |