Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits: 3aa5b436 by wurstsalat at 2021-11-10T22:22:18+01:00 BaseControl: Linting
- - - - - b2b98833 by wurstsalat at 2021-11-10T22:23:51+01:00 Remove unused subject arg from add_message
- - - - -
3 changed files:
- gajim/gtk/controls/base.py - gajim/gtk/controls/chat.py - gajim/gtk/conversation/view.py
Changes:
===================================== gajim/gtk/controls/base.py ===================================== @@ -121,9 +121,9 @@ def __init__(self, widget_name, account, jid): self.control_id = str(uuid.uuid4()) self.session = None
- self.xml = get_builder('%s.ui' % widget_name) + self.xml = get_builder(f'{widget_name}.ui') self.xml.connect_signals(self) - self.widget = self.xml.get_object('%s_hbox' % widget_name) + self.widget = self.xml.get_object(f'{widget_name}_hbox')
self._account_badge = AccountBadge(self.account) self.xml.account_badge_box.add(self._account_badge) @@ -192,7 +192,7 @@ def __init__(self, widget_name, account, jid):
# Send message button self.xml.send_message_button.set_action_name( - 'win.send-message-%s' % self.control_id) + f'win.send-message-{self.control_id}') self.xml.send_message_button.set_visible( app.settings.get('show_send_message_button')) app.settings.bind_signal( @@ -507,7 +507,7 @@ def delegate_action(self, action):
def add_actions(self): action = Gio.SimpleAction.new_stateful( - 'set-encryption-%s' % self.control_id, + f'set-encryption-{self.control_id}', GLib.VariantType.new('s'), GLib.Variant('s', self.encryption or 'disabled')) action.connect('change-state', self.change_encryption) @@ -759,7 +759,7 @@ def _paste_event_confirmed(self, is_checked, image): app.settings.set('confirm_paste_image', False)
dir_ = tempfile.gettempdir() - path = os.path.join(dir_, '%s.png' % str(uuid.uuid4())) + path = os.path.join(dir_, f'{uuid.uuid4()}.png') image.savev(path, 'png', [], [])
self._start_filetransfer(path) @@ -768,9 +768,9 @@ def _get_pref_ft_method(self): ft_pref = app.settings.get_account_setting(self.account, 'filetransfer_preference') httpupload = app.window.lookup_action( - 'send-file-httpupload-%s' % self.control_id) + f'send-file-httpupload-{self.control_id}') jingle = app.window.lookup_action( - 'send-file-jingle-%s' % self.control_id) + f'send-file-jingle-{self.control_id}')
if self._type.is_groupchat: if httpupload.get_enabled():
===================================== gajim/gtk/controls/chat.py ===================================== @@ -99,7 +99,7 @@ def __init__(self, account, jid): self.xml.banner_eventbox.set_no_show_all(False)
self.xml.sendfile_button.set_action_name( - 'win.send-file-%s' % self.control_id) + f'win.send-file-{self.control_id}')
self._call_widget = CallWidget(self.account, self.contact) self._call_widget.connect('incoming-call', self._add_incoming_call) @@ -335,7 +335,7 @@ def _update_pep(self, type_): return
if type_ == PEPEventType.MOOD: - icon = 'mood-%s' % data.mood + icon = f'mood-{data.mood}' formated_text = format_mood(*data) elif type_ == PEPEventType.ACTIVITY: icon = get_activity_icon_name(data.activity, data.subactivity) @@ -428,7 +428,6 @@ def _on_message_received(self, event): self.add_message(event.msgtxt, kind, tim=event.properties.timestamp, - subject=event.properties.subject, displaymarking=event.displaymarking, msg_log_id=event.msg_log_id, message_id=event.properties.id, @@ -601,7 +600,6 @@ def add_message(self, text, kind, tim=None, - subject=None, displaymarking=None, msg_log_id=None, stanza_id=None,
===================================== gajim/gtk/conversation/view.py ===================================== @@ -215,7 +215,6 @@ def add_message(self, correct_id=None, display_marking=None, additional_data=None, - subject=None, marker=None, error=None):
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/365d7b175c050627196aa08dc22daa26...