Re: Pidgin Plugin



Hi Chmouel

2009/10/27 Chmouel Boudjnah <chmouel chmouel com>:
> Hey mate,
>
> I have a plugin that looks like working :
>
> http://github.com/chmouel/kupfer-pidgin-plugin/blob/master/pidgin.py
>

That looks great, works already. It's great to start simple, we can add
more things as we go along. Thank you for working on this, the Piding
API was so huge I haven't been able to do it myself.

> Probably more work needs to be done with regards of dynamic source, I
> am not sure how long is the ttl for the cache when kupfer is getting
> the datasource.

The "ttl" could be said to be one hour, which is the interval between
full catalog rescans. This might change in the future, because the
full rescan (except the first, 10 seconds after launch) is pointless,
all sources have some kind of change notifications they can use. There
are only two flavors of these in Kupfer, file system changes and D-Bus
signals, and there is probably going to be a D-Bus signal from Pidgin
available that we can listen to.

Given than the contact list update takes some time (1 second or 1 tenth
of a second, doesn't matter), it won't work as dynamic source. A dynamic
source is rescanned for each new search in Kupfer.

The plugin as I see it is already simple and great. I'll comment what I
think on minor things, hope you don't mind.

* PidginContact -- in the future we might unify contacts in Kupfer, but
  this is good for now. The represented object of a Leaf, it's great if
  that is a token that identifies the Leaf uniquely -- can we use "jid"
  for that here? or a tuple of (account, jid)?

* Icons -- Kupfer works a lot with icons. I have some theories around
  icons but usually it's no big deal. One idea of mine though is that
  i's very important to distinguish Objects on one hand and Actions.
  That's why programs (when they are actions) have a gearwheel + program
  icon. So here we have the person icon, it really belongs to the
  Contact object. Which means we can't use it for "Open Chat" action.
  This icon policy leads to specific and diverse Object icons, and
  somewhat simpler action icons -- which really is fine.

* Tabs. I'll retab this file to using only tabs for indentation, and 80
  char lines for inclusion in kupfer (to be consistent)

Feel free to fork kupfer on github and put the plugin inside there -- it
will only make it easier to "share" work in progress branches back and
forth.

Ulrik


>
> I am planning to add pictures as well like gnome-do plugins does.
>
> It's using all dbus no xml parsing needs to be done.
>
> Letme know what do you think.
>
> Cheers,
> Chmouel.
>


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