diff options
author | mathieui <mathieui@mathieui.net> | 2014-10-31 19:15:57 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-10-31 19:16:44 +0100 |
commit | 1c1ab3cb839e5509db52770e10c7190f844eb2e5 (patch) | |
tree | b331060b3dc42651e61e4ccb2dfe6af5e2e97752 /plugins | |
parent | cedc5a6ec80a46437f42464415fd1806049c593d (diff) | |
parent | ea2b703bfd07d293ba9fdd85ac657275d43da2a7 (diff) | |
download | poezio-1c1ab3cb839e5509db52770e10c7190f844eb2e5.tar.gz poezio-1c1ab3cb839e5509db52770e10c7190f844eb2e5.tar.bz2 poezio-1c1ab3cb839e5509db52770e10c7190f844eb2e5.tar.xz poezio-1c1ab3cb839e5509db52770e10c7190f844eb2e5.zip |
Merge branch 'master' of git.poez.io:poezio into slix
Conflicts:
src/bookmark.py
src/config.py
src/connection.py
src/core/commands.py
src/core/core.py
src/core/handlers.py
src/windows/info_bar.py
src/windows/muc.py
src/windows/roster_win.py
src/windows/text_win.py
src/xhtml.py
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/otr.py | 12 | ||||
-rw-r--r-- | plugins/screen_detach.py | 7 |
2 files changed, 9 insertions, 10 deletions
diff --git a/plugins/otr.py b/plugins/otr.py index c2e5a663..44fdb323 100644 --- a/plugins/otr.py +++ b/plugins/otr.py @@ -210,7 +210,7 @@ def hl(tab): conv_jid = safeJID(tab.name) if 'private' in config.get('beep_on', 'highlight private').split(): - if not config.get_by_tabname('disable_beep', False, conv_jid.bare, False): + if not config.get_by_tabname('disable_beep', conv_jid.bare, default=False): curses.beep() class PoezioContext(Context): @@ -430,11 +430,11 @@ class Plugin(BasePlugin): jid = safeJID(jid).full if not jid in self.contexts: flags = POLICY_FLAGS.copy() - policy = self.config.get_by_tabname('encryption_policy', 'ondemand', jid).lower() - logging_policy = self.config.get_by_tabname('log', 'false', jid).lower() - allow_v2 = self.config.get_by_tabname('allow_v2', 'true', jid).lower() + policy = self.config.get_by_tabname('encryption_policy', jid, default='ondemand').lower() + logging_policy = self.config.get_by_tabname('log', jid, default='false').lower() + allow_v2 = self.config.get_by_tabname('allow_v2', jid, default='true').lower() flags['ALLOW_V2'] = (allow_v2 != 'false') - allow_v1 = self.config.get_by_tabname('allow_v1', 'false', jid).lower() + allow_v1 = self.config.get_by_tabname('allow_v1', jid, default='false').lower() flags['ALLOW_V1'] = (allow_v1 == 'true') self.contexts[jid] = PoezioContext(self.account, jid, self.core.xmpp, self.core) self.contexts[jid].log = 1 if logging_policy != 'false' else 0 @@ -544,7 +544,7 @@ class Plugin(BasePlugin): nick_color = get_theme().COLOR_REMOTE_USER body = txt.decode() - if self.config.get_by_tabname('decode_xhtml', True, msg['from'].bare): + if self.config.get_by_tabname('decode_xhtml', msg['from'].bare, default=True): try: body = xhtml.xhtml_to_poezio_colors(body, force=True) except: diff --git a/plugins/screen_detach.py b/plugins/screen_detach.py index 3552a179..53827c11 100644 --- a/plugins/screen_detach.py +++ b/plugins/screen_detach.py @@ -7,15 +7,14 @@ import os import stat import pyinotify -SCREEN_DIR = '/var/run/screen/S-%s' % (os.getlogin(),) - class Plugin(BasePlugin): def init(self): + screen_dir = '/var/run/screen/S-%s' % (os.getlogin(),) self.timed_event = None sock_path = None self.thread = None - for f in os.listdir(SCREEN_DIR): - path = os.path.join(SCREEN_DIR, f) + for f in os.listdir(screen_dir): + path = os.path.join(screen_dir, f) if screen_attached(path): sock_path = path self.attached = True |