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 only when needed (after decode_string is defined) see #4764
|
||||||
|
|
||||||
import gajim
|
import gajim
|
||||||
import pep
|
|
||||||
|
|
||||||
|
|
||||||
def convert_bytes(string):
|
def convert_bytes(string):
|
||||||
suffix = ''
|
suffix = ''
|
||||||
|
@ -777,53 +775,6 @@ def get_global_status():
|
||||||
status = gajim.connections[account].status
|
status = gajim.connections[account].status
|
||||||
return 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():
|
def statuses_unified():
|
||||||
'''testing if all statuses are the same.'''
|
'''testing if all statuses are the same.'''
|
||||||
|
|
|
@ -197,8 +197,8 @@ TUNE_DATA = ['artist', 'title', 'source', 'track', 'length']
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.c.pep')
|
log = logging.getLogger('gajim.c.pep')
|
||||||
|
|
||||||
import common.helpers
|
import helpers
|
||||||
import common.atom
|
import atom
|
||||||
import gtkgui_helpers
|
import gtkgui_helpers
|
||||||
import gobject
|
import gobject
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue