/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive/__init__.py

  • Committer: Jasper Groenewegen
  • Date: 2008-07-18 12:35:47 UTC
  • mfrom: (531.8.2 sort-bookmarks)
  • mto: This revision was merged to the branch mainline in revision 552.
  • Revision ID: colbrac@xs4all.nl-20080718123547-k5hpa6ulzxg8gv62
Merge sort bookmarks by title

Show diffs side-by-side

added added

removed removed

Lines of Context:
966
966
        
967
967
        # Add them to the TreeStore
968
968
        titer = treestore.append(None, [_i18n('Bookmarks'), None])
969
 
        for item in bookmarks:
970
 
            title = self.pref.get_bookmark_title(item)
971
 
            treestore.append(titer, [title, item])
 
969
 
 
970
        # Get titles and sort by title
 
971
        bookmarks = [[self.pref.get_bookmark_title(item), item] for item in bookmarks]
 
972
        bookmarks.sort()
 
973
        for title_item in bookmarks:
 
974
            treestore.append(titer, title_item)
972
975
        
973
976
        # Create the column and add it to the TreeView
974
977
        self.treeview_left.set_model(treestore)
1264
1267
 
1265
1268
        # Add them to the TreeStore
1266
1269
        titer = treestore.append(None, [_i18n('Bookmarks'), None])
1267
 
        for item in bookmarks:
1268
 
            title = self.pref.get_bookmark_title(item)
1269
 
            treestore.append(titer, [title, item])
1270
1270
 
 
1271
        # Get titles and sort by title
 
1272
        bookmarks = [[self.pref.get_bookmark_title(item), item] for item in bookmarks]
 
1273
        bookmarks.sort()
 
1274
        for title_item in bookmarks:
 
1275
            treestore.append(titer, title_item)
 
1276
        
1271
1277
        # Add the TreeStore to the TreeView
1272
1278
        self.treeview_left.set_model(treestore)
1273
1279