window: Remove the sidebar-size property

The new Layout widget isn't user adjustable, so this property is now
unused.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2023-10-23 13:52:53 -04:00
parent 97659f212d
commit 3241830c8e
4 changed files with 1 additions and 20 deletions

View File

@ -210,8 +210,7 @@ class Application(Adw.Application):
for (setting, property) in [("window.width", "default-width"),
("window.height", "default-height"),
("now-playing.size", "now-playing-size"),
("sidebar.size", "sidebar-size")]:
("now-playing.size", "now-playing-size")]:
self.db.settings.bind_setting(setting, win, property)
self.__add_accelerators(win.accelerators)

View File

@ -30,7 +30,6 @@ class Window(Adw.Window):
header = GObject.Property(type=Gtk.Widget)
sidebar = GObject.Property(type=Gtk.Widget)
sidebar_size = GObject.Property(type=int, default=300)
show_sidebar = GObject.Property(type=bool, default=False)
now_playing = GObject.Property(type=Gtk.Widget)
now_playing_size = GObject.Property(type=int, default=250)

View File

@ -111,16 +111,6 @@ class TestSettings(unittest.TestCase):
self.assertFalse(self.app.build_window().now_playing.prefer_artist)
def test_save_sidebar_size(self, mock_stdout: io.StringIO):
"""Check saving and loading the sidebar widget size."""
self.assertEqual(self.win.sidebar_size, 300)
self.assertEqual(self.settings["sidebar.size"], 300)
self.win.sidebar_size = 400
self.assertEqual(self.settings["sidebar.size"], 400)
self.assertEqual(self.app.build_window().sidebar_size, 400)
def test_save_sidebar_show_all_artists(self, mock_stdout: io.StringIO):
"""Check saving and loading the show-all artists setting."""
self.assertFalse(self.win.sidebar.show_all_artists)

View File

@ -86,13 +86,6 @@ class TestWindow(unittest.TestCase):
self.window._layout.show_sidebar = False
self.assertFalse(self.window.show_sidebar)
def test_sidebar_size(self):
"""Check setting the size of the sidebar area."""
self.assertEqual(self.window.sidebar_size, 300)
self.window.sidebar_size = 100
self.assertEqual(self.window.sidebar_size, 100)
def test_now_playing(self):
"""Check setting a widget to the now_playing area."""
self.assertIsNone(self.window.now_playing)