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 06-27-2009, 10:33 AM   #1
istudy
Member
istudy began at the beginning.
 
Posts: 10
Karma: 14
Join Date: Dec 2008
Location: China
Device: irex iliad
one more function for new contentlister

Hi all,
I just add a little function to hansel's new contentlister, I add three icon to the toolbar in the main windows at bottom of toolbar near left side three function search/sort/share, the three icon from left to right are implement with:
up one directory when browse in content lister
up to the root directory when browse content lister
shutdown iliad

I just compile it a few month ago, and it modified based on hansel first version contentlister, I don't know whether it will work or brick your iliad after hansel's 1.0.5 version, so install at your own risk.
how to install:
1.you need install hansel 1.0.4 version new contentlister first.
2.untar the package
3.copy all the icon inside the icon folder to /usr/share/pixmaps
4.copy liberipc.so.0.2.0 to /usr/lib/ and check the file permission with 755, important: you need confirm that after copy the old soft link liberipc.so.0 are link to my version of liberipc.so.0.2.0, it should be overwrite with mine, or the new contentlister won't take effect. I just find it still link to the old liberipc.so.0.2.0 after restart, so I decide overwrite the link liberipc.so.0 with the liberipc.so.0.2.0, actually iliad use liberipc.so.0 to work
5.copy newLister to /usr/lib/ overwrite the original one and check the file permission with 755.
6.copy toolbar.xml to /etc/registry/ overwrite the original one.
pls ensure you backup every file that will be overwrite.
My iliad is chinese version, I don't know whether it work or not with european version, but I think it should work, because it modified based on hansel 1.0.1 version.
The attach is screen shot and the file used and the source I modifed.
Try and report here if sucesss or not, then other people can known whether it's useful or not.
With the ipdf/fbreader0.10.2/contentlister that I compiled, I can read doc without press key after power on, everything can be finish with pen.

istudy
Attached Thumbnails
Click image for larger version

Name:	iLiad_531103_085655.png
Views:	254
Size:	37.3 KB
ID:	31258  
Attached Files
File Type: rar contentlist.rar (107.7 KB, 157 views)
File Type: gz liberipc20090627.tar.gz (706.7 KB, 159 views)
File Type: gz newLister20090627.tar.gz (1.53 MB, 169 views)
istudy is offline   Reply With Quote
Old 06-27-2009, 11:01 AM   #2
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Good job.
The original contentlister does offer an inconsistent design that users have to push buttons to go up one level or go back to top-menu. Your effort bridged the in-consistency.
Ideally, I prefer a configurable top-menu that I can add my own shell script action to top-menu. But it's not a easy task.

Last edited by ericshliao; 06-27-2009 at 11:12 AM.
ericshliao is offline   Reply With Quote
Old 06-27-2009, 12:55 PM   #3
zerospinboson
"Assume a can opener..."
zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.
 
zerospinboson's Avatar
 
Posts: 745
Karma: 1001705
Join Date: Mar 2008
Location: Local Cluster
Device: iLiad v2, DR1000
you really shouldn't let your battery run down that far, though.. it'll shorten its shelf life
zerospinboson is offline   Reply With Quote
Old 06-28-2009, 04:56 AM   #4
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by zerospinboson View Post
you really shouldn't let your battery run down that far, though.. it'll shorten its shelf life
Well, it's bit of off-topic. But I am curious about this issue.
Is it real? Do you have any evidence or reliable info to support such saying? Most of the time, I use my iLiad until the battery icon turns to total white. It's been more than 18 months. Maybe it takes some more time for my iLiad to encounter its destiny.

I know that charging and dis-charging will cause the battery to expand and shrink a little bit. But under normal circumstances, the change in size should be within the tolerable limitation of the specification.

Last edited by ericshliao; 06-28-2009 at 05:15 AM.
ericshliao is offline   Reply With Quote
Old 06-28-2009, 07:39 AM   #5
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
To istudy:
Is it possible to make the top-most black bar clickable? In contrast to using toolbar button to naviagte, I think it should be more reasonable to use the top-most black bar to go up one level and go back to root menu.
ericshliao is offline   Reply With Quote
Old 06-28-2009, 08:22 AM   #6
zerospinboson
"Assume a can opener..."
zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.
 
zerospinboson's Avatar
 
Posts: 745
Karma: 1001705
Join Date: Mar 2008
Location: Local Cluster
Device: iLiad v2, DR1000
Quote:
Originally Posted by ericshliao View Post
Well, it's bit of off-topic. But I am curious about this issue.
Is it real? Do you have any evidence or reliable info to support such saying? Most of the time, I use my iLiad until the battery icon turns to total white. It's been more than 18 months. Maybe it takes some more time for my iLiad to encounter its destiny.

I know that charging and dis-charging will cause the battery to expand and shrink a little bit. But under normal circumstances, the change in size should be within the tolerable limitation of the specification.
It is supposedly a feature of Li-Ion that they have a maximum number of Recharge cycles (I believe something like 500), after which they will have deteriorated beyond a useful charge. If you search the forums (I'm afraid I'm a bit too busy to look up the actual threads) you'll see this being confirmed by different people. Anyway, the upshot should be that if you recharge the battery every time it reaches, say, 50%, you should be doubling the effective lifetime of the battery.
zerospinboson is offline   Reply With Quote
Old 06-28-2009, 11:10 PM   #7
istudy
Member
istudy began at the beginning.
 
