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:
parent
97659f212d
commit
3241830c8e
|
@ -210,8 +210,7 @@ class Application(Adw.Application):
|
||||||
|
|
||||||
for (setting, property) in [("window.width", "default-width"),
|
for (setting, property) in [("window.width", "default-width"),
|
||||||
("window.height", "default-height"),
|
("window.height", "default-height"),
|
||||||
("now-playing.size", "now-playing-size"),
|
("now-playing.size", "now-playing-size")]:
|
||||||
("sidebar.size", "sidebar-size")]:
|
|
||||||
self.db.settings.bind_setting(setting, win, property)
|
self.db.settings.bind_setting(setting, win, property)
|
||||||
|
|
||||||
self.__add_accelerators(win.accelerators)
|
self.__add_accelerators(win.accelerators)
|
||||||
|
|
|
@ -30,7 +30,6 @@ class Window(Adw.Window):
|
||||||
|
|
||||||
header = GObject.Property(type=Gtk.Widget)
|
header = GObject.Property(type=Gtk.Widget)
|
||||||
sidebar = 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)
|
show_sidebar = GObject.Property(type=bool, default=False)
|
||||||
now_playing = GObject.Property(type=Gtk.Widget)
|
now_playing = GObject.Property(type=Gtk.Widget)
|
||||||
now_playing_size = GObject.Property(type=int, default=250)
|
now_playing_size = GObject.Property(type=int, default=250)
|
||||||
|
|
|
@ -111,16 +111,6 @@ class TestSettings(unittest.TestCase):
|
||||||
|
|
||||||
self.assertFalse(self.app.build_window().now_playing.prefer_artist)
|
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):
|
def test_save_sidebar_show_all_artists(self, mock_stdout: io.StringIO):
|
||||||
"""Check saving and loading the show-all artists setting."""
|
"""Check saving and loading the show-all artists setting."""
|
||||||
self.assertFalse(self.win.sidebar.show_all_artists)
|
self.assertFalse(self.win.sidebar.show_all_artists)
|
||||||
|
|
|
@ -86,13 +86,6 @@ class TestWindow(unittest.TestCase):
|
||||||
self.window._layout.show_sidebar = False
|
self.window._layout.show_sidebar = False
|
||||||
self.assertFalse(self.window.show_sidebar)
|
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):
|
def test_now_playing(self):
|
||||||
"""Check setting a widget to the now_playing area."""
|
"""Check setting a widget to the now_playing area."""
|
||||||
self.assertIsNone(self.window.now_playing)
|
self.assertIsNone(self.window.now_playing)
|
||||||
|
|
Loading…
Reference in New Issue