Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits:
-
3aa5b436
by wurstsalat at 2021-11-10T22:22:18+01:00
-
b2b98833
by wurstsalat at 2021-11-10T22:23:51+01:00
3 changed files:
Changes:
| ... | ... | @@ -121,9 +121,9 @@ def __init__(self, widget_name, account, jid): |
| 121 | 121 |
self.control_id = str(uuid.uuid4())
|
| 122 | 122 |
self.session = None
|
| 123 | 123 |
|
| 124 |
- self.xml = get_builder('%s.ui' % widget_name)
|
|
| 124 |
+ self.xml = get_builder(f'{widget_name}.ui')
|
|
| 125 | 125 |
self.xml.connect_signals(self)
|
| 126 |
- self.widget = self.xml.get_object('%s_hbox' % widget_name)
|
|
| 126 |
+ self.widget = self.xml.get_object(f'{widget_name}_hbox')
|
|
| 127 | 127 |
|
| 128 | 128 |
self._account_badge = AccountBadge(self.account)
|
| 129 | 129 |
self.xml.account_badge_box.add(self._account_badge)
|
| ... | ... | @@ -192,7 +192,7 @@ def __init__(self, widget_name, account, jid): |
| 192 | 192 |
|
| 193 | 193 |
# Send message button
|
| 194 | 194 |
self.xml.send_message_button.set_action_name(
|
| 195 |
- 'win.send-message-%s' % self.control_id)
|
|
| 195 |
+ f'win.send-message-{self.control_id}')
|
|
| 196 | 196 |
self.xml.send_message_button.set_visible(
|
| 197 | 197 |
app.settings.get('show_send_message_button'))
|
| 198 | 198 |
app.settings.bind_signal(
|
| ... | ... | @@ -507,7 +507,7 @@ def delegate_action(self, action): |
| 507 | 507 |
|
| 508 | 508 |
def add_actions(self):
|
| 509 | 509 |
action = Gio.SimpleAction.new_stateful(
|
| 510 |
- 'set-encryption-%s' % self.control_id,
|
|
| 510 |
+ f'set-encryption-{self.control_id}',
|
|
| 511 | 511 |
GLib.VariantType.new('s'),
|
| 512 | 512 |
GLib.Variant('s', self.encryption or 'disabled'))
|
| 513 | 513 |
action.connect('change-state', self.change_encryption)
|
| ... | ... | @@ -759,7 +759,7 @@ def _paste_event_confirmed(self, is_checked, image): |
| 759 | 759 |
app.settings.set('confirm_paste_image', False)
|
| 760 | 760 |
|
| 761 | 761 |
dir_ = tempfile.gettempdir()
|
| 762 |
- path = os.path.join(dir_, '%s.png' % str(uuid.uuid4()))
|
|
| 762 |
+ path = os.path.join(dir_, f'{uuid.uuid4()}.png')
|
|
| 763 | 763 |
image.savev(path, 'png', [], [])
|
| 764 | 764 |
|
| 765 | 765 |
self._start_filetransfer(path)
|
| ... | ... | @@ -768,9 +768,9 @@ def _get_pref_ft_method(self): |
| 768 | 768 |
ft_pref = app.settings.get_account_setting(self.account,
|
| 769 | 769 |
'filetransfer_preference')
|
| 770 | 770 |
httpupload = app.window.lookup_action(
|
| 771 |
- 'send-file-httpupload-%s' % self.control_id)
|
|
| 771 |
+ f'send-file-httpupload-{self.control_id}')
|
|
| 772 | 772 |
jingle = app.window.lookup_action(
|
| 773 |
- 'send-file-jingle-%s' % self.control_id)
|
|
| 773 |
+ f'send-file-jingle-{self.control_id}')
|
|
| 774 | 774 |
|
| 775 | 775 |
if self._type.is_groupchat:
|
| 776 | 776 |
if httpupload.get_enabled():
|
| ... | ... | @@ -99,7 +99,7 @@ def __init__(self, account, jid): |
| 99 | 99 |
self.xml.banner_eventbox.set_no_show_all(False)
|
| 100 | 100 |
|
| 101 | 101 |
self.xml.sendfile_button.set_action_name(
|
| 102 |
- 'win.send-file-%s' % self.control_id)
|
|
| 102 |
+ f'win.send-file-{self.control_id}')
|
|
| 103 | 103 |
|
| 104 | 104 |
self._call_widget = CallWidget(self.account, self.contact)
|
| 105 | 105 |
self._call_widget.connect('incoming-call', self._add_incoming_call)
|
| ... | ... | @@ -335,7 +335,7 @@ def _update_pep(self, type_): |
| 335 | 335 |
return
|
| 336 | 336 |
|
| 337 | 337 |
if type_ == PEPEventType.MOOD:
|
| 338 |
- icon = 'mood-%s' % data.mood
|
|
| 338 |
+ icon = f'mood-{data.mood}'
|
|
| 339 | 339 |
formated_text = format_mood(*data)
|
| 340 | 340 |
elif type_ == PEPEventType.ACTIVITY:
|
| 341 | 341 |
icon = get_activity_icon_name(data.activity, data.subactivity)
|
| ... | ... | @@ -428,7 +428,6 @@ def _on_message_received(self, event): |
| 428 | 428 |
self.add_message(event.msgtxt,
|
| 429 | 429 |
kind,
|
| 430 | 430 |
tim=event.properties.timestamp,
|
| 431 |
- subject=event.properties.subject,
|
|
| 432 | 431 |
displaymarking=event.displaymarking,
|
| 433 | 432 |
msg_log_id=event.msg_log_id,
|
| 434 | 433 |
message_id=event.properties.id,
|
| ... | ... | @@ -601,7 +600,6 @@ def add_message(self, |
| 601 | 600 |
text,
|
| 602 | 601 |
kind,
|
| 603 | 602 |
tim=None,
|
| 604 |
- subject=None,
|
|
| 605 | 603 |
displaymarking=None,
|
| 606 | 604 |
msg_log_id=None,
|
| 607 | 605 |
stanza_id=None,
|
| ... | ... | @@ -215,7 +215,6 @@ def add_message(self, |
| 215 | 215 |
correct_id=None,
|
| 216 | 216 |
display_marking=None,
|
| 217 | 217 |
additional_data=None,
|
| 218 |
- subject=None,
|
|
| 219 | 218 |
marker=None,
|
| 220 | 219 |
error=None):
|
| 221 | 220 |
|