Disable recently button if popover is empty

This commit is contained in:
Sophie Herold 2018-07-10 18:08:11 +02:00 committed by Philipp Hörist
parent a506226d88
commit 6d96005d55
2 changed files with 4 additions and 2 deletions

View File

@ -336,7 +336,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="tooltip_text" translatable="yes">Recently used channels</property>
<property name="tooltip_text" translatable="yes">Recently used group chats</property>
<property name="popover">recently_popover</property>
<child>
<object class="GtkImage">
@ -357,7 +357,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="tooltip_text" translatable="yes">Search the rooms on this server</property>
<property name="tooltip_text" translatable="yes">Search group chats on selected server</property>
<signal name="clicked" handler="_on_search_clicked" swapped="no"/>
<child>
<object class="GtkImage">

View File

@ -2431,6 +2431,8 @@ class JoinGroupchatWindow(Gtk.ApplicationWindow):
label])
servers.append(groupchat.server)
self.recently_button.set_sensitive(bool(recent))
for server in set(servers):
self.server_combo.append_text(server)