Yann Leboulanger pushed to branch master at gajim / gajim
Commits:
de05dab6 by Emmanuel Gil Peyrot at 2017-08-22T22:51:24+01:00
pylint: Ignore a few useless warnings.
- - - - -
1750217e by Yann Leboulanger at 2017-08-23T00:27:22+02:00
Merge branch 'pylint' into 'master'
Ignore a few useless warnings in pylint
See merge request !120
- - - - -
1 changed file:
- pylintrc
Changes:
=====================================
pylintrc
=====================================
--- a/pylintrc
+++ b/pylintrc
@@ -50,7 +50,7 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
-disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,missing-docstring,not-callable
+disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,missing-docstring,not-callable,invalid-name,unused-argument,too-few-public-methods,too-many-branches,too-many-instance-attributes,too-many-locals
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/3357622c2dc0b6fe75ac573321a1403ee…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/3357622c2dc0b6fe75ac573321a1403ee…
You're receiving this email because of your account on dev.gajim.org.
Yann Leboulanger pushed to branch master at gajim / gajim
Commits:
d070d141 by Yann Leboulanger at 2017-08-21T21:59:47+02:00
fix scrolling to iter in groupchat when we receive a pm. Fixes #8635
- - - - -
1 changed file:
- gajim/groupchat_control.py
Changes:
=====================================
gajim/groupchat_control.py
=====================================
--- a/gajim/groupchat_control.py
+++ b/gajim/groupchat_control.py
@@ -1142,7 +1142,7 @@ class GroupchatControl(ChatControlBase):
else:
self._start_private_message(nick)
# Scroll to line
- path_ = path
+ path_ = path.copy()
path_.up()
self.list_treeview.expand_row(path_, False)
self.list_treeview.scroll_to_cell(path)
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/d070d141bb3cf4caf11cc94ba9233b134d…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/d070d141bb3cf4caf11cc94ba9233b134d…
You're receiving this email because of your account on dev.gajim.org.
Yann Leboulanger pushed to branch master at gajim / gajim
Commits:
07ba85b4 by Yann Leboulanger at 2017-08-20T23:07:58+02:00
Ability to be notified on all message. Option is now perroom. Fixes #8646
- - - - -
6 changed files:
- data/gui/gc_control_popup_menu.ui
- gajim/chat_control_base.py
- gajim/common/config.py
- gajim/groupchat_control.py
- gajim/message_window.py
- gajim/notify.py
Changes:
=====================================
data/gui/gc_control_popup_menu.ui
=====================================
--- a/data/gui/gc_control_popup_menu.ui
+++ b/data/gui/gc_control_popup_menu.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.12"/>
<object class="GtkMenu" id="gc_control_popup_menu">
@@ -66,6 +66,13 @@
</object>
</child>
<child>
+ <object class="GtkCheckMenuItem" id="notify_menuitem">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Notify on all messages</property>
+ </object>
+ </child>
+ <child>
<object class="GtkSeparatorMenuItem" id="request_voice_separator">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
=====================================
gajim/chat_control_base.py
=====================================
--- a/gajim/chat_control_base.py
+++ b/gajim/chat_control_base.py
@@ -957,6 +957,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
if kind == 'incoming':
if not self.type_id == message_control.TYPE_GC or \
app.config.get('notify_on_all_muc_messages') or \
+ app.config.get_per('rooms', jid, 'notify_on_all_messages') or \
'marked' in other_tags_for_text:
# it's a normal message, or a muc message with want to be
# notified about if quitting just after
@@ -1141,6 +1142,10 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
app.config.set_per('accounts', self.account, 'non_minimized_gc',
' '.join(non_minimized_gc))
+ def on_notify_menuitem_toggled(self, widget):
+ app.config.set_per('rooms', self.contact.jid, 'notify_on_all_messages',
+ widget.get_active())
+
def set_control_active(self, state):
if state:
self.set_emoticon_popover()
=====================================
gajim/common/config.py
=====================================
--- a/gajim/common/config.py
+++ b/gajim/common/config.py
@@ -492,6 +492,7 @@ class Config:
'speller_language': [ opt_str, '', _('Language for which we want to check misspelled words')],
'muc_restore_lines': [opt_int, -2, _('How many lines to request from server when entering a groupchat. -1 means no limit, -2 means global value')],
'muc_restore_timeout': [opt_int, -2, _('Minutes of backlog to request when entering a groupchat. -1 means no limit, -2 means global value')],
+ 'notify_on_all_messages': [opt_bool, False, _('State whether we want a notification for every message in this room')],
}, {}),
'plugins': ({
'active': [opt_bool, False, _('State whether plugins should be activated on startup (this is saved on Gajim exit). This option SHOULD NOT be used to (de)activate plug-ins. Use GUI instead.')],
=====================================
gajim/groupchat_control.py
=====================================
--- a/gajim/groupchat_control.py
+++ b/gajim/groupchat_control.py
@@ -905,6 +905,7 @@ class GroupchatControl(ChatControlBase):
history_menuitem = xml.get_object('history_menuitem')
disconnect_menuitem = xml.get_object('disconnect_menuitem')
minimize_menuitem = xml.get_object('minimize_menuitem')
+ notify_menuitem = xml.get_object('notify_menuitem')
request_voice_menuitem = xml.get_object('request_voice_menuitem')
bookmark_separator = xml.get_object('bookmark_separator')
separatormenuitem2 = xml.get_object('separatormenuitem2')
@@ -943,6 +944,8 @@ class GroupchatControl(ChatControlBase):
if self.contact.jid not in app.config.get_per('accounts', self.account,
'non_minimized_gc').split(' '):
minimize_menuitem.set_active(True)
+ notify_menuitem.set_active(app.config.get_per('rooms', self.contact.jid,
+ 'notify_on_all_messages'))
conn = app.connections[self.account]
if not conn.private_storage_supported and (not conn.pubsub_supported or \
not conn.pubsub_publish_options_supported):
@@ -1009,6 +1012,10 @@ class GroupchatControl(ChatControlBase):
self.on_minimize_menuitem_toggled)
self.handlers[id_] = minimize_menuitem
+ id_ = notify_menuitem.connect('toggled',
+ self.on_notify_menuitem_toggled)
+ self.handlers[id_] = notify_menuitem
+
menu.connect('selection-done', self.destroy_menu,
change_nick_menuitem, change_subject_menuitem,
bookmark_room_menuitem, history_menuitem)
@@ -1245,7 +1252,8 @@ class GroupchatControl(ChatControlBase):
def get_nb_unread(self):
type_events = ['printed_marked_gc_msg']
- if app.config.get('notify_on_all_muc_messages'):
+ if app.config.get('notify_on_all_muc_messages') or \
+ app.config.get_per('rooms', self.room_jid, 'notify_on_all_messages'):
type_events.append('printed_gc_msg')
nb = len(app.events.get_events(self.account, self.room_jid,
type_events))
=====================================
gajim/message_window.py
=====================================
--- a/gajim/message_window.py
+++ b/gajim/message_window.py
@@ -501,7 +501,8 @@ class MessageWindow(object):
for ctrl in self.controls():
if ctrl.type_id == message_control.TYPE_GC and not \
app.config.get('notify_on_all_muc_messages') and not \
- ctrl.attention_flag:
+ app.config.get_per('rooms', ctrl.room_jid,
+ 'notify_on_all_messages') and not ctrl.attention_flag:
# count only pm messages
unread += ctrl.get_nb_unread_pm()
continue
@@ -518,7 +519,9 @@ class MessageWindow(object):
if control.type_id == message_control.TYPE_GC:
name = control.room_jid.split('@')[0]
urgent = control.attention_flag or \
- app.config.get('notify_on_all_muc_messages')
+ app.config.get('notify_on_all_muc_messages') or \
+ app.config.get_per('rooms', control.room_jid,
+ 'notify_on_all_messages')
else:
name = control.contact.get_shown_name()
if control.resource:
=====================================
gajim/notify.py
=====================================
--- a/gajim/notify.py
+++ b/gajim/notify.py
@@ -68,7 +68,8 @@ def get_show_in_systray(event, account, contact, type_=None):
Return True if this event must be shown in systray, else False
"""
if type_ == 'printed_gc_msg' and not app.config.get(
- 'notify_on_all_muc_messages'):
+ 'notify_on_all_muc_messages') and not app.config.get_per('rooms',
+ contact.jid, 'notify_on_all_messages'):
# it's not an highlighted message, don't show in systray
return False
return app.config.get('trayicon_notification_on_events')
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/07ba85b45675990f0a9de46b22ffd2df93…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/07ba85b45675990f0a9de46b22ffd2df93…
You're receiving this email because of your account on dev.gajim.org.