Help - Search - Members - Calendar
Full Version: Zaurus Port Of Treeline
OESF Forums > General Forums > General Support and Discussion > Software
zenyatta
Hi all,

I started working on a Zaurus port of the fine TreeLine outliner early last year but later got distracted. I haven't touched it in about 7 months now and it isn't really ready for a release but I do use it daily and absolutely can't do without it, despite the bugs. As I have trouble finding the time to finish it, I have decided to release it in its crude present state. Either someone will pick it up or enough users will find it promising enough to nag me into activity rolleyes.gif Or maybe it won't interest anyone, which is fine. In any case, it is there, on my homepage.

Cheers,
z.
caunt
Hi Zenyatta,

Looks interesting...thanks for making it available! I'll check it out.
g333
That looks cool. Maybe you could help me too.

I would like a shortcut key added to the dictionary on the SL-C3000. One that deletes the text in the box when focusing.
zenyatta
QUOTE(g333 @ Apr 2 2005, 01:24 AM)
I would like a shortcut key added to the dictionary on the SL-C3000. One that deletes the text in the box when focusing.

If I understand you correctly, you want to press a shortcut to erase the entire currently edited text? It's possible but a little complicated:

A problem with shortcuts is that they conflict with things you may want to type into the edited area (for example, "Shift+S" equals not just File > Save but also capital "S"). This would also be a problem if we used the Fn key for shortcuts ("Fn+S" equals "@").

Therefore, all shortcuts are disabled during text editing. Excluding one shortcut from this rule is possible, although a bit cumbersome. The thing is, can you find a shortcut that wouldn't interfere with your typing? If you can just let us know and I will write a patch.

I'm currently without a Zaurus (I lost my beloved SL-5500 if you can believe that) so there is a little problem with testing. But this is a relatively minor change, I could even get it right the first time rolleyes.gif

Cheers,
z.

P.S. Of course, C3000 probably has a third meta key which would make the whole thing much more feasible. If anyone feels like donating or lending a specimen feel free to contact me biggrin.gif
g333
At the moment when I press Q button the program focuses on the text box. If there was a focus and select the text in the box it would be so much better.

I can make stuff like this with JavaScript but dont know how to make Zaurus software yet.

CODE
var fieldcounter = 0;
function keyDown(DnEvents) {
 var k = window.event.keyCode;
 switch (k) {
   case 16: //shift
     positionCursorAtEnd(document.form1.t1);
     break;  
   case 17: //ctrl
     document.form1.t1.select();
     break;
    case 38: //up
  document.form1.candidates.focus();
  break;
    case 40: //down
  document.form1.candidates.focus();
 // if (selected == false {
    //  selected == true);}
  //setElementValue(document.forms['form1']['candidates'].mySelect, 0);
  //document.form1.candidates.focus();
  break;
    
 }
}


What is the difference? And how would I do this? I might be able to write the code and then get someone to put it together.
zenyatta
If you simply want to select all text in a text box when it gains focus, that should be doable. You probably need to create a focusEvent() handler in classes that extend QMultiLineEdit or QTextEdit.

Cheers,
z.
Flandry
Thanks for your work on porting, and for bringing this program to my attention. This looks like a neat program, but may i ask if anyone knows how functional it is on Z (particularly the clamshells), and how fast? Specifically, is it slow when the number of nodes gets large? The spreadsheet can be annoyingly slow, so i'm looking for svelte in new apps. smile.gif

I'm looking for a decent replacement for the notepad PIM app on the Palm, and although this doesn't allow handwritten doodling, it does allow internal links and tree structure, something which i often found a need for with notes on the Palm. So perhaps this is the missing link in the K/pi PIM suite. Is that more or less how you use it?
zenyatta
QUOTE(Flandry @ Apr 5 2005, 08:25 PM)
Thanks for your work on porting, and for bringing this program to my attention.  This looks like a neat program, but may i ask if anyone knows how functional it is on Z (particularly the clamshells), and how fast?  Specifically, is it slow when the number of nodes gets large?  The spreadsheet can be annoyingly slow, so i'm looking for svelte in new apps. smile.gif

My .trl files come in at around 50 nodes each and responses are perfectly swift. There is one exception, though. If I have a node with lots of children, I select the node and switch to the Editor tab, it takes a few seconds for the view to appear (this is because a relatively complex widget tree is being built on-the-fly). A workaround is to switch off View > Selection w/ children.

Another thing is start-up time (up to 10 seconds on my 5500) so I like to keep TreeLine open at all times and use the Home button to "minimize" it. Start-up time would definitely improve if we got TreeLine to work with python-quicklauncher (not sure how python-quicklauncher itself is progressing, Mickeyl should know).

QUOTE
I'm looking for a decent replacement for the notepad PIM app on the Palm, and although this doesn't allow handwritten doodling, it does allow internal links and tree structure, something which i often found a need for with notes on the Palm.  So perhaps this is the missing link in the K/pi PIM suite.  Is that more or less how you use it?

I keep most of my information in node names and the tree structure. It allows me to quickly zoom in on what I'm after. I have little need for rich data (such as doodles cool.gif ) within the node itself. Having said that, you should get familiar with the current desktop version of TreeLine (0.11.1), see which features you would like to have in the Zaurus port and then voice it somewhere around here. A plug-in infrastructure has been in place in TreeLine since 0.10.0 so maybe it wouldn't be too hard to write a doodling plug-in if you desire. You can also sign up to the treeline-users mailing list and ask whether anyone is working on something along those lines.

My own distant plans include developing a plug-in that would let me connect to a SQL database and browse self-referencing tables as trees (with TreeLine data types dynamically generated from table structure etc.).

Cheers,
z.
zenyatta
One more note regarding clamshell use: you want to contact user fpp, he has run my port on a 760 and there seem to be only minor glitches (like maximized dialogs, needlessly narrow dialogs etc.). As for speed, I'm sure it's better than on the 5500 smile.gif

Cheers,
z.
fpp
Thanks zenyatta :-)

Okay, so to better share the info and avoid repeating things in private, I'll play around some more with the Treeline that's on my Z and summarize what I find worthwhile here in this thread -- hopefully, within the next couple of days...
fp
fpp
Right, so here we go...

I will post this by installments, one post at a time - not for suspense, but because I find it tiring to type long texts in these ridiculous web form textareas. Probably make it easier to read, too.

Episode 1 - As an intro, I should probably mention something that may not be evident to all readers, as this is in the Software forum : Treeline is an app written in the python language.

Python is an interpreted language, not compiled like C or C++, so to run apps written in it you need to have the python interpreter installed. Also, Treeline is a graphical app, and to make use of the Z's QTopia interface it needs a special library, PyQt, to access it from python code.

If you're not already a Python user, and have enough memory available on your Z (SD/CF), the simplest way to acquire these is to use the ready-made image by Kopsis : it will cost you about 50 megs of space, but is really easy to install and gets you everything you need (and more :-) all in one go.

If you're low on resources, you can install just the relevant bits with traditional IPKs, either from Riverbank's ports (the makers of PyQt), or mickeyl's arm-python distribution. All the relevant links can be found in a couple of threads over in the Python forum.

For tinkerers who would like to hack the code and improve zenyatta's port, they will need to know or learn three things :

- the python language itself,

- Qt's way if building GUI apps and its API (through PyQt),

- the particular quirks and limitations of QPE, the variant/subset of Qt used by Sharp to create Qtopia.
fpp
Episode 2 - Installation

Here, early on, is where most users of the original Sharp ROMs, and compatible derivatives (like the excellent Cacko ROMs), will encounter a problem.

Zenyatta built his treeline_0.8.1_arm.ipk in an OpenZaurus environment, which is almost, but not quite, totally unlike Sharp's. In particular, they both call their packages IPKs but have different ideas of what should be inside.

Sharp's IPKs are really renamed .tgz files (TAR archives compressed with gzip).
OZ compresses with the 'ar' program instead of gzip, so Sharp's installer refuses to handle those packages. Note: mickeyl's arm-python packages pose the same vexing problem to non-OZ users.

