In obvious cased, don't compare boolean values to True or False.
This commit is contained in:
parent
92b596a698
commit
fb12c17fb9
|
@ -169,7 +169,7 @@ def user_activity(items, name, jid):
|
|||
contact.activity['text'] = text
|
||||
|
||||
def user_send_mood(account, mood, message = ''):
|
||||
if gajim.config.get('publish_mood') == False:
|
||||
if not gajim.config.get('publish_mood'):
|
||||
return
|
||||
item = xmpp.Node('mood', {'xmlns': xmpp.NS_MOOD})
|
||||
if mood != '':
|
||||
|
@ -181,7 +181,7 @@ def user_send_mood(account, mood, message = ''):
|
|||
gajim.connections[account].send_pb_publish('', xmpp.NS_MOOD, item, '0')
|
||||
|
||||
def user_send_activity(account, activity, subactivity = '', message = ''):
|
||||
if gajim.config.get('publish_activity') == False:
|
||||
if not gajim.config.get('publish_activity'):
|
||||
return
|
||||
item = xmpp.Node('activity', {'xmlns': xmpp.NS_ACTIVITY})
|
||||
if activity != '':
|
||||
|
@ -195,8 +195,8 @@ def user_send_activity(account, activity, subactivity = '', message = ''):
|
|||
gajim.connections[account].send_pb_publish('', xmpp.NS_ACTIVITY, item, '0')
|
||||
|
||||
def user_send_tune(account, artist = '', title = '', source = '', track = 0,length = 0, items = None):
|
||||
if (gajim.config.get('publish_tune') == False) or \
|
||||
(gajim.connections[account].pep_supported == False):
|
||||
if (not gajim.config.get('publish_tune')) or \
|
||||
(not gajim.connections[account].pep_supported):
|
||||
return
|
||||
item = xmpp.Node('tune', {'xmlns': xmpp.NS_TUNE})
|
||||
if artist != '':
|
||||
|
|
|
@ -245,7 +245,7 @@ class Zeroconf:
|
|||
return True
|
||||
|
||||
def remove_announce(self):
|
||||
if self.announced == False:
|
||||
if not self.announced:
|
||||
return False
|
||||
try:
|
||||
self.service_sdRef.close()
|
||||
|
|
|
@ -533,7 +533,7 @@ class PreferencesWindow:
|
|||
gajim.interface.save_config()
|
||||
|
||||
def on_publish_mood_checkbutton_toggled(self, widget):
|
||||
if widget.get_active() == False:
|
||||
if not widget.get_active():
|
||||
for account in gajim.connections:
|
||||
if gajim.connections[account].pep_supported:
|
||||
pep.user_send_mood(account, '')
|
||||
|
@ -541,7 +541,7 @@ class PreferencesWindow:
|
|||
helpers.update_optional_features()
|
||||
|
||||
def on_publish_activity_checkbutton_toggled(self, widget):
|
||||
if widget.get_active() == False:
|
||||
if not widget.get_active():
|
||||
for account in gajim.connections:
|
||||
if gajim.connections[account].pep_supported:
|
||||
pep.user_send_activity(account, '')
|
||||
|
@ -549,7 +549,7 @@ class PreferencesWindow:
|
|||
helpers.update_optional_features()
|
||||
|
||||
def on_publish_tune_checkbutton_toggled(self, widget):
|
||||
if widget.get_active() == False:
|
||||
if not widget.get_active():
|
||||
for account in gajim.connections:
|
||||
if gajim.connections[account].pep_supported:
|
||||
pep.user_send_tune(account, '')
|
||||
|
|
|
@ -5403,7 +5403,7 @@ class RosterWindow:
|
|||
elif contacts_transport != transport:
|
||||
contacts_transport = False
|
||||
|
||||
if contacts_transport == False:
|
||||
if not contacts_transport:
|
||||
# they are not all from the same transport
|
||||
invite_menuitem.set_sensitive(False)
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue