mirror of
https://github.com/SoongNoonien/mpdevil.git
synced 2023-08-10 21:12:44 +03:00
clear window title on connection error
This commit is contained in:
parent
5e34ea7658
commit
c9838118be
@ -3601,6 +3601,7 @@ class MainWindow(Gtk.ApplicationWindow):
|
||||
self._settings.connect("changed::playlist-right", self._on_playlist_pos_changed)
|
||||
self._client.emitter.connect("current_song", self._on_song_changed)
|
||||
self._client.emitter.connect("disconnected", self._on_disconnected)
|
||||
self._client.emitter.connect("connection_error", self._on_connection_error)
|
||||
self._client.emitter.connect("reconnected", self._on_reconnected)
|
||||
# auto save window state and size
|
||||
self.connect("size-allocate", self._on_size_allocate)
|
||||
@ -3789,6 +3790,9 @@ class MainWindow(Gtk.ApplicationWindow):
|
||||
self._search_button.set_active(False)
|
||||
self._search_button.set_sensitive(False)
|
||||
|
||||
def _on_connection_error(self, *args):
|
||||
self._clear_title()
|
||||
|
||||
def _on_size_allocate(self, widget, rect):
|
||||
if not self.is_maximized():
|
||||
if (size:=self.get_size()) != self._size: # prevent unneeded write operations
|
||||
|
Loading…
Reference in New Issue
Block a user