Posts: 10
Karma: 14
Join Date: Dec 2008
Location: China
Device: irex iliad
to ericshliao:
I have the same idear for implement icon to execute scripts, but I don't know how to do it. I think it's doable so I write down the code that been modified, it's relative easy, hope someone can get it and make a better contentlister.
1. in liberipc/src/eripctoolbar.c add the icon map in function iconMap_t g_icon_map_table[] like this:
{iconID_uplevel, "uplevel"},
{iconID_upmostlevel, "upmostlevel"},
{iconID_shutdown, "shutdown"}
2. in liberipc/include/eripctoolbar.h add the iconID to enum e_iconID_t like this:
iconID_uplevel,
iconID_upmostlevel ,
iconID_shutdown
3. in newLister/src/control.cpp add the action been triggered when click the icon like this:
case iconID_uplevel:
CL_LOGPRINTF("OVERVIEW_BUTTON");
pm_SendKey(GDK_F5);
break;
case iconID_upmostlevel:
CL_LOGPRINTF("OVERVIEW_BUTTON LONG");
pm_SendKey(GDK_Home);
break;
case iconID_shutdown:

ctrl_shutdown();
break;
the function or script been called should be handled here.
4. in newLister/src/toolbar.c add the toolbar icon like this:
tbAppendPlatformIcon( toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_uplevel, ccClToolbarIcon);
tbSetStatePlatformIcon(toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_uplevel, iconState_normal );

tbAppendPlatformIcon( toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_upmostlevel, ccClToolbarIcon);
tbSetStatePlatformIcon(toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_upmostlevel, iconState_normal );

tbAppendPlatformIcon( toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_shutdown, ccClToolbarIcon);
tbSetStatePlatformIcon(toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_shutdown, iconState_normal );
5. copy the icon picture to /usr/share/pixmaps/ folder, for my version, I copyed uplevel.png/upmostlevel.png/shutdown.png total 9 files to this folder (see from the tarball), maybe just this three does work.
6. add the name of icon to the toolsbar.xml like this:
<toolbarIcon name="uplevel">
<iconFileName id="1">uplevel.png</iconFileName>
<iconFileName id="2">uplevel_grey.png</iconFileName>
<iconFileName id="3">uplevel_selected.png</iconFileName>
</toolbarIcon>
add copy it to /etc/registry/ overwrite the original one.
Cause I compile it a few month ago, I just remember above step to change, so pls be carefully do it when you use it. I suggest you that when you want to use the new contentlister, pls add some code at /home/root/startup.sh to change back to use original contentLister every time you boot up and manully change it to the new one after you test in case this one have problem, when you confirm the new one have no problem, you can safely remove the code that switch to old original contentLister.
I switch for more than five times to get the new contentlister to function normally. For the liberipc.so.0.2, I think it's safe to overwrite because it just add the icon to toolbar, nothing else.
For the top-most black bar clickable problem, I don't know, maybe hansel can tell.
istudy is offline   Reply With Quote
Old 06-29-2009, 05:15 AM   #8
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
I just browsed source code of newlister. I guess that the the top-most black bar is "*titleItem" declared as a GtkWidget in lister.h, just as other items:
Code:
typedef struct
{
    GtkWidget *titleItem;
    GtkWidget *titleLocation;      // display location information
    GtkWidget *listItems[MAX_ITEMS_ON_ONE_PAGE];
} lsLister_t;
With istudy's above info, it should "not" be tough to make titleItem event-aware. I will give it a try.

Last edited by ericshliao; 06-29-2009 at 05:36 AM.
ericshliao is offline   Reply With Quote
Old 06-29-2009, 06:30 AM   #9
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
I think that the top-most black bar is composed by two GtkLabels: titleItem (the left part) and titleLocation (the right part). So, I can make they responsive to click-event by adding two lines in lister.cpp:
Code:
g_signal_connect(G_OBJECT(g_lister.titleItem), "button_press_event",
    G_CALLBACK(ls_titleItem_press_event), data);
Code:
g_signal_connect(G_OBJECT(g_lister.titleLocation), "button_press_event",
    G_CALLBACK(ls_titleLocation_press_event), data);
and creating two functions: ls_titleItem_press_event() and ls_titleLocation_press_event() to control goto top-menu and go up one level.

Last edited by ericshliao; 06-29-2009 at 10:34 AM.
ericshliao is offline   Reply With Quote
Old 06-29-2009, 10:31 AM   #10
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 ericshliao View Post
Well, it's bit of off-topic. But I am curious about this issue.
Is it real? Do you have any evidence or reliable info to support such saying?
Yes, it's real. The iLiad contains a Lithium-ion battery. Standard "best practices" for that type of battery is to "top it off" rather than let it fully discharge. Large charge/discharge cycles are worse for the battery than frequent small charges.

I usually like to recharge mine with it gets around halfway, if it's convenient.
Shaggy is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iLiad Better contentLister rudysplif iRex Developer's Corner 5 11-26-2008 11:11 PM
contentLister not starting :( thetechnobear iRex 2 12-02-2007 12:59 PM
iLiad Understanding the ContentLister jharker iRex Developer's Corner 3 08-19-2007 12:57 AM
iLiad Replacing the contentlister tribble iRex Developer's Corner 21 06-22-2007 03:58 PM
iLiad Contentlister Enhancement scotty1024 iRex Developer's Corner 22 12-15-2006 06:29 PM


All times are GMT -4. The time now is 03:06 AM.


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