[GTK/MERGE] Small cleanups
John Arbash Meinel
john at arbash-meinel.com
Thu Apr 19 22:44:27 BST 2007
The attached bundle provides 5 fixes for bzr-gtk.
1) Search around for 'olive.glade' rather than only looking in a couple
hard-coded places. On my system (Mac OS X), python is installed in
/opt/local/bin and there is a hard-coded search path of only
/usr/share/olive/olive.glade or dirname(__file__) + 'olive.glade'.
After finding 'olive.glade' it assumes that is where the other ui glade
files will be found. So it looks for 'cmenu.ui' in the same directory.
2) fix 'bzr gdiff notafile'. It was using "tree2.inventory.path2id', but
we have 'tree.path2id'.
3) fix 'olive-gtk' to give nicer errors when it cannot startup. It was
trying to 'i18n' certain strings by using _('foo'). However it never
imported gettext to define _(). For now, I just got rid of the _ call.
4) Update 'info_helper.py' to avoid working.inventory instead just using
working.iter_entries_by_dir(). The code ends up simpler anyway, because
you have an InventoryEntry and can use 'ie.kind()' rather than trying to
5) Change olive-gtk to not mix tab characters and space characters. I
was guessing it was an accident, so I felt it was okay to switch
everything to tabs.
All of these changes are available from:
Also, 'olive-gtk' can't be run from source anymore. Because it tries to
"import gtk" but because the plugin must be named "gtk" it first tries
to import from the local directory.
We might really want to consider renaming the plugin to 'bzrgtk' or
something to avoid name conflicts. Then again, I also think "olive"
should be a separate program which depends on bzr-gtk, but isn't
combined with it. But it isn't my project, so you certainly can do it
how you want.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the bazaar