Re: Gmail contacts



2011/2/1 Adi J. Sieker <adi sieker info>:
> Hello all,
>
> I just pushed a new version of the Gmail contacts enhancements to my github
> clone.
>
> https://github.com/adsworth/kupfer/
>
> Again I'm interested in all and any feedback.
>
> I made one change to the LargeType action. Originally it used leaf.object to
> fetch the text to display.
> Since I like to LargeType my phone numbers and addresses when viewing them I
> had to change leaf.object to leaf.get_description(). Since in the case of
> the contact leafs self.object is a dictionary and that can't be large typed.
> The one downside, which I'm not sure how to solve, is that now LargeType
> doesn't display the complete text from a TextLeaf. It only displays the
> description.
> If someone knows of a clean way of reusing LargeType please let me know.

I have a suggestion here. Can we use get_text_representation() ? (look
in kupfer/interface.py ) If the contacts implement this they will use
that text for 'Copy' as well (Ctrl+C). Now I wonder if this collides
with email contacts (copy the email) or it's fine for more complicated
contacts. The text representation of a TextLeaf is the full text.


>
> Also the IM contacts for Skype and Jabber always have the Status "Unkown".
> This is because the status is passed in the construction of the Leaf. I
> didn't want to replicate the whole status logic for Skype and jabber in my
> code.
>
> There is also one issue I have, which I can't figure out. If I activate the
> Skype plugin none of my Gmail contacts show up anymore. No idea why.
>
> Also I just realized that when shutting down kupfer the pickleing of the
> source breaks because it can't pickle a generator.
> I guess I'll have to rework get_contacts to return a list instead of
> yielding the leaves. Althoug I remember Ulrik suggesting to yield instead of
> returning a list.

It should not break down because of this. Must be something with the
toplevel/contact grouping stuff. (It's still too hacky for my taste).
Also let's remember that the pickeling at shutdown is just a cache to
let kupfer start faster. If it's not needed, then just clear it.


>
> Regards
>   Adi
>
> --
> Adi J. Sieker
> Steurentalstr. 2
> 79252 Stegen

Schön! Ich war 1 1/2 jahen in Freiburg als student, das ist jetzt nur
2 jahre her. :-)

MfG,
Ulrik


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]