[Xfce4-commits] <postler:master> Search messages inline, caseless, by subject
Christian Dywan
noreply at xfce.org
Sun Jun 6 23:10:01 CEST 2010
Updating branch refs/heads/master
to 3ff28ba74b9f212dd9e85425baab33517357dd8c (commit)
from dc72205198d9bb9f2b722008cf27fa287b86fd6b (commit)
commit 3ff28ba74b9f212dd9e85425baab33517357dd8c
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun Jun 6 15:30:23 2010 +0200
Search messages inline, caseless, by subject
postler/postler-messages.vala | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/postler/postler-messages.vala b/postler/postler-messages.vala
index 6229d49..79ef44c 100644
--- a/postler/postler-messages.vala
+++ b/postler/postler-messages.vala
@@ -35,6 +35,13 @@ public class Postler.Messages : Gtk.TreeView {
TIMESTAMP
}
+ bool search_inline (Gtk.TreeModel model, int column, string key,
+ Gtk.TreeIter iter) {
+ string subject;
+ model.get (iter, Columns.SUBJECT, out subject, -1);
+ return !(key in subject.down ());
+ }
+
void selection_changed () {
GLib.List<Gtk.TreePath> paths = get_selection ().get_selected_rows (null);
var path = paths.nth_data (0);
@@ -127,7 +134,7 @@ public class Postler.Messages : Gtk.TreeView {
typeof (int64), typeof (string), typeof (ulong));
sort = new Gtk.TreeModelSort.with_model (store);
set_model (sort);
- set_search_column (Columns.SUBJECT); /* FIXME doesn't work atm */
+ set_search_equal_func (search_inline);
get_selection ().set_mode (Gtk.SelectionMode.MULTIPLE);
get_selection ().changed.connect (selection_changed);
insert_column_with_attributes (-1, _("Flagged"),
More information about the Xfce4-commits
mailing list