1 === modified file 'lens/src/daemon.vala'
2 --- lens/src/daemon.vala 2011-10-25 18:52:53 +0000
3 +++ lens/src/daemon.vala 2012-01-10 16:34:32 +0000
5 private Gwibber.Utils utils;
6 private Dee.Model? _model;
7 private Dee.Model? _streams_model;
8 - private Dee.Filter *_sort_filter;
9 + private Dee.Filter _sort_filter;
10 /* Keep track of the previous search, so we can determine when to
11 * filter down the result set instead of rebuilding it */
12 private LensSearch? previous_search;
15 _streams_model = streams_service.stream_model;
16 Intl.setlocale(LocaleCategory.COLLATE, "C");
17 - _sort_filter = new Dee.Filter.collator_desc(StreamModelColumn.TIMESTAMP);
18 - _model = new Dee.FilterModel (_sort_filter, _streams_model);
19 + _sort_filter = Dee.Filter.new_collator_desc (StreamModelColumn.TIMESTAMP);
20 + _model = new Dee.FilterModel (_streams_model, _sort_filter);
23 private void populate_filters ()
25 === modified file 'libgwibber-gtk/stream-view.vala'
26 --- libgwibber-gtk/stream-view.vala 2011-10-22 02:32:35 +0000
27 +++ libgwibber-gtk/stream-view.vala 2012-01-10 16:34:32 +0000
30 private Dee.Model? _model = null;
31 private Dee.Model? _stream_filter_model = null;
32 - private Dee.Filter *stream_filter;
33 - private Dee.Filter *sort_filter;
34 + private Dee.Filter sort_filter;
35 private int _position = 0;
36 private string _stream = "home";
37 private int _sort_order = 1;
39 get { return _stream_filter_model; }
42 - sort_filter = new Dee.Filter.collator(StreamModelColumn.TIMESTAMP);
43 + sort_filter = Dee.Filter.new_collator (StreamModelColumn.TIMESTAMP);
45 - sort_filter = new Dee.Filter.collator_desc(StreamModelColumn.TIMESTAMP);
46 - _stream_filter_model = new Dee.FilterModel (sort_filter, model);
48 + sort_filter = Dee.Filter.new_collator_desc (StreamModelColumn.TIMESTAMP);
49 + Timer timer = new Timer();
50 + _stream_filter_model = new Dee.FilterModel (model, sort_filter);
51 + debug ("Applied sorting filter in %fms", timer.elapsed()*1000);
55 adjustment.set_upper ((double)(_stream_filter_model.get_n_rows ()));
57 === modified file 'libgwibber/streams.vala'
58 --- libgwibber/streams.vala 2011-12-08 22:04:59 +0000
59 +++ libgwibber/streams.vala 2012-01-10 16:34:32 +0000
61 if (stream == "home") {
64 - stream_filter = new Dee.Filter.for_key_column (StreamModelColumn.STREAM, stream);
65 + stream_filter = Dee.Filter.new_for_key_column (StreamModelColumn.STREAM, stream);
67 - var filtered_model = new Dee.FilterModel (stream_filter, model);
68 + var filtered_model = new Dee.FilterModel (model, stream_filter);
69 return filtered_model;
72 public Dee.Model? transient_filter_model (Dee.Model model, string transient)
74 Dee.Filter transient_filter;
75 - transient_filter = new Dee.Filter.for_key_column (StreamModelColumn.TRANSIENT, transient);
76 - var filtered_model = new Dee.FilterModel (transient_filter, model);
77 + transient_filter = Dee.Filter.new_for_key_column (StreamModelColumn.TRANSIENT, transient);
78 + var filtered_model = new Dee.FilterModel (model, transient_filter);
79 return filtered_model;
84 debug ("Getting non-transient model");
85 Dee.SequenceModel? model = resources.load ("gwibber.stream_model") as Dee.SequenceModel;
86 - debug ("stream_model from resources has %u rows", model.get_n_rows ());
87 + if (model is Dee.Model)
88 + debug ("stream_model from resources has %u rows", model.get_n_rows ());
90 + debug ("stream_model from resources isn't valid");
91 if (!(model is Dee.SequenceModel))
93 debug ("Didn't get model from resource manager, creating a new one");