Author Topic: Zaurus Port Of Treeline  (Read 21533 times)

zenyatta

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Zaurus Port Of Treeline
« on: March 20, 2005, 10:34:56 am »
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   Or maybe it won't interest anyone, which is fine. In any case, it is there, on my homepage.

Cheers,
z.
« Last Edit: March 20, 2005, 10:38:16 am by zenyatta »
SL-5500, 256MB Kingston CF card, 128MB EDGE SD card, Thomson HED-155 headphones
OpenZaurus 3.5.3 / Opie (kernel 64-0)

caunt

  • Newbie
  • *
  • Posts: 48
    • View Profile
Zaurus Port Of Treeline
« Reply #1 on: April 02, 2005, 12:11:21 am »
Hi Zenyatta,

Looks interesting...thanks for making it available!  I'll check it out.

g333

  • Full Member
  • ***
  • Posts: 196
    • View Profile
Zaurus Port Of Treeline
« Reply #2 on: April 02, 2005, 04:24:17 am »
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.
SL-C3000, Sharp ROM 1.11 JP, AirEdge AH-S405C...

zenyatta

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Zaurus Port Of Treeline
« Reply #3 on: April 02, 2005, 06:50:05 am »
Quote
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  

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
SL-5500, 256MB Kingston CF card, 128MB EDGE SD card, Thomson HED-155 headphones
OpenZaurus 3.5.3 / Opie (kernel 64-0)

g333

  • Full Member
  • ***
  • Posts: 196
    • View Profile
Zaurus Port Of Treeline
« Reply #4 on: April 02, 2005, 11:33:01 pm »
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: [Select]
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.
SL-C3000, Sharp ROM 1.11 JP, AirEdge AH-S405C...

zenyatta

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Zaurus Port Of Treeline
« Reply #5 on: April 05, 2005, 07:38:00 am »
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.
SL-5500, 256MB Kingston CF card, 128MB EDGE SD card, Thomson HED-155 headphones
OpenZaurus 3.5.3 / Opie (kernel 64-0)

Flandry

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
    • http://
Zaurus Port Of Treeline
« Reply #6 on: April 06, 2005, 12:25:28 am »
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.

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?
« Last Edit: April 06, 2005, 12:28:34 am by Flandry »

zenyatta

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Zaurus Port Of Treeline
« Reply #7 on: April 06, 2005, 04:38:24 am »
Quote
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.
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  ) 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.
SL-5500, 256MB Kingston CF card, 128MB EDGE SD card, Thomson HED-155 headphones
OpenZaurus 3.5.3 / Opie (kernel 64-0)

zenyatta

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Zaurus Port Of Treeline
« Reply #8 on: April 06, 2005, 04:44:09 am »
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

Cheers,
z.
SL-5500, 256MB Kingston CF card, 128MB EDGE SD card, Thomson HED-155 headphones
OpenZaurus 3.5.3 / Opie (kernel 64-0)

fpp

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://
Zaurus Port Of Treeline
« Reply #9 on: April 06, 2005, 11:27:22 am »
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

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://
Zaurus Port Of Treeline
« Reply #10 on: April 08, 2005, 04:28:38 pm »
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.
« Last Edit: April 08, 2005, 05:41:15 pm by fpp »

fpp

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://
Zaurus Port Of Treeline
« Reply #11 on: April 08, 2005, 05:06:43 pm »
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  

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 :-)

 [ Invalid Attachment ]
« Last Edit: April 08, 2005, 05:43:36 pm by fpp »

fpp

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://
Zaurus Port Of Treeline
« Reply #12 on: April 08, 2005, 05:13:54 pm »
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

 [ Invalid Attachment ]

fpp

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://
Zaurus Port Of Treeline
« Reply #13 on: April 08, 2005, 05:21:49 pm »
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 :-)

[ Invalid Attachment ]

fpp

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://
Zaurus Port Of Treeline
« Reply #14 on: April 08, 2005, 05:23:54 pm »
Episode 5 - the File Options dialog

A little sparse, perhaps, but it works too, and you can't miss the buttons !
 [ Invalid Attachment ]