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 07-01-2009, 04:56 PM   #91
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: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Well, I have a partial success now. Basically, the idea of clickable titlebar is implementable, but still further work is required to remove several obstacles. Some of the obstacles are GTK+-related, and some are specifically related to contentlister and iLiad.
ericshliao is offline   Reply With Quote
Old 07-01-2009, 05:33 PM   #92
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: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
The attachment is a modded newLister 1.0.5 binary file. It will make the top-most black title bar clickable. Clicking on the title bar will execute same action as pughing GO-UP button (the top-left button on iLiad). It is achieveved by adding less than 10 lines of code.
Currently, only go-up one level is implemented. I guess go back to top menu (same as pushing MODE button) can be done by adding another 10 less lines of code. I will put the diff file after it's finished.
If anybody want to try it, be sure to install hansel's newLister 1.0.5 beforehand. Then unpack the attached package and put "newLister" in /usr/bin to replace the original one. Don't forget to chmod 755.
Attached Files
File Type: zip newLister.mod.zip (94.9 KB, 515 views)

Last edited by ericshliao; 07-01-2009 at 05:37 PM.
ericshliao is offline   Reply With Quote
Old 07-01-2009, 05:58 PM   #93
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: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
This is a fully working newLister with clickable titlebar.
Clicking on the left half of titlebar will go back to top-menu, and clicking on the right half will go up one level.
The attachment is the binary file. Install as I described in the previous post.

Because the code is too simple, diff file is not needed. I just put my code here:

in "lister.c", add a line:
Code:
g_signal_connect(G_OBJECT(titleBackground), "button_press_event",
    G_CALLBACK(ls_titlebar_press_event), NULL);
just before (or after) the line:
Code:
g_signal_connect(G_OBJECT(titleBackground), "expose-event", G_CALLBACK(ls_lister_expose_event), NULL);
And add the function call:
Code:
gboolean ls_titlebar_press_event(GtkWidget * widget, GdkEventButton * event, gpointer data)
{
	int x = (int) ((GdkEvent*)event)->button.x_root;
	if(x>=768/2){
		CL_LOGPRINTF("OVERVIEW_BUTTON LONG");
		pm_SendKey(GDK_Home);
	}else{
		CL_LOGPRINTF("OVERVIEW_BUTTON");
        	pm_SendKey(GDK_F5);
	}
	return FALSE;
}
Note:
When you click on the title bar, LED won't flash. To make LED falsh just as we push MODE button and OVERVIEW button, some more code is needed.
Attached Files
File Type: zip newLister.mod.zip (94.9 KB, 462 views)

Last edited by ericshliao; 07-01-2009 at 06:02 PM.
ericshliao is offline   Reply With Quote
Old 07-01-2009, 06:10 PM   #94
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: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Ah, there is a small mistake, "if(x>=768/2){" should be "if(x<=768/2){". The difference is that left and right part of titlebar are switched.
Here is the the corrected binary. I seems somehow got confused. You can try both of them.

Added:
Ideally, clicking on the left half will goto top-menu, but in fact there is some slight discrepency. For example, suppose I am under /MMC/books/test, clicking on the left half will take me to /MMC. In /MMC, clicking on the right half will take me to top-menu.
Agian, suppose I am under /MMC/books/test, clicking on the right half will take me to /MMC/books.
Hope the description is clear for you to understand.
Attached Files
File Type: zip newLister.mod.zip (94.9 KB, 534 views)

Last edited by ericshliao; 07-01-2009 at 06:24 PM.
ericshliao is offline   Reply With Quote
Old 07-04-2009, 11:59 AM   #95
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Quote:
Originally Posted by ericshliao View Post
It's all right. I will compile it after upgrading my desktop Linux kernel. Wish you find a nice display to replace the broken one.
I bought a nice new laptop. A dual-core thing with a beautiful 17" display. Ubuntu 9.4 is running, it's on-line, and I'm able to cross-compile newLister again :-) A good occasion for a clean start... I kept notes on my personal wiki for next time http://www.hpelbers.org/iliad/cross_compiling
hansel is offline   Reply With Quote
Old 09-17-2009, 07:53 PM   #96
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: 755
Karma: 1942109
Join Date: Mar 2008
Location: Local Cluster
Device: iLiad v2, DR1000
am I correct in assuming the contentlister buffers/loads/reads every entry in a directory before generating the list page? Because it seems a lot faster when there are fewer files in the directory than when there are many. And is it really necessary that it does this?
zerospinboson is offline   Reply With Quote
Old 09-19-2009, 04:19 AM   #97
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
I think that your statement is correct. With lots of docs in one directory it may get slower (all the manifest files are read)...

I believe it would require smart (complex) code to cache this (it would need to detect changes).

I think the best approach is to organize the docs in several subdirs...
hansel is offline   Reply With Quote
Old 10-23-2009, 10:07 PM   #98
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: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
For people's reference, we can change the font displayed on newLister by modifying "/usr/share/contentlister/newLister.rc".

The default BitStream Vera Sans is nice, but it's not enough for multi-lingual text, especially for eastern Asia languages. I have set newLister on my iLiad use some commercial font. It will guarantee that all text dispalyed on nweLister are using the same style of font.

To pick which font to be used, run "fc-list" in console to get the font list installed on your iLiad.

Added:
I thought I should be able to assign font to be used on newLister by modifying "/home/root/.font.config", but I didn't get success in the end.

Last edited by ericshliao; 10-23-2009 at 11:16 PM.
ericshliao is offline   Reply With Quote
Old 12-02-2009, 07:44 AM   #99
habell
Junior Member
habell began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2009
Device: iliad
Quote:
Originally Posted by hansel View Post
Hello Habell,

You need to get shell access for your iLiad in order to install 3rd party applications.
See: https://wiki.mobileread.com/wiki/Iliad_shell_access
Good luck!
Hmmm, I have shell access. That's not it. Could it be the version?
I've 2.12 not 2.11.

Last edited by habell; 12-02-2009 at 07:51 AM.
habell is offline   Reply With Quote
Old 12-04-2009, 02:26 AM   #100
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Hi Habell,

Quote:
Originally Posted by habell View Post
Hmmm, I have shell access. That's not it. Could it be the version?
I've 2.12 not 2.11.
Newlister works with 2.12 (and 2.12.1). The only issue I that comes to mind is a modified start script... did you modify the original start.sh? If so: read the remarks in message 1 and 53 (and further). if not I'm clueless...
hansel is offline   Reply With Quote
Old 04-18-2010, 10:35 PM   #101
stevetuf
iRex iLiad enthusiast
stevetuf began at the beginning.
 
stevetuf's Avatar
 
Posts: 14
Karma: 10
Join Date: Oct 2009
Location: Valencia, CA
Device: iRex iLiad
Finally got it working! I have no idea why it was so hard. Something stuck before.... but thanks Hansel! It is great. I am really pleased it's there now...!
stevetuf is offline   Reply With Quote
Reply

Tags
contenlister, development, iliad, newlister


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DX: Contrast has Been Improved ny10522 Amazon Kindle 3 06-15-2009 02:46 AM
Has E-ink improved? Kilarney Which one should I buy? 4 03-14-2009 07:01 PM
NewLister 1.0.1: Improved contenLister, more items on a page hansel iRex 9 02-13-2009 05:24 AM
txt2lrf - New and Improved kovidgoyal LRF 42 02-10-2009 07:41 AM
iLiad Wiki, Software documentation, contenLister hansel iRex Developer's Corner 1 12-09-2008 06:34 PM


All times are GMT -4. The time now is 01:33 PM.


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