Daniel Brötzmann pushed to branch master at gajim / gajim
Commits: 4c5cd191 by wurstsalat at 2021-12-23T20:57:19+01:00 GroupChatInfo: Improve layout and args
- - - - - 50fdeece by wurstsalat at 2021-12-23T20:59:48+01:00 GroupchatControl: Improve layout
- - - - - 6115adf4 by wurstsalat at 2021-12-23T21:01:11+01:00 Rework groupchat invitations
- - - - -
12 changed files:
- gajim/data/gui/groupchat_control.ui - gajim/data/gui/groupchat_info_scrolled.ui - − gajim/data/gui/groupchat_invite.ui - + gajim/data/gui/groupchat_inviter.ui - gajim/data/style/gajim.css - gajim/gtk/add_contact.py - + gajim/gtk/contacts_flowbox.py - gajim/gtk/controls/groupchat.py - gajim/gtk/groupchat_info.py - gajim/gtk/groupchat_invitation.py - gajim/gtk/groupchat_invite.py → gajim/gtk/groupchat_inviter.py - test/gtk/groupchat_info.py
Changes:
===================================== gajim/data/gui/groupchat_control.ui ===================================== @@ -184,7 +184,6 @@ <property name="spacing">3</property> <child> <object class="GtkBox" id="textview_box"> - <property name="width-request">0</property> <property name="visible">True</property> <property name="can-focus">False</property> <property name="margin-end">4</property> @@ -619,7 +618,7 @@ <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=3 n-rows=3 --> + <!-- n-columns=1 n-rows=3 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -708,24 +707,6 @@ <property name="top-attach">2</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -745,7 +726,7 @@ <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=3 n-rows=3 --> + <!-- n-columns=1 n-rows=3 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -843,24 +824,6 @@ <property name="top-attach">1</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -880,7 +843,7 @@ <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=3 n-rows=3 --> + <!-- n-columns=1 n-rows=3 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -969,24 +932,6 @@ <property name="top-attach">1</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -1006,7 +951,7 @@ <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=3 n-rows=3 --> + <!-- n-columns=1 n-rows=2 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -1079,27 +1024,6 @@ <property name="top-attach">0</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -1119,7 +1043,7 @@ <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=3 n-rows=4 --> + <!-- n-columns=1 n-rows=4 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -1239,30 +1163,6 @@ <property name="top-attach">1</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -1282,7 +1182,7 @@ <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=3 n-rows=3 --> + <!-- n-columns=1 n-rows=3 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -1370,24 +1270,6 @@ <property name="top-attach">1</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -1407,7 +1289,7 @@ <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=3 n-rows=3 --> + <!-- n-columns=1 n-rows=3 --> <object class="GtkGrid" id="info_grid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -1477,24 +1359,6 @@ <property name="top-attach">1</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> <style> <class name="margin-18"/> </style> @@ -1517,7 +1381,7 @@ <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=3 n-rows=4 --> + <!-- n-columns=1 n-rows=4 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -1625,30 +1489,6 @@ <property name="top-attach">1</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -1668,7 +1508,7 @@ <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=3 n-rows=4 --> + <!-- n-columns=1 n-rows=4 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -1776,30 +1616,6 @@ <property name="top-attach">1</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -1819,7 +1635,7 @@ <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=3 n-rows=6 --> + <!-- n-columns=1 n-rows=6 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -1960,42 +1776,6 @@ <property name="top-attach">3</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -2015,7 +1795,7 @@ <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=3 n-rows=3 --> + <!-- n-columns=1 n-rows=3 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -2104,24 +1884,6 @@ <property name="top-attach">2</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -2141,7 +1903,7 @@ <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=3 n-rows=3 --> + <!-- n-columns=1 n-rows=2 --> <object class="GtkGrid" id="invite_grid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -2201,27 +1963,6 @@ <child> <placeholder/> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -2241,7 +1982,7 @@ <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=3 n-rows=3 --> + <!-- n-columns=1 n-rows=3 --> <object class="GtkGrid" id="settings_grid"> <property name="name">settings_grid</property> <property name="visible">True</property> @@ -2330,24 +2071,6 @@ <property name="top-attach">1</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> <style> <class name="margin-18"/> </style> @@ -2431,7 +2154,7 @@ </packing> </child> <child> - <!-- n-columns=3 n-rows=3 --> + <!-- n-columns=2 n-rows=2 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -2491,21 +2214,6 @@ <property name="top-attach">1</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property> @@ -2599,7 +2307,7 @@ <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=3 n-rows=3 --> + <!-- n-columns=1 n-rows=3 --> <object class="GtkGrid" id="avatar_selector_grid"> <property name="name">settings_grid</property> <property name="visible">True</property> @@ -2689,24 +2397,6 @@ <child> <placeholder/> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="expand">False</property>
===================================== gajim/data/gui/groupchat_info_scrolled.ui ===================================== @@ -2,7 +2,7 @@ <!-- Generated with glade 3.38.2 --> <interface> <requires lib="gtk+" version="3.20"/> - <!-- n-columns=3 n-rows=10 --> + <!-- n-columns=2 n-rows=10 --> <object class="GtkGrid" id="info_grid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -82,6 +82,7 @@ <property name="wrap">True</property> <property name="wrap-mode">word-char</property> <property name="selectable">True</property> + <property name="max-width-chars">40</property> <property name="xalign">0</property> </object> <packing> @@ -95,6 +96,10 @@ <property name="no-show-all">True</property> <property name="halign">start</property> <property name="valign">start</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="max-width-chars">40</property> + <property name="xalign">0</property> </object> <packing> <property name="left-attach">1</property> @@ -151,6 +156,9 @@ <property name="no-show-all">True</property> <property name="halign">start</property> <property name="valign">start</property> + <property name="wrap">True</property> + <property name="max-width-chars">40</property> + <property name="xalign">0</property> </object> <packing> <property name="left-attach">1</property> @@ -159,7 +167,6 @@ </child> <child> <object class="GtkLinkButton" id="logs"> - <property name="label" translatable="yes">button</property> <property name="can-focus">True</property> <property name="receives-default">True</property> <property name="no-show-all">True</property> @@ -237,6 +244,7 @@ <property name="wrap">True</property> <property name="wrap-mode">word-char</property> <property name="selectable">True</property> + <property name="max-width-chars">40</property> <property name="xalign">0</property> <signal name="activate-link" handler="_on_activate_subject_link" swapped="no"/> </object> @@ -254,7 +262,7 @@ <property name="selectable">True</property> <property name="ellipsize">end</property> <property name="single-line-mode">True</property> - <property name="max-width-chars">40</property> + <property name="max-width-chars">30</property> <style> <class name="large-header"/> </style> @@ -285,12 +293,13 @@ <property name="spacing">12</property> <child> <object class="GtkLabel" id="address"> - <property name="width-request">240</property> + <property name="width-request">200</property> <property name="visible">True</property> <property name="can-focus">False</property> <property name="halign">start</property> <property name="selectable">True</property> <property name="ellipsize">middle</property> + <property name="single-line-mode">True</property> <property name="max-width-chars">30</property> <property name="xalign">0</property> </object> @@ -332,35 +341,5 @@ <property name="top-attach">2</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> </interface>
===================================== gajim/data/gui/groupchat_invite.ui deleted ===================================== @@ -1,238 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.1 --> -<interface> - <requires lib="gtk+" version="3.20"/> - <object class="GtkListStore" id="account_store"> - <columns> - <!-- column-name icon --> - <column type="GdkPixbuf"/> - <!-- column-name account --> - <column type="gchararray"/> - <!-- column-name account_label --> - <column type="gchararray"/> - </columns> - </object> - <object class="GtkBox" id="contacts_placeholder"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="orientation">vertical</property> - <property name="spacing">12</property> - <child> - <object class="GtkImage"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="icon_name">avatar-default-symbolic</property> - <property name="icon_size">6</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">No contacts left. -You can also type an XMPP address.</property> - <property name="justify">center</property> - <property name="wrap">True</property> - <property name="max_width_chars">35</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - <object class="GtkGrid" id="invite_grid"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="row_spacing">6</property> - <property name="column_spacing">24</property> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Invitees</property> - <style> - <class name="bold16"/> - </style> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Contacts</property> - <style> - <class name="bold16"/> - </style> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="vexpand">True</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkScrolledWindow" id="invitees"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="hscrollbar_policy">never</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkViewport"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <object class="GtkListBox" id="invitees_listbox"> - <property name="name">StartChatListBox</property> - <property name="width_request">300</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">False</property> - <property name="selection_mode">browse</property> - </object> - </child> - </object> - </child> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="vexpand">True</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkSearchEntry" id="search_entry"> - <property name="width_request">300</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="has_focus">True</property> - <property name="is_focus">True</property> - <property name="hexpand">True</property> - <property name="primary_icon_name">edit-find-symbolic</property> - <property name="primary_icon_activatable">False</property> - <property name="primary_icon_sensitive">False</property> - <property name="placeholder_text" translatable="yes">Search contacts...</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkScrolledWindow" id="scrolledwindow"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">never</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkViewport"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <object class="GtkListBox" id="contacts_listbox"> - <property name="name">StartChatListBox</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="vexpand">True</property> - <property name="selection_mode">browse</property> - </object> - </child> - </object> - </child> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - </packing> - </child> - </object> - <object class="GtkBox" id="invitees_placeholder"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="orientation">vertical</property> - <property name="spacing">12</property> - <child> - <object class="GtkImage"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="icon_name">contact-new-symbolic</property> - <property name="icon_size">6</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Click on contacts you would like to invite to this group chat.</property> - <property name="justify">center</property> - <property name="wrap">True</property> - <property name="max_width_chars">35</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> -</interface>
===================================== gajim/data/gui/groupchat_inviter.ui ===================================== @@ -0,0 +1,179 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.38.2 --> +<interface> + <requires lib="gtk+" version="3.24"/> + <object class="GtkListStore" id="account_store"> + <columns> + <!-- column-name icon --> + <column type="GdkPixbuf"/> + <!-- column-name account --> + <column type="gchararray"/> + <!-- column-name account_label --> + <column type="gchararray"/> + </columns> + </object> + <object class="GtkBox" id="invite_box"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes">Invite Contacts</property> + <style> + <class name="bold16"/> + </style> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSearchEntry" id="search_entry"> + <property name="width-request">300</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="has-focus">True</property> + <property name="is-focus">True</property> + <property name="hexpand">True</property> + <property name="primary-icon-name">edit-find-symbolic</property> + <property name="primary-icon-activatable">False</property> + <property name="primary-icon-sensitive">False</property> + <property name="placeholder-text" translatable="yes">Search contacts...</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkScrolledWindow" id="scrolledwindow"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="hscrollbar-policy">never</property> + <property name="shadow-type">in</property> + <property name="min-content-height">100</property> + <child> + <object class="GtkViewport"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <child> + <object class="GtkListBox" id="contacts_listbox"> + <property name="name">StartChatListBox</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="vexpand">True</property> + <property name="selection-mode">browse</property> + <child type="placeholder"> + <object class="GtkBox" id="contacts_placeholder"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child> + <object class="GtkImage"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="icon-name">avatar-default-symbolic</property> + <property name="icon_size">6</property> + <style> + <class name="dim-label"/> + </style> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes">No contacts left. +You can also type an XMPP address.</property> + <property name="justify">center</property> + <property name="wrap">True</property> + <property name="max-width-chars">35</property> + <style> + <class name="dim-label"/> + </style> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="margin-top">6</property> + <property name="label" translatable="yes">Invitees</property> + <style> + <class name="bold"/> + </style> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes">Click on contacts you would like to invite to this group chat.</property> + <property name="justify">center</property> + <property name="wrap">True</property> + <property name="max-width-chars">42</property> + <style> + <class name="dim-label"/> + </style> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkScrolledWindow" id="invitees_scrolled"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="shadow-type">in</property> + <property name="min-content-height">100</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">5</property> + </packing> + </child> + </object> +</interface>
===================================== gajim/data/style/gajim.css ===================================== @@ -635,6 +635,20 @@ .start-chat-row { padding: 10px 20px 10px 10px; } .start-chat-row:not(.activatable) label { color: @insensitive_fg_color; } .start-chat-row:focus { outline: none; }
+/* ContactFlowBox */ +.contact-flowbox-item { + background-color: alpha(@borders, 0.4); + border-radius: 12px; + padding: 6px; +} +.contact-flowbox-item button { + background: none; + border: 1px solid alpha(@borders, 0.4); +} +.contact-flowbox-item button:hover { + border: 1px solid @borders; +} + /* GroupChatRoster */ .groupchat-roster { border-left: 1px solid; border-color: @borders; }
===================================== gajim/gtk/add_contact.py ===================================== @@ -477,7 +477,7 @@ def __init__(self) -> None: heading.set_justify(Gtk.Justification.CENTER) self.pack_start(heading, False, True, 0)
- self._info_box = GroupChatInfoScrolled(options={'minimal': True}) + self._info_box = GroupChatInfoScrolled(minimal=True) self.pack_start(self._info_box, True, True, 0)
self.show_all()
===================================== gajim/gtk/contacts_flowbox.py ===================================== @@ -0,0 +1,105 @@ +# +# Gajim is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; version 3 only. +# +# Gajim is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Gajim. If not, see http://www.gnu.org/licenses/. + +from typing import List + +from gi.repository import GObject +from gi.repository import Gtk +from gi.repository import Pango + +from gajim.common import app +from gajim.common.const import AvatarSize +from gajim.common.i18n import _ + + +class ContactItem(Gtk.FlowBoxChild): + def __init__(self, account: str, jid: str) -> None: + Gtk.FlowBoxChild.__init__(self) + self.set_size_request(150, -1) + + self.account = account + self.jid = jid + + client = app.get_client(account) + contact = client.get_module('Contacts').get_contact(jid) + + surface = contact.get_avatar( + AvatarSize.ROSTER, self.get_scale_factor()) + avatar_image = Gtk.Image.new_from_surface(surface) + + name_label = Gtk.Label(label=contact.name) + name_label.set_tooltip_text(contact.name) + name_label.set_ellipsize(Pango.EllipsizeMode.END) + name_label.set_max_width_chars(12) + name_label.get_style_context().add_class('bold') + + remove_button = Gtk.Button.new_from_icon_name( + 'window-close', Gtk.IconSize.BUTTON) + remove_button.set_valign(Gtk.Align.CENTER) + remove_button.set_halign(Gtk.Align.END) + remove_button.set_hexpand(True) + remove_button.set_relief(Gtk.ReliefStyle.NONE) + remove_button.set_tooltip_text(_('Remove')) + remove_button.connect('clicked', self._on_remove) + + box = Gtk.Box(spacing=6) + box.set_valign(Gtk.Align.CENTER) + box.add(avatar_image) + box.add(name_label) + box.add(remove_button) + box.get_style_context().add_class('contact-flowbox-item') + self.add(box) + self.show_all() + + def _on_remove(self, _button: Gtk.Button) -> None: + self.get_parent().on_contact_removed(self) + + +class ContactsFlowBox(Gtk.FlowBox): + + __gsignals__ = { + 'contact-removed': (GObject.SignalFlags.RUN_LAST, None, (str, str)) + } + + def __init__(self) -> None: + Gtk.FlowBox.__init__(self) + self.set_column_spacing(6) + self.set_row_spacing(3) + self.set_selection_mode(Gtk.SelectionMode.NONE) + self.set_valign(Gtk.Align.START) + self.show_all() + + def clear(self) -> None: + def _remove(item): + self.remove(item) + item.destroy() + self.foreach(_remove) + + def add_contact(self, account: str, jid: str) -> None: + contact_item = ContactItem(account, jid) + self.add(contact_item) + + def has_contacts(self) -> bool: + return bool(self.get_child_at_index(0) is not None) + + def get_contact_jids(self) -> List[str]: + contacts = [] + for contact in self.get_children(): + contacts.append(contact.jid) + return contacts + + def on_contact_removed(self, row: ContactItem) -> None: + account = row.account + jid = row.jid + row.destroy() + self.emit('contact-removed', account, jid)
===================================== gajim/gtk/controls/groupchat.py ===================================== @@ -75,7 +75,7 @@ from gajim.gui.avatar_selector import AvatarSelector from gajim.gui.dataform import DataFormWidget from gajim.gui.groupchat_info import GroupChatInfoScrolled -from gajim.gui.groupchat_invite import GroupChatInvite +from gajim.gui.groupchat_inviter import GroupChatInviter from gajim.gui.groupchat_settings import GroupChatSettings from gajim.gui.groupchat_roster import GroupchatRoster from gajim.gui.groupchat_state import GroupchatState @@ -166,7 +166,7 @@ def __init__(self, account: str, jid: JID) -> None:
# MUC Info self._subject_data = None - self._muc_info_box = GroupChatInfoScrolled(self.account, {'width': 600}) + self._muc_info_box = GroupChatInfoScrolled(self.account) self.xml.info_box.add(self._muc_info_box)
# Groupchat settings @@ -180,7 +180,7 @@ def __init__(self, account: str, jid: JID) -> None: self.xml.quick_invite_button.set_action_name( f'win.invite-{self.control_id}')
- self._invite_box = GroupChatInvite(self.room_jid) + self._invite_box = GroupChatInviter(self.room_jid) self.xml.invite_grid.attach(self._invite_box, 0, 0, 1, 1) self._invite_box.connect('listbox-changed', self._on_invite_ready)
===================================== gajim/gtk/groupchat_info.py ===================================== @@ -12,8 +12,6 @@ # You should have received a copy of the GNU General Public License # along with Gajim. If not, see http://www.gnu.org/licenses/.
-from typing import Any -from typing import Dict from typing import List from typing import Optional
@@ -106,21 +104,21 @@ class GroupChatInfoScrolled(Gtk.ScrolledWindow): def __init__(self, account: Optional[str] = None, - options: Optional[Dict[str, Any]] = None + width: Optional[int] = 300, + minimal: Optional[bool] = False ) -> None: Gtk.ScrolledWindow.__init__(self) - if options is None: - options = {} - - self._minimal = options.get('minimal', False) - - self.set_size_request(options.get('width', 400), -1) + self.set_size_request(width, -1) self.set_halign(Gtk.Align.CENTER)
- if self._minimal: + self._minimal = minimal + + if minimal: self.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER) else: self.set_vexpand(True) + self.set_hexpand(True) + self.set_propagate_natural_width(True) self.set_min_content_height(400) self.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
===================================== gajim/gtk/groupchat_invitation.py ===================================== @@ -44,7 +44,7 @@ def __init__(self, account, event): main_box.set_valign(Gtk.Align.FILL) main_box.get_style_context().add_class('padding-18')
- muc_info_box = GroupChatInfoScrolled(account, {'minimal': True}) + muc_info_box = GroupChatInfoScrolled(account, minimal=True) muc_info_box.set_from_disco_info(event.info) main_box.add(muc_info_box)
===================================== gajim/gtk/groupchat_invite.py → gajim/gtk/groupchat_inviter.py ===================================== @@ -12,6 +12,10 @@ # You should have received a copy of the GNU General Public License # along with Gajim. If not, see http://www.gnu.org/licenses/.
+from __future__ import annotations +from typing import List +from typing import Optional + import locale
from gi.repository import Gdk @@ -21,66 +25,154 @@ from gi.repository import Pango
from gajim.common import app +from gajim.common import types from gajim.common.i18n import _ from gajim.common.const import AvatarSize +from gajim.common.const import Direction from gajim.common.helpers import validate_jid
from .builder import get_builder +from .contacts_flowbox import ContactsFlowBox from .util import AccountBadge
-class GroupChatInvite(Gtk.Box): +class ContactRow(Gtk.ListBoxRow): + def __init__(self, + account: str, + contact: Optional[types.BareContact], + jid: str, + name: str, + show_account: bool + ) -> None: + Gtk.ListBoxRow.__init__(self) + self.get_style_context().add_class('start-chat-row') + self.account = account + self.jid = jid + + self._contact = contact + self._name = name + self._show_account = show_account + + self._account_label = app.get_account_label(account) + self.is_new: bool = jid == '' + + grid = Gtk.Grid() + grid.set_column_spacing(12) + grid.set_size_request(260, -1) + + image = self._get_avatar_image(contact) + image.set_size_request(AvatarSize.ROSTER, AvatarSize.ROSTER) + grid.add(image) + + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0) + box.set_hexpand(True) + + if self._name is None: + self._name = _('Invite New Contact') + + self._name_label = Gtk.Label(label=self._name) + self._name_label.set_ellipsize(Pango.EllipsizeMode.END) + self._name_label.set_xalign(0) + self._name_label.set_width_chars(20) + self._name_label.set_halign(Gtk.Align.START) + self._name_label.get_style_context().add_class('bold16') + name_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=6) + name_box.add(self._name_label) + + if show_account: + account_badge = AccountBadge(account) + account_badge.set_halign(Gtk.Align.END) + account_badge.set_valign(Gtk.Align.START) + account_badge.set_hexpand(True) + name_box.add(account_badge) + box.add(name_box) + + self._jid_label = Gtk.Label(label=str(jid)) + self._jid_label.set_tooltip_text(str(jid)) + self._jid_label.set_ellipsize(Pango.EllipsizeMode.END) + self._jid_label.set_xalign(0) + self._jid_label.set_width_chars(22) + self._jid_label.set_halign(Gtk.Align.START) + self._jid_label.get_style_context().add_class('dim-label') + box.add(self._jid_label) + + grid.add(box) + + self.add(grid) + self.show_all() + + def _get_avatar_image(self, contact: types.BareContact) -> Gtk.Image: + if self.is_new: + icon_name = 'avatar-default' + return Gtk.Image.new_from_icon_name(icon_name, Gtk.IconSize.DND) + + scale = self.get_scale_factor() + surface = contact.get_avatar(AvatarSize.ROSTER, scale) + return Gtk.Image.new_from_surface(surface) + + def update_jid(self, jid: str) -> None: + self.jid = jid + self._jid_label.set_text(jid) + + def get_search_text(self): + if self._contact is None: + return str(self.jid) + if self._show_account: + return f'{self._name} {self.jid} {self._account_label}' + return f'{self._name} {self.jid}' + + +class GroupChatInviter(Gtk.Box): __gsignals__ = { 'listbox-changed': (GObject.SignalFlags.RUN_LAST, None, (bool,)) }
- def __init__(self, room_jid): + def __init__(self, room_jid: str) -> None: Gtk.Box.__init__(self) - self.set_size_request(-1, 300) - self._ui = get_builder('groupchat_invite.ui') - self.add(self._ui.invite_grid) + self.set_size_request(-1, 250) + self._ui = get_builder('groupchat_inviter.ui') + self.add(self._ui.invite_box) + + self._invitees_box = ContactsFlowBox() + self._invitees_box.connect('contact-removed', self._on_invitee_removed) + self._ui.invitees_scrolled.add(self._invitees_box)
self._ui.contacts_listbox.set_filter_func(self._filter_func, None) self._ui.contacts_listbox.set_sort_func(self._sort_func, None) - self._ui.contacts_listbox.set_placeholder(self._ui.contacts_placeholder) - self._ui.contacts_listbox.connect('row-activated', - self._on_contacts_row_activated) + self._ui.contacts_listbox.connect( + 'row-activated', self._on_contacts_row_activated)
- self._ui.invitees_listbox.set_sort_func(self._sort_func, None) - self._ui.invitees_listbox.set_placeholder( - self._ui.invitees_placeholder) - self._ui.invitees_listbox.connect('row-activated', - self._on_invitees_row_activated) + self._room_jid = room_jid
self._new_contact_row_visible = False - self._room_jid = room_jid + self._new_contact_rows: dict[str, Optional[ContactRow]] = {} + self._accounts: list[list[str]] = []
- self._ui.search_entry.connect('search-changed', - self._on_search_changed) - self._ui.search_entry.connect('next-match', - self._select_new_match, 'next') - self._ui.search_entry.connect('previous-match', - self._select_new_match, 'prev') + self._ui.search_entry.connect( + 'search-changed', self._on_search_changed) + self._ui.search_entry.connect( + 'next-match', self._select_new_match, Direction.NEXT) + self._ui.search_entry.connect( + 'previous-match', self._select_new_match, Direction.PREV) self._ui.search_entry.connect( 'stop-search', lambda *args: self._ui.search_entry.set_text('')) - self._ui.search_entry.connect('activate', - self._on_search_activate) + self._ui.search_entry.connect( + 'activate', self._on_search_activate) self.connect('key-press-event', self._on_key_press) self._ui.connect_signals(self)
self.show_all()
- def _add_accounts(self): + def _add_accounts(self) -> None: for account in self._accounts: self._ui.account_store.append([None, *account])
- def _add_contacts(self): + def _add_contacts(self) -> None: show_account = len(self._accounts) > 1 for account, _label in self._accounts: - self.new_contact_rows[account] = None + self._new_contact_rows[account] = None client = app.get_client(account) for contact in client.get_module('Roster').iter_contacts(): - # Exclude group chats if contact.is_groupchat: continue @@ -88,12 +180,18 @@ def _add_contacts(self): if contact.jid == client.get_own_jid().bare: continue
- row = ContactRow(account, contact, contact.jid, - contact.name, show_account) + row = ContactRow(account, + contact, + str(contact.jid), + contact.name, + show_account) self._ui.contacts_listbox.add(row)
- def _on_contacts_row_activated(self, listbox, row): - if row.new: + def _on_contacts_row_activated(self, + listbox: Gtk.ListBox, + row: Gtk.ListBoxRow + ) -> None: + if row.is_new: jid = row.jid try: validate_jid(jid) @@ -104,35 +202,42 @@ def _on_contacts_row_activated(self, listbox, row): self._ui.search_entry.set_icon_tooltip_text( Gtk.EntryIconPosition.SECONDARY, str(error)) return + self._ui.search_entry.set_icon_from_icon_name( Gtk.EntryIconPosition.SECONDARY, None) - show_account = len(self._accounts) > 1 - row = ContactRow( - row.account, None, '', None, show_account) - row.update_jid(jid) - self._remove_new_jid_row() - else: + self._remove_new_contact_row() + + self._invitees_box.add_contact(row.account, row.jid) + + if not row.is_new: listbox.remove(row) - self._ui.invitees_listbox.add(row) - self._ui.invitees_listbox.unselect_row(row) - self._ui.search_entry.set_text('') + row.destroy()
+ self._ui.search_entry.set_text('') GLib.timeout_add(50, self._select_first_row) self._ui.search_entry.grab_focus()
- invitable = self._ui.invitees_listbox.get_row_at_index(0) is not None + invitable = self._invitees_box.has_contacts() self.emit('listbox-changed', invitable)
- def _on_invitees_row_activated(self, listbox, row): - listbox.remove(row) - if not row.new: - self._ui.contacts_listbox.add(row) - self._ui.contacts_listbox.unselect_row(row) + def _on_invitee_removed(self, + flowbox: ContactsFlowBox, + account: str, + jid: str + ) -> None: + show_account = len(self._accounts) > 1 + client = app.get_client(account) + contact = client.get_module('Contacts').get_contact(jid) + row = ContactRow(account, + contact, + str(contact.jid), + contact.name, + show_account) + self._ui.contacts_listbox.add(row) self._ui.search_entry.grab_focus() - invitable = listbox.get_row_at_index(0) is not None - self.emit('listbox-changed', invitable) + self.emit('listbox-changed', flowbox.has_contacts())
- def _on_key_press(self, _widget, event): + def _on_key_press(self, _widget: Gtk.Widget, event: Gdk.EventKey) -> int: if event.keyval == Gdk.KEY_Down: self._ui.search_entry.emit('next-match') return Gdk.EVENT_STOP @@ -151,50 +256,59 @@ def _on_key_press(self, _widget, event):
return Gdk.EVENT_PROPAGATE
- def _on_search_activate(self, _entry): + def _on_search_activate(self, _entry: Gtk.SearchEntry) -> None: row = self._ui.contacts_listbox.get_selected_row() if row is not None and row.get_child_visible(): row.emit('activate')
- def _on_search_changed(self, entry): + def _on_search_changed(self, entry: Gtk.SearchEntry) -> None: search_text = entry.get_text() if '@' in search_text: - self._add_new_jid_row() - self._update_new_jid_rows(search_text) + self._add_new_contact_row() + self._update_new_contact_rows(search_text) else: - self._remove_new_jid_row() + self._remove_new_contact_row() self._ui.contacts_listbox.invalidate_filter()
- def _add_new_jid_row(self): + def _add_new_contact_row(self) -> None: if self._new_contact_row_visible: return - for account in self.new_contact_rows: + + for account in self._new_contact_rows: show_account = len(self._accounts) > 1 - row = ContactRow(account, None, '', None, show_account) - self.new_contact_rows[account] = row + row = ContactRow(account, + None, + '', + None, + show_account) + self._new_contact_rows[account] = row self._ui.contacts_listbox.add(row) row.get_parent().show_all() self._new_contact_row_visible = True
- def _remove_new_jid_row(self): + def _remove_new_contact_row(self) -> None: if not self._new_contact_row_visible: return - for row in self.new_contact_rows.values(): + + for row in self._new_contact_rows.values(): self._ui.contacts_listbox.remove(row) self._new_contact_row_visible = False
- def _update_new_jid_rows(self, search_text): - for row in self.new_contact_rows.values(): + def _update_new_contact_rows(self, search_text: str) -> None: + for row in self._new_contact_rows.values(): row.update_jid(search_text)
- def _select_new_match(self, _entry, direction): + def _select_new_match(self, + _entry: Gtk.SearchEntry, + direction: Direction + ) -> None: selected_row = self._ui.contacts_listbox.get_selected_row() if selected_row is None: return
index = selected_row.get_index()
- if direction == 'next': + if direction == Direction.NEXT: index += 1 else: index -= 1 @@ -207,31 +321,37 @@ def _select_new_match(self, _entry, direction): self._ui.contacts_listbox.select_row(new_selected_row) new_selected_row.grab_focus() return - if direction == 'next': + if direction == Direction.NEXT: index += 1 else: index -= 1
- def _select_first_row(self): + def _select_first_row(self) -> None: first_row = self._ui.contacts_listbox.get_row_at_y(0) self._ui.contacts_listbox.select_row(first_row)
- def _scroll_to_first_row(self): + def _scroll_to_first_row(self) -> None: self._ui.scrolledwindow.get_vadjustment().set_value(0)
- def _filter_func(self, row, _user_data): + def _filter_func(self, + row: ContactRow, + _user_data: Optional[object] + ) -> bool: search_text = self._ui.search_entry.get_text().lower() search_text_list = search_text.split() row_text = row.get_search_text().lower() for text in search_text_list: if text not in row_text: GLib.timeout_add(50, self._select_first_row) - return None + return False GLib.timeout_add(50, self._select_first_row) return True
@staticmethod - def _sort_func(row1, row2, _user_data): + def _sort_func(row1: ContactRow, + row2: ContactRow, + _user_data: Optional[object] + ) -> int: name1 = row1.get_search_text() name2 = row2.get_search_text() account1 = row1.account @@ -243,101 +363,29 @@ def _sort_func(row1, row2, _user_data):
return locale.strcoll(name1.lower(), name2.lower())
- def load_contacts(self): - self._ui.contacts_listbox.foreach(self._ui.contacts_listbox.remove) - self._ui.invitees_listbox.foreach(self._ui.invitees_listbox.remove) + def _reset(self) -> None: + def _remove(row): + self.remove(row) + row.destroy() + self._ui.contacts_listbox.foreach(_remove) + self._invitees_box.clear() + + def load_contacts(self) -> None: + self._reset() + self._accounts = app.get_enabled_accounts_with_labels() - self.new_contact_rows = {} + self._new_contact_rows = {} self._add_accounts() + self._add_contacts() + first_row = self._ui.contacts_listbox.get_row_at_index(0) self._ui.contacts_listbox.select_row(first_row) self._ui.search_entry.grab_focus() self.emit('listbox-changed', False)
- def focus_search_entry(self): + def focus_search_entry(self) -> None: self._ui.search_entry.grab_focus()
- def get_invitees(self): - invitees = [] - for row in self._ui.invitees_listbox.get_children(): - invitees.append(row.jid) - return invitees - - -class ContactRow(Gtk.ListBoxRow): - def __init__(self, account, contact, jid, name, show_account): - Gtk.ListBoxRow.__init__(self) - self.get_style_context().add_class('start-chat-row') - self.account = account - self.account_label = app.get_account_label(account) - self.show_account = show_account - self.jid = jid - self.contact = contact - self.name = name - self.new = jid == '' - - grid = Gtk.Grid() - grid.set_column_spacing(12) - grid.set_size_request(260, -1) - - image = self._get_avatar_image(contact) - image.set_size_request(AvatarSize.ROSTER, AvatarSize.ROSTER) - grid.add(image) - - box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0) - box.set_hexpand(True) - - if self.name is None: - self.name = _('Invite New Contact') - - self.name_label = Gtk.Label(label=self.name) - self.name_label.set_ellipsize(Pango.EllipsizeMode.END) - self.name_label.set_xalign(0) - self.name_label.set_width_chars(20) - self.name_label.set_halign(Gtk.Align.START) - self.name_label.get_style_context().add_class('bold16') - name_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=6) - name_box.add(self.name_label) - - if show_account: - account_badge = AccountBadge(account) - account_badge.set_halign(Gtk.Align.END) - account_badge.set_valign(Gtk.Align.START) - account_badge.set_hexpand(True) - name_box.add(account_badge) - box.add(name_box) - - self.jid_label = Gtk.Label(label=str(jid)) - self.jid_label.set_tooltip_text(str(jid)) - self.jid_label.set_ellipsize(Pango.EllipsizeMode.END) - self.jid_label.set_xalign(0) - self.jid_label.set_width_chars(22) - self.jid_label.set_halign(Gtk.Align.START) - self.jid_label.get_style_context().add_class('dim-label') - box.add(self.jid_label) - - grid.add(box) - - self.add(grid) - self.show_all() - - def _get_avatar_image(self, contact): - if self.new: - icon_name = 'avatar-default' - return Gtk.Image.new_from_icon_name(icon_name, Gtk.IconSize.DND) - - scale = self.get_scale_factor() - surface = contact.get_avatar(AvatarSize.ROSTER, scale) - return Gtk.Image.new_from_surface(surface) - - def update_jid(self, jid): - self.jid = jid - self.jid_label.set_text(jid) - - def get_search_text(self): - if self.contact is None: - return str(self.jid) - if self.show_account: - return '%s %s %s' % (self.name, self.jid, self.account_label) - return '%s %s' % (self.name, self.jid) + def get_invitees(self) -> List[str]: + return self._invitees_box.get_contact_jids()
===================================== test/gtk/groupchat_info.py ===================================== @@ -100,7 +100,7 @@ def __init__(self): spacing=18) self._main_box.set_valign(Gtk.Align.FILL)
- self._muc_info_box = GroupChatInfoScrolled(None) + self._muc_info_box = GroupChatInfoScrolled() self._muc_info_box.set_vexpand(True)
self._main_box.add(self._muc_info_box)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/0e932b85f2d17902c5d03c63e9faf9e4...