summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2015-06-21 15:38:33 +0200
committermathieui <mathieui@mathieui.net>2015-06-21 15:38:33 +0200
commit1efc45f882bf213e2ad2e4b450669d13d9b03e38 (patch)
treef08c527defcc64f74e9ca8f583e411894f82ad44 /src
parentd9050e9565e8c7a3e5ad101f9998c72f7d812baa (diff)
downloadpoezio-1efc45f882bf213e2ad2e4b450669d13d9b03e38.tar.gz
poezio-1efc45f882bf213e2ad2e4b450669d13d9b03e38.tar.bz2
poezio-1efc45f882bf213e2ad2e4b450669d13d9b03e38.tar.xz
poezio-1efc45f882bf213e2ad2e4b450669d13d9b03e38.zip
Do not beep on outgoing carbons (fix #3049, fix #3091)
Diffstat (limited to 'src')
-rw-r--r--src/core/handlers.py10
-rw-r--r--src/tabs/basetabs.py3
2 files changed, 10 insertions, 3 deletions
diff --git a/src/core/handlers.py b/src/core/handlers.py
index 61be8467..e34d0554 100644
--- a/src/core/handlers.py
+++ b/src/core/handlers.py
@@ -344,12 +344,16 @@ def on_normal_message(self, message):
conversation.remote_wants_chatstates = True
else:
conversation.remote_wants_chatstates = False
- if 'private' in config.get('beep_on').split():
+ if not own and 'private' in config.get('beep_on').split():
if not config.get_by_tabname('disable_beep', conv_jid.bare):
curses.beep()
if self.current_tab() is not conversation:
- conversation.state = 'private'
- self.refresh_tab_win()
+ if not own:
+ conversation.state = 'private'
+ self.refresh_tab_win()
+ else:
+ conversation.set_state('normal')
+ self.refresh_tab_win()
else:
self.refresh_window()
diff --git a/src/tabs/basetabs.py b/src/tabs/basetabs.py
index 30ddf239..d54d4578 100644
--- a/src/tabs/basetabs.py
+++ b/src/tabs/basetabs.py
@@ -171,6 +171,9 @@ class Tab(object):
if self._state == 'current':
self._prev_state = None
+ def set_state(self, value):
+ self._state = value
+
def save_state(self):
if self._state != 'composing':
self._prev_state = self._state