So what to do ?

One way is to upgrade your original package manager : somewhere in the ZUG feed you will find a replacement to ipkg (both graphical and command-line) that supposedly handles both formats equally well (I don't doubt it, but I haven't tried).

Another quick-n-dirty way, if you're not afraid of the Linux shell and the command-line, is to open the console, and uncompress your treeline_0.8.1_arm.ipk with 'ar', then untar the resulting file. This will yield three files, one - the biggest - called data.tgz. If you gunzip/untar this one, you get a directory tree starting with 'opt' and containing all the needed files for Treeline, so it's just a matter of copying this to / (as root), and it should work.

Note 1 : using this method I do get a TreeLine icon in the Apps tab after rebooting Qtopia, but it doesn't work. For now I just open the console and run 'treelinelauncher'.

Note 2 : when doing this you may see that the program complains at startup that something is amiss with Unicode, and please RTFM. The README says to copy the sitecustomize.py file from the source directory to the site-packages directory in your Python installation. When you do this, the message goes away. But the icon still doesn't work wink.gif

In the screenshot below you also see error messages (tracebacks in python) printed when you select some menu items that don't work on the Z. Contrary to VB or othe languages, the app just trudges on regardless :-)

Click to view attachment
fpp
Episode 3 - Look Ma ! It runs !

Here is the main window, empty.

It looks just fine as a screenshot here, but believe me, on the Z those letters and icons are *SMALL*... yes... smaller than usual, even smile.gif

Click to view attachment
fpp
Episode 4 - the General Options dialog

This is where the origins of zenyatta's port show through (QVGA, portrait).

The results on a landscape VGA, obviously, look a little lopsided... but still perfectly workable :-)

Click to view attachmentClick to view attachment
fpp
Episode 5 - the File Options dialog

A little sparse, perhaps, but it works too, and you can't miss the buttons ! smile.gif
Click to view attachment
fpp
Episode 6 - A real problem...

The only thing I've found that is not workable on the Z is the "Configure Data Types" dialog in its present state.

The top and bottom parts are off-screen, along with a couple of fields and the OK/Cancel buttons...

On my 760 the Cancel button on the keyboard dismisses the dialog, but the OK button does not validate it. So as far as I can tell, you can't *define* a new record type directly on the Zaurus version.

Of course, you can run the app on your desktop PC too (Windows/Linux), so you can organize your data types there, then copy over the .trl file(s), so that doesn't mean you can't put treeline to good use on the Z !

Maybe someone familiar wih Qt/QPE could turn that dialog into a vertically scrolling one like the General Options above ?

Click to view attachment

Thanks to Zenyatta for making his port available !

If there's something specific anyone wants tried/tested/checked, just ask...

Enjoy,
fp
kahm
QUOTE(fpp @ Apr 8 2005, 09:36 PM)
Episode 6 - A real problem...

The only thing I've found that is not workable on the Z is the "Configure Data Types" dialog in its present state.

The top and bottom parts are off-screen, along with a couple of fields and the OK/Cancel buttons...

On my 760 the Cancel button on the keyboard dismisses the dialog, but the OK button does not validate it. So as far as I can tell, you can't *define* a new record type directly on the Zaurus version.

Of course, you can run the app on your desktop PC too (Windows/Linux), so you can organize your data types there, then copy over the .trl file(s), so that doesn't mean you can't put treeline to good use on the Z !

Maybe someone familiar wih Qt/QPE could turn that dialog into a vertically scrolling one like the General Options above ?

Click to view attachment

Thanks to Zenyatta for making his port available !

If there's something specific anyone wants tried/tested/checked, just ask...

Enjoy,
fp
*


I'm not familiar with Python, so I'm not even going to try and fix the problem. Just curious, though - Have you tried rotating the screen? That may bring the dialog buttons into view.
zenyatta
fpp: You da man! I'm very impressed. Two of the problems you mention are very easy to solve or work around:

1. The Enter key on the keyboard is equivalent to the OK key, at least on the 5500. That allows me to define new data types even on the Zaurus (although it is pure torture). I have added this workaround to the documentation.

2. If the biggest difference between Sharp and OZ packages is the archiving program used, it's very trivial to create both versions. I have now added a package to the download area that will hopefully work with Sharp ROMs. I have no way of testing that, of course. There may be dependency problems if python packages on the Sharp side are structured differently than under OZ. It might have to be installed without dependency checking.

I must say I never thought that differences between Sharp ROMs and OpenZaurus might present bigger problems than differences between Zaurus models rolleyes.gif

Cheers,
z.
fpp
QUOTE(zenyatta @ Apr 9 2005, 07:16 AM)
fpp: You da man! I'm very impressed. Two of the problems you mention are very easy to solve or work around:
1. The Enter key on the keyboard is equivalent to the OK key, at least on the 5500. That allows me to define new data types even on the Zaurus (although it is pure torture).

On the 760 keyboard the Enter and OK keys are also equivalent, and generally map to a dialog's OK/Yes button... but not on this one. Mostly it seems to call the "modify data type list" dialog, although it depends where the focus is.
There are other workarounds though : kham's idea works (nice call kham, see below !), and also you can tab your way to the OK button itself (4 tabs from the "output format" field, or 2 shift-tabs from the first field) and press Enter. But I agree it's strictly for emergencies only smile.gif
QUOTE
2. If the biggest difference between Sharp and OZ packages is the archiving program used, it's very trivial to create both versions. I have now added a package to the download area that will hopefully work with Sharp ROMs.

Well, dunno if it's really trivial, but this one doesn't work here :
CODE
# ipkg install treeline_0.8.1_sharp_arm.ipk
zcat: stdin: unexpected end of file
ipkg_install_file: ERROR unpacking control.tar.gz from treeline_0.8.1_sharp_arm.ipk

BTW, that's the exact same error I received many times while trying to build my own ipk from the OZ original, which is why I ended up installing by hand. So there must be another difference somewhere...
fpp
Episode 7 - Mo' Fun !

Yes, I know there ain't no Star Wars episode 7, but just for kicks... When I started Treeline from the console today, to check on the above, I got a very different result than on Friday :

Click to view attachment

More legible and easier on the eyes, no ? I've already seen both the small text/large text versions, but I'm not sure how to reliably get either. Guess it comes from launching through the console... I wonder which version a proper IPK installation with a working icon will give ? smile.gif

Obviously though, the "Configure Data Types" dialog problem just got worse :

Click to view attachment

Fortunately, kham comes to the rescue : if you rotate the screen, this is what you get (well, most of the time anyway - here too there are variants :-) :

Click to view attachment

Yay, an OK button smile.gif
zenyatta
QUOTE(fpp @ Apr 10 2005, 02:09 PM)
I wonder which version a proper IPK installation with a working icon will give ? smile.gif

*sigh* I have to buy a new unit by the end of the month. This is no good without a Zaurus.

Cheers,
z.
mandjab
QUOTE(fpp @ Apr 10 2005, 09:57 PM)
CODE
# ipkg install treeline_0.8.1_sharp_arm.ipk
zcat: stdin: unexpected end of file
ipkg_install_file: ERROR unpacking control.tar.gz from treeline_0.8.1_sharp_arm.ipk


I have the same installation problem with my 760 - Cacko 1.22 huh.gif

Could you help me?
fpp
QUOTE(mandjab @ Apr 11 2005, 12:45 PM)
I have the same installation problem with my 760 - Cacko 1.22 huh.gif
Could you help me?
*

Sorry, no. I've tried, several times, to build an ipk on my own Z by disassembling zenyatta's and putting it back together, but I always get the same result. It's either something with the Cacko/Sharp installer, or something to do with the contents of the control file, despite its being plain text...
fpp
Episode 8 - Icon works !
(Match that one, George L ! :-)

Saw this thread over in the python forum : http://www.oesf.org/forums/index.php?showtopic=11827

and tried some of those hints. Guess what, now the Treeline icon launches Treeline, nifty uh ? More good news, it launches the large-text version smile.gif

I don't pretend to understand any of it, but it seems to boil down to this :

- either you take the treelinelauncher script that's called by the icon (Exec= in treeline.desktop) and you make it much more complicated using the stuff from the thread above (env, PYTHONPATH, output redirection, not sure which does it...)

- either you take it out of the loop entirely and just stick the path to treeline.py as the icon action, seems to work just as well :-)

Okay, back to that darned ipk...
zenyatta
QUOTE(fpp @ Apr 11 2005, 02:51 PM)
- either you take it out of the loop entirely and just stick the path to treeline.py as the icon action, seems to work just as well :-)


Can you try the following please?

1. Launch TreeLine by tapping on its icon.
2. Push the Home button to get back to Qtopia desktop.
3. Tap the TreeLine icon in the task bar to go back to TreeLine.

I remember having a big problem with this - TreeLine would never come back up. My setup of treeline.desktop / treelinelauncher / treeline.py is the only way I found to make it work.

Thanks,
z.
fpp
QUOTE(zenyatta @ Apr 12 2005, 04:40 AM)
Can you try the following please?
1. Launch TreeLine by tapping on its icon.
2. Push the Home button to get back to Qtopia desktop.
3. Tap the TreeLine icon in the task bar to go back to TreeLine.
I remember having a big problem with this - TreeLine would never come back up. My setup of treeline.desktop / treelinelauncher / treeline.py is the only way I found to make it work.

Yes, I seem to remember such things being discussed in the forums sometime last year (maybe it was you :-).

Well, I had done just this without thinking about it during the course of my testing, and I just tried again just to be sure, and I can confirm it just works, even with my treeline.desktop calling treeline.py directly...

Actually it's very fortunate that it does, because there is one peculiar thing about launching treeline on my Z : quite often ("...but not quite always", as seems to be my mantra these days :-), it will appear briefly then switch back to the desktop or to another app that's running. So you have to tap its icon on the taskbar to get it back.

It's not a problem, just a bit strange - the PyQt "demo app" (basic example) doesn't do this for example. And I *think* the behaviour was there with treelinelauncher, too.

Oh, and I seem to remember that early in the thread there was a question about start times. Subjectively I find them quite acceptable : with my 760 running its usual set of apps (Ko/Pi, Opera, a couple of python instances and a Snakelet server) loading Treeline takes just under 10 seconds. Not bad ! A bit more than lighter, native apps (like Portabase), but on par with compiled code like Ko/Pi, Ka/Pi etc., and certainly much better than some monsters running on kdemicrolib (like Tuxcards and Kcommander) that take so much of forever to start that they need a splashscreen to warn the user... Go Python/PyQt ! :-)
zenyatta
OK folks,

today I received my "new" 5500 so things should slowly start moving once again.

In the few long weeks without a Zaurus I've come up with alternative ways of doing PIM stuff. Thanks to that I will try to use the Zaurus less as a PIM tool and more as a development and testing toy. Hopefully my life will not disintegrate into complete chaos.

I would like everyone who is interested in this program to let me know
- the ROM (including version) they want to run it under,
- whether that ROM is available for the SL-5500, and
- where that ROM can be downloaded.

Thanks,
z.
ken
I dont know if this is of any help, but I've found 'stageone' to be a great outliner. It can be found at http://www.handango.com

It's one of the few apps that I'd buy the author's other programs if he made more apps.

It's well worth the price. Since I first purchased it last year in November, I've noticed that he still is providing updates.
zenyatta
Yes, there are several outliners on Handango, most of them quite good as far as I know. Certainly, people who want a polished outliner now should go with one of them. I'm just having fun dabbling in Python, that's all :-)

z.
zenyatta
I have spent some time living under SharpROM 3.13 and come up with an ipk that installs without crashing and produces a working icon on the Applications tab.

