[pitivi] preset: Fix sort type
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] preset: Fix sort type
- Date: Tue, 19 Dec 2017 20:59:11 +0000 (UTC)
commit 79b13b970edaa82025e66f925feced8de4c7045f
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Mon Dec 18 09:33:55 2017 +0100
preset: Fix sort type
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D1920
pitivi/preset.py | 4 ++--
tests/test_render.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/preset.py b/pitivi/preset.py
index bd6d568..db8afb4 100644
--- a/pitivi/preset.py
+++ b/pitivi/preset.py
@@ -77,7 +77,7 @@ class PresetManager(GObject.Object, Loggable):
return -1
self.ordered.set_sort_func(0, sortme)
- self.ordered.set_sort_column_id(0, Gtk.SortType.DESCENDING)
+ self.ordered.set_sort_column_id(0, Gtk.SortType.ASCENDING)
self.cur_preset = None
# Whether to ignore the updateValue calls.
self.ignore_update_requests = False
@@ -577,7 +577,7 @@ class EncodingTargetManager(PresetManager):
Override from PresetManager
Args:
- combo (str): The Gtk.ComboBox to retrieve selected GstEncodingProfile from.
+ combo (Gtk.ComboBox): The combo to retrieve selected GstEncodingProfile from.
"""
active_iter = combo.get_active_iter()
name = None
diff --git a/tests/test_render.py b/tests/test_render.py
index 875a036..2997aad 100644
--- a/tests/test_render.py
+++ b/tests/test_render.py
@@ -256,7 +256,7 @@ class TestRender(common.TestCase):
self.assertTrue(dialog.render_presets.action_save.get_enabled())
dialog.render_presets.action_save.activate(None)
self.assertEqual([i[0] for i in preset_combo.props.model],
- profile_names + ['test'])
+ sorted(profile_names + ['test']))
active_iter = preset_combo.get_active_iter()
self.assertEqual(preset_combo.props.model.get_value(active_iter, 0), 'test')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]