Read Me
Copyright (C)2010 IonIdea Ukraine
Email ice.ngh@ionidea.com
http://ionidea.ua/nghost
Table of contents:
1. Features
2. Applying the patch
3. Usage
1. Features.
This patch implements new listbox with ability to display filesystem contents without using nScan-populated database, history stack and support for "back" and "home" actions.
2. Applying the patch.
Instruction assumes the patch is being applied to the following SVN revisions of sources:
-libnghost: revision 2049
-nghost: revision 2049
Check out libnghost and nghost sources, ending up with two directories: 'libnghost' and 'trunk'
Place the .diff files extracted from the patch archive to the source root directory
Run the apply_patch script like 'sh < apply_patch.sh'
In case of successfull patching, continue build process as usual, following nghost build instructions (running autogen.sh scripts, configure, make all install etc )
3. Usage
New filesystem listboxes can be added to the skin XML screens as in following example:
<item>
<name>list_box_name</name>
<type>fslistbox</type>
<xcords>100</xcords>
<ycords>200</ycords>
<area_x>3</area_x>
<area_y>3</area_y>
<area_width>-3</area_width>
<area_height>-3</area_height>
<dir>$music</dir>
<file_type>$audioextensions</file_type>
<path>images/media_list_background.png</path>
<action type="media">null playList "%this%" "%pos%"</action>
</item>
FS listbox supports following options:
<dir> - root directory to search for files, regular filesystem path of config variables can be used ( i.e. /home/foo/music or $music )
<file_type> - extensions of files to search for, standart syntax or config variable should be used ( i.e. mp3|flac|ogg or $audioextensions )
New actions:
populateWithDir - populates the listbox with contents of given directory
lastDir - populates the listbox with previous path in history stack, removes current path from history stack
resetDir - populates the listbox with path from the <dir> option, flushes the history stack
examples:
<action type="listbox">media_list_box populateWithDir "/tmp"</action>
<action type="listbox">media_list_box resetDir</action>
<action type="listbox">media_list_box lastDir</action>