Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
29ee43b4 by wurstsalat at 2020-10-25T17:52:30+01:00
GroupchatControl: Fix DND
- - - - -
56bb6ce2 by wurstsalat at 2020-10-25T17:52:30+01:00
Don’t show notifications for own muc messages on DND
- - - - -
3 changed files:
- gajim/chat_control_base.py
- gajim/common/connection_handlers_events.py
- gajim/data/gui/chat_control.ui
Changes:
=====================================
gajim/chat_control_base.py
=====================================
@@ -145,6 +145,10 @@ def __init__(self, parent_win, widget_name, contact, acct,
# Drag and drop
self.xml.overlay.add_overlay(self.xml.drop_area)
self.xml.drop_area.hide()
+ self.xml.overlay.connect(
+ 'drag-data-received', self._on_drag_data_received)
+ self.xml.overlay.connect('drag-motion', self._on_drag_motion)
+ self.xml.overlay.connect('drag-leave', self._on_drag_leave)
self.TARGET_TYPE_URI_LIST = 80
uri_entry = Gtk.TargetEntry.new(
=====================================
gajim/common/connection_handlers_events.py
=====================================
@@ -287,14 +287,15 @@ def handle_incoming_gc_msg_event(self, msg_obj):
nick = msg_obj.properties.muc_nickname
- if nick != msg_obj.gc_control.nick:
- self.do_sound = True
- if sound == 'received':
- self.sound_event = 'muc_message_received'
- elif sound == 'highlight':
- self.sound_event = 'muc_message_highlight'
- else:
- self.do_sound = False
+ if nick == msg_obj.gc_control.nick:
+ # A message from ourself
+ return
+
+ self.do_sound = True
+ if sound == 'received':
+ self.sound_event = 'muc_message_received'
+ elif sound == 'highlight':
+ self.sound_event = 'muc_message_highlight'
else:
self.do_sound = False
=====================================
gajim/data/gui/chat_control.ui
=====================================
@@ -398,9 +398,6 @@
<object class="GtkOverlay" id="overlay">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <signal name="drag-data-received" handler="_on_drag_data_received"
swapped="no"/>
- <signal name="drag-leave" handler="_on_drag_leave" swapped="no"/>
- <signal name="drag-motion" handler="_on_drag_motion" swapped="no"/>
<child>
<object class="GtkPaned" id="paned1">
<property name="visible">True</property>
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/8e79f9f79a3d6e571af408a2b83fb1e70755e9e5...56bb6ce225b22efc05af4539e13808b0eb1fbe25
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/8e79f9f79a3d6e571af408a2b83fb1e70755e9e5...56bb6ce225b22efc05af4539e13808b0eb1fbe25
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits