07-01-2009, 04:56 PM | #91 |
Guru
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.
|
07-01-2009, 05:33 PM | #92 |
Guru
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. Last edited by ericshliao; 07-01-2009 at 05:37 PM. |
Advert | |
|
07-01-2009, 05:58 PM | #93 |
Guru
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); Code:
g_signal_connect(G_OBJECT(titleBackground), "expose-event", G_CALLBACK(ls_lister_expose_event), NULL); 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; } 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. Last edited by ericshliao; 07-01-2009 at 06:02 PM. |
07-01-2009, 06:10 PM | #94 |
Guru
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. Last edited by ericshliao; 07-01-2009 at 06:24 PM. |
07-04-2009, 11:59 AM | #95 | |
JSR FFD2
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
|
Quote:
|
|
Advert | |
|
09-17-2009, 07:53 PM | #96 |
"Assume a can opener..."
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?
|
09-19-2009, 04:19 AM | #97 |
JSR FFD2
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... |
10-23-2009, 10:07 PM | #98 |
Guru
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. |
12-02-2009, 07:44 AM | #99 | |
Junior Member
Posts: 2
Karma: 10
Join Date: Feb 2009
Device: iliad
|
Quote:
I've 2.12 not 2.11. Last edited by habell; 12-02-2009 at 07:51 AM. |
|
12-04-2009, 02:26 AM | #100 |
JSR FFD2
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
|
Hi Habell,
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... |
04-18-2010, 10:35 PM | #101 |
iRex iLiad enthusiast
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...!
|
Tags |
contenlister, development, iliad, newlister |
|
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 |