Viewing posts for the category gnome

Still writing a restore tool :(

Still writing a restore tool :(
Last two hours were spent debugging an interesting problem with TreeView in PyGTK. It was too slow to parse and add all files from a backup snapshot to the tree view at once (not to mention that it took 35 Mb of RAM :P), so I decided to load the tree as needed - I would add the children of a node only when this node gets expanded. So I happily wrote a handler to 'row-expanded' event that does just that - adds some children to the newly expanded node.
Note: as the node cannot expand if it doesn't have some children already, I also add a dummy child to all directory nodes
Then the problem came up - once I enabled my handler, the nodes would not expand anymore: the expansion handles were there, I could click on them and see the CPU being chewed away by the parsing of the 6 Mb nodelist, but nothing changed in the interface - even the dummy node didn't come up.
That confused not only me, but also #pygtk people. I wrote a 15 line simple script to replicate the problem, but everything worked fine there :O. At this point I started commenting stuff out at random and found out that breaking the link between treestore and treeview (recommended in docs to avoid excessive updates) resets the expansion state. Doh.
But it was not the end yet. After that I noticed that the nodes didn't expand on the first try, but only on the second. 8) After some mental mummbo-jummbo I came to an idea that proved to be dumb, but correct. Prepare for a gem boys and girls - if, in the process of execution of row-expanded handler, at at least one point the expanding node has no children (like when you have removed the dummy node, but still haven't added the real ones) - the expansion doesn't happen!
Two bugs^Wfeatures with the same effect. Oh, the fun of debugging never stops :D

The python-gnome2 bindings for gnomevfs ...

The python-gnome2 bindings for gnomevfs are completely undocumented :P
I so wish i could kick that developer in the^W^W^W^W^W donate small amount of money to have it fixed. :)

Currently I am very busy writing my Summ...

Currently I am very busy writing my Summer of Code project. You can see my plan on the Ubuntu wiki: and follow my progress in my bazaar-ng repository.
I must say that bazaar-ng is a simple as subversion and as powerful as arch, but as complete as current Xorg package for Ubuntu unstable (aka breezy) ;P
I am writing all of this SoC code in python which is my first real life exposure to this language. I am deeply impressed by the easiness of the language, but slightly depressed by the lack of documentation in some areas, for example python-gnome modules are mostly undocumented. While the simple stuff can be scoped out from some examples, a more advanced use would require much guesswork.
I like that in python everything is an object and that objects with similar interfaces are interchangeable, for example: Tarfile module makes .tar archives. It would really like to write them out to a file, but will also accept a fileobj. It acctually only need this object to have a proper write() function, so a Handle from Gnome-vfs module should do nicely there. That would allow a transparent reading/writing of the resulting .tar to any destination supported by Gnome-VFS.
Now that is cool.
I am writing a backup daemon now. The due date for this is tomorrow. I have local plain file and local .tar backups working. I still have to make Gnome-vfs .tar backups work as intended, make incremental backups work and do some configuration file parsing. Also a simple restore utility must be done 'till tomorrow. I might just make it :)
(GUI tools are scheduled for the next week)

Testing Gnome based blogging

Today I tried out a few Gnome based blogging programms. Unfortunately I am still wrinting this in the web interface of the Why?

1. Gnome-Blog: a nice panel applet, one click blogging, looks perfect, but show an obscure error when trying to connect to :( Bug reported, lets go on.

2. BloGTK: standalone programm, too many buttons for anything, no autologin, asks to enter 'url to the system' giving an obscure example with xmlrpc in it. could not figure out the correct url, gave up, reported a bug :P

3. theres is not 3 !!! only two gnome based blogger supporting tools exist and both were unable to work for me.

sometimes life just sucks :)

Recent Posts






RSS / Atom