fixup! Port UI to GTK 4
This commit is contained in:
parent
754556bb92
commit
3ee0ee73d5
1 changed files with 82 additions and 112 deletions
|
|
@ -59,6 +59,7 @@ class Window(Adw.ApplicationWindow):
|
|||
_CUSTOM_STARTUP_COMPLETE = 'startup-complete'
|
||||
|
||||
# Widgets
|
||||
toolbar_view = Gtk.Template.Child()
|
||||
content_stack = Gtk.Template.Child()
|
||||
panel_stack = Gtk.Template.Child()
|
||||
toolbar_stack = Gtk.Template.Child()
|
||||
|
|
@ -99,8 +100,8 @@ class Window(Adw.ApplicationWindow):
|
|||
self._panels.append(self._cover_panel)
|
||||
# Playlist panel
|
||||
self._playlist_panel = PlaylistPanel(self._mcg)
|
||||
#self._playlist_panel.connect('open-standalone', self.on_panel_open_standalone)
|
||||
#self._playlist_panel.connect('close-standalone', self.on_panel_close_standalone)
|
||||
self._playlist_panel.connect('open-standalone', self.on_panel_open_standalone)
|
||||
self._playlist_panel.connect('close-standalone', self.on_panel_close_standalone)
|
||||
self._panels.append(self._playlist_panel)
|
||||
# Library panel
|
||||
self._library_panel = LibraryPanel(self._mcg)
|
||||
|
|
@ -298,12 +299,15 @@ class Window(Adw.ApplicationWindow):
|
|||
# False
|
||||
#)
|
||||
|
||||
|
||||
def on_panel_open_standalone(self, panel):
|
||||
self.set_titlebar(panel.get_headerbar_standalone())
|
||||
self.toolbar_view.add_top_bar(panel.get_headerbar_standalone())
|
||||
self.toolbar_view.remove(self.headerbar)
|
||||
|
||||
|
||||
def on_panel_close_standalone(self, headerbar):
|
||||
self.set_titlebar(self.headerbar)
|
||||
def on_panel_close_standalone(self, panel):
|
||||
self.toolbar_view.add_top_bar(self.headerbar)
|
||||
self.toolbar_view.remove(panel.get_headerbar_standalone())
|
||||
|
||||
def on_connection_panel_connection_changed(self, widget, host, port, password):
|
||||
self._settings.set_string(Window.SETTING_HOST, host)
|
||||
|
|
|
|||
Loading…
Reference in a new issue