~sdague/onehundredscopes/unity-lens-pidgin

« back to all changes in this revision

Viewing changes to src/unity-lens-pidgin

  • Committer: Sean Dague
  • Date: 2012-05-14 23:39:34 UTC
  • Revision ID: sean@dague.net-20120514233934-93fwb6kqwnvpngoj
* Make sorting better
[ Sean Dague ]
* First release of a Pidgin lens.

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
        return self._buddies
148
148
 
149
149
    def new_message(self, account, buddy):
150
 
        self._purple.PurpleConversationNew(1, int(account), buddy)
 
150
        current = None
 
151
        for window in self._purple.PurpleGetIms():
 
152
            if buddy == self._purple.PurpleConversationGetName(window):
 
153
                current = window
 
154
                break
 
155
 
 
156
        if current:
 
157
            self._purple.PurpleConversationPresent(window)
 
158
        else:
 
159
            self._purple.PurpleConversationNew(1, int(account), buddy)
151
160
 
152
161
    def fill(self, buddy):
153
162
        icon = self._purple.PurpleBuddyGetIcon(buddy.id)