| ... |
... |
@@ -21,6 +21,7 @@ |
|
21
|
21
|
|
|
22
|
22
|
from .groupchat_info import GroupChatInfoScrolled
|
|
23
|
23
|
from .groupchat_nick import NickChooser
|
|
|
24
|
+from .util import generate_account_badge
|
|
24
|
25
|
|
|
25
|
26
|
|
|
26
|
27
|
class GroupChatInvitation(Gtk.ApplicationWindow):
|
| ... |
... |
@@ -50,9 +51,18 @@ def __init__(self, account, event): |
|
50
|
51
|
separator = Gtk.Separator()
|
|
51
|
52
|
contact_label = Gtk.Label(label=event.get_inviter_name())
|
|
52
|
53
|
contact_label.get_style_context().add_class('bold16')
|
|
53
|
|
- contact_label.set_halign(Gtk.Align.CENTER)
|
|
54
|
|
- contact_label.set_justify(Gtk.Justification.CENTER)
|
|
55
|
54
|
contact_label.set_line_wrap(True)
|
|
|
55
|
+ contact_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=6)
|
|
|
56
|
+ contact_box.set_halign(Gtk.Align.CENTER)
|
|
|
57
|
+ contact_box.add(contact_label)
|
|
|
58
|
+
|
|
|
59
|
+ enabled_accounts = app.get_enabled_accounts_with_labels()
|
|
|
60
|
+ if len(enabled_accounts) > 1:
|
|
|
61
|
+ account_badge = generate_account_badge(account)
|
|
|
62
|
+ account_badge.set_tooltip_text(
|
|
|
63
|
+ _('Account: %s') % app.get_account_label(account))
|
|
|
64
|
+ contact_box.add(account_badge)
|
|
|
65
|
+
|
|
56
|
66
|
invitation_label = Gtk.Label(
|
|
57
|
67
|
label=_('has invited you to a group chat.\nDo you want to join?'))
|
|
58
|
68
|
invitation_label.set_halign(Gtk.Align.CENTER)
|
| ... |
... |
@@ -61,7 +71,7 @@ def __init__(self, account, event): |
|
61
|
71
|
invitation_label.set_line_wrap(True)
|
|
62
|
72
|
|
|
63
|
73
|
main_box.add(separator)
|
|
64
|
|
- main_box.add(contact_label)
|
|
|
74
|
+ main_box.add(contact_box)
|
|
65
|
75
|
main_box.add(invitation_label)
|
|
66
|
76
|
|
|
67
|
77
|
decline_button = Gtk.Button.new_with_mnemonic(_('_Decline'))
|