home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2012 January / maximum-cd-2012-01.iso / DiscContents / digsby_setup.exe / lib / contacts / buddylistsort.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2011-10-05  |  1.5 KB  |  38 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.6)
  3.  
  4. from contacts.Group import DGroup
  5. from common import pref
  6. from logging import getLogger
  7. log = getLogger('blistsort')
  8. info = log.info
  9.  
  10. def grouping():
  11.     s = pref('buddylist.sortby', 'none none').startswith
  12.     if not s('*status'):
  13.         pass
  14.     return s('*service')
  15.  
  16.  
  17. class SpecialGroup(DGroup):
  18.     _renderer = 'DGroup'
  19.     
  20.     def groupkey(self):
  21.         return self.__class__.__name__ + '_' + DGroup.groupkey(self)
  22.  
  23.     
  24.     def renamable(self):
  25.         pass
  26.  
  27.  
  28. STATUS_ORDER = [
  29.     'available',
  30.     'away',
  31.     'idle',
  32.     'mobile',
  33.     'invisible',
  34.     'offline',
  35.     'unknown']
  36. STATUS_ORDER_INDEXES = dict((lambda .0: for i in .0:
  37. (STATUS_ORDER[i], i))(xrange(len(STATUS_ORDER))))
  38.