diff --git a/quodlibet/quodlibet/qltk/paned.py b/quodlibet/quodlibet/qltk/paned.py index 59071b06ea..f889a5c2c9 100644 --- a/quodlibet/quodlibet/qltk/paned.py +++ b/quodlibet/quodlibet/qltk/paned.py @@ -184,7 +184,7 @@ def get_paned(self): return self._root_paned def make_pane_sizes_equal(self): - paneds = self._get_paneds() + paneds = self.get_paneds() # the relative paned widths must be equal to the reciprocal (1/i) of # their respective indices (i) in reverse order (from right to left) @@ -201,7 +201,7 @@ def change_orientation(self, horizontal): hor = Gtk.Orientation.HORIZONTAL ver = Gtk.Orientation.VERTICAL - for paned in self._get_paneds(): + for paned in self.get_paneds(): paned.props.orientation = hor if horizontal else ver def destroy(self): @@ -211,7 +211,7 @@ def destroy(self): def show_all(self): self._root_paned.show_all() - def _get_paneds(self): + def get_paneds(self): """Get all internal paneds in a flat, ordered list.""" paneds = [self._root_paned] @@ -246,7 +246,7 @@ def __init__(self, section, option): def set_widgets(self, widgets): super(ConfigMultiRPaned, self).set_widgets(widgets) - paneds = self._get_paneds() + paneds = self.get_paneds() # Connect all paneds for paned in paneds: @@ -257,7 +257,7 @@ def set_widgets(self, widgets): def save_widths(self): """Save all current paned widths.""" - paneds = self._get_paneds() + paneds = self.get_paneds() if len(paneds) == 1 and not paneds[0].get_child1(): # If there's only one pane (i.e. the only paned has just one # child), do not save the paned width, as this will cause @@ -273,7 +273,7 @@ def _restore_widths(self): """Restore pane widths from the config.""" widths = config.getstringlist(self.section, self.option, []) - paneds = self._get_paneds() + paneds = self.get_paneds() if not widths: # If no widths are saved, save the current widths diff --git a/quodlibet/tests/test_browsers_paned.py b/quodlibet/tests/test_browsers_paned.py index eff061e65e..e7294e04b5 100644 --- a/quodlibet/tests/test_browsers_paned.py +++ b/quodlibet/tests/test_browsers_paned.py @@ -165,7 +165,7 @@ def test_make_pane_widths_equal(self): config.set("browsers", "panes", "artist\talbum\t~year\t~#track") self.bar.set_all_panes() self.bar.make_pane_sizes_equal() - paneds = self.bar.multi_paned._get_paneds() + paneds = self.bar.multi_paned.get_paneds() self.failUnlessAlmostEqual(paneds[0].get_relative(), 1.0 / 4.0) self.failUnlessAlmostEqual(paneds[1].get_relative(), 1.0 / 3.0) diff --git a/quodlibet/tests/test_qltk_paned.py b/quodlibet/tests/test_qltk_paned.py index 23cbd84b77..08769079ad 100644 --- a/quodlibet/tests/test_qltk_paned.py +++ b/quodlibet/tests/test_qltk_paned.py @@ -153,7 +153,7 @@ def test_change_orientation(self): horizontal_opposite = False p.change_orientation(horizontal=horizontal_opposite) - for paned in p._get_paneds(): + for paned in p.get_paneds(): self.assertIs(paned.props.orientation, opposite) def test_destroy(self): @@ -183,7 +183,7 @@ def test_basic(self): sws = [Gtk.ScrolledWindow() for _ in range(3)] p.set_widgets(sws) - paneds = p._get_paneds() + paneds = p.get_paneds() paneds[0].set_relative(0.4) paneds[1].set_relative(0.6) p.save_widths()