totem r6202 - in trunk: . src/plugins/opensubtitles
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem r6202 - in trunk: . src/plugins/opensubtitles
- Date: Tue, 31 Mar 2009 13:02:48 +0000 (UTC)
Author: hadess
Date: Tue Mar 31 13:02:47 2009
New Revision: 6202
URL: http://svn.gnome.org/viewvc/totem?rev=6202&view=rev
Log:
2009-03-31 Bastien Nocera <hadess hadess net>
* src/plugins/opensubtitles/opensubtitles.py: Sort the languages
in the combo box (Closes: #577366)
Modified:
trunk/ChangeLog
trunk/src/plugins/opensubtitles/opensubtitles.py
Modified: trunk/src/plugins/opensubtitles/opensubtitles.py
==============================================================================
--- trunk/src/plugins/opensubtitles/opensubtitles.py (original)
+++ trunk/src/plugins/opensubtitles/opensubtitles.py Tue Mar 31 13:02:47 2009
@@ -347,7 +347,9 @@
# Set up and populate the languages combobox
renderer = gtk.CellRendererText()
- combobox.set_model(languages)
+ sorted_languages = gtk.TreeModelSort(languages)
+ sorted_languages.set_sort_column_id(0, gtk.SORT_ASCENDING)
+ combobox.set_model(sorted_languages)
combobox.pack_start(renderer, True)
combobox.add_attribute(renderer, 'text', 0)
@@ -355,7 +357,8 @@
for lang in LANGUAGES_STR:
it = languages.append(lang)
if LANGUAGES[lang[1]] == self.model.lang:
- combobox.set_active_iter(it)
+ parentit = sorted_languages.convert_child_iter_to_iter (None, it)
+ combobox.set_active_iter(parentit)
# Set up the results treeview
renderer = gtk.CellRendererText()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]