There are some limitations, of course. I've given up on registering .trl files as a mime typ e in Qtopia because I couldn't get TreeLine to associate properly with them. At best, TreeLine would launch upon tapping on a file's icon but it didn't receive the file name on the command line - apparently Qtopia uses the QWidget::setDocument() slot to implement the association but I couldn't get it to work.

I also updated the OZ ipk with one small bugfix (resizing when an input method area pops up). I can now finally leave SharpROM, re-flash OZ and move ahead with other things.

Cheers,
z.
fpp
Hi zenyatta,

I downloaded the new Sharp ipk from your site to try it out, but (on Cacko 1.21 at least) there's not much improvement : the installer applet ignores the package and ipkg still complains :

# ipkg install treeline_0.8.1_sharp_arm.ipk
zcat: treeline_0.8.1_sharp_arm.ipk: not in gzip format
zcat: stdin: unexpected end of file
ipkg_install_file: ERROR unpacking control.tar.gz from treeline_0.8.1_sharp_arm.ipk

(sorry :-)
DnOlvrB
QUOTE(fpp @ May 29 2005, 02:22 PM)
Hi zenyatta,

I downloaded the new Sharp ipk from your site to try it out, but (on Cacko 1.21 at least) there's not much improvement : the installer applet ignores the package and ipkg still complains :

# ipkg install treeline_0.8.1_sharp_arm.ipk
zcat: treeline_0.8.1_sharp_arm.ipk: not in gzip format
zcat: stdin: unexpected end of file
ipkg_install_file: ERROR unpacking control.tar.gz from treeline_0.8.1_sharp_arm.ipk

(sorry :-)
*


I'm running Sharp ROM 1.32 on a 5600 and the installer does not find it.

I'd be looking to replace hnb if I could get this working. I'd like to sync certain files (todo.opml, bookmarks.opml etc...) with my web space which would provide me with an alternative interface along the lines of: http://www.netcrucible.com/xslt/opml.html
DnOlvrB
Took a closer look at this just now. It looks like the bundle is a tar'd tar file instead of a gzip'd tar file smile.gif

From your error messages, it looks like you had that much figured out though.

The other problem is that control.tar should contain ./home/..., not /home.

To fix (on your zaurus):
su -
cd /usr/mnt.rom/cf/software (or wherever you put your ipk's)
mkdir treeline
mv treeline_0.8.1_sharp_arm.ipk treeline
cd treeline
tar xf treeline_0.8.1_sharp_arm.ipk
gunzip control.tar.gz
tar xf control.tar
rm control.tar
tar cf control.tar ./home
gzip control.tar
tar cf treeline_fix_0.8.1_sharp_arm
gzip treeline_fix_0.8.1_sharp_arm
mv treeline_fix_0.8.1_sharp_arm.gz ../treeline_fix_0.8.1_sharp_arm.ipk
cd ..
ipkg install treeline_fix_0.8.1_sharp_arm.ipk

So in the development bundle, edit the file 'make' on line 52 to be "./home" rather than just "home".
bam
pehaps some fixws are in order...? I too have been tring to install this with no success..sad.gif

edit: working well, the open dialog needs to be a bit bigger, hard to see, perhaps I need to learn python...and help out
rjohnson1969
QUOTE(zenyatta @ Apr 27 2005, 05:47 AM)
OK folks,
I would like everyone who is interested in this program to let me know
- the ROM (including version) they want to run it under,
- whether that ROM is available for the SL-5500, and
- where that ROM can be downloaded.
*

I'm using the Sharp ROM v3.13 for the sl-5500. I'd been wanting to try this application, but it has taken FOREVER for me to get around to installing python. I installed a python 'image' from here: PythonZaurusImage which was entirely painless, and went on the SD card (~10 megs).

I 'installed' treeline from the IPK here (yours): Journey.sk ZAURUS TREELINE

It would not recognize in the Sharp Rom add programs utility, so I extracted it on my PC and moved it onto SD by pieces, and created some symlinks so it would work.

I've fiddled with this program for a day, and started really using it today, so far so good.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.