Removed unused code.
This commit is contained in:
parent
e41e484855
commit
234a6520dd
|
@ -569,8 +569,6 @@ def datetime_tuple(timestamp):
|
|||
# import gajim only when needed (after decode_string is defined) see #4764
|
||||
|
||||
import gajim
|
||||
import pep
|
||||
|
||||
|
||||
def convert_bytes(string):
|
||||
suffix = ''
|
||||
|
@ -777,53 +775,6 @@ def get_global_status():
|
|||
status = gajim.connections[account].status
|
||||
return status
|
||||
|
||||
def get_pep_dict(account):
|
||||
pep_dict = {}
|
||||
con = gajim.connections[account]
|
||||
# activity
|
||||
if 'activity' in con.activity and con.activity['activity'] in pep.ACTIVITIES:
|
||||
activity = con.activity['activity']
|
||||
if 'subactivity' in con.activity and con.activity['subactivity'] in \
|
||||
pep.ACTIVITIES[activity]:
|
||||
subactivity = con.activity['subactivity']
|
||||
else:
|
||||
subactivity = 'other'
|
||||
else:
|
||||
activity = ''
|
||||
subactivity = ''
|
||||
if 'text' in con.activity:
|
||||
text = con.activity['text']
|
||||
else:
|
||||
text = ''
|
||||
pep_dict['activity'] = activity
|
||||
pep_dict['subactivity'] = subactivity
|
||||
pep_dict['activity_text'] = text
|
||||
|
||||
# mood
|
||||
if 'mood' in con.mood and con.mood['mood'] in pep.MOODS:
|
||||
mood = con.mood['mood']
|
||||
else:
|
||||
mood = ''
|
||||
if 'text' in con.mood:
|
||||
text = con.mood['text']
|
||||
else:
|
||||
text = ''
|
||||
pep_dict['mood'] = mood
|
||||
pep_dict['mood_text'] = text
|
||||
return pep_dict
|
||||
|
||||
def get_global_pep():
|
||||
maxi = 0
|
||||
pep_dict = {'activity': '', 'mood': ''}
|
||||
for account in gajim.connections:
|
||||
if not gajim.config.get_per('accounts', account,
|
||||
'sync_with_global_status'):
|
||||
continue
|
||||
connected = gajim.connections[account].connected
|
||||
if connected > maxi:
|
||||
maxi = connected
|
||||
pep_dict = get_pep_dict(account)
|
||||
return pep_dict
|
||||
|
||||
def statuses_unified():
|
||||
'''testing if all statuses are the same.'''
|
||||
|
|
|
@ -197,8 +197,8 @@ TUNE_DATA = ['artist', 'title', 'source', 'track', 'length']
|
|||
import logging
|
||||
log = logging.getLogger('gajim.c.pep')
|
||||
|
||||
import common.helpers
|
||||
import common.atom
|
||||
import helpers
|
||||
import atom
|
||||
import gtkgui_helpers
|
||||
import gobject
|
||||
|
||||
|
|
Loading…
Reference in New Issue