[Xfce4-commits] <postler:master> Store last header for switching folders
Christian Dywan
noreply at xfce.org
Sun Dec 26 04:50:04 CET 2010
Updating branch refs/heads/master
to ce7ae80cc4c18358be64bccd1623725c59a4431e (commit)
from 9f3cc48abcbd4f0445e4b3b479100e6d370e4332 (commit)
commit ce7ae80cc4c18358be64bccd1623725c59a4431e
Author: Christian Dywan <christian at twotoasts.de>
Date: Sat Dec 25 12:19:08 2010 +0100
Store last header for switching folders
When folders are switched, the location changes but the
same filter and header should be used.
postler/postler-messages.vala | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/postler/postler-messages.vala b/postler/postler-messages.vala
index e250371..94e3199 100644
--- a/postler/postler-messages.vala
+++ b/postler/postler-messages.vala
@@ -27,6 +27,7 @@ public class Postler.Messages : Gtk.TreeView {
string to_or_from;
string last_filter = "";
+ string last_header = "";
FileMonitor[] folder_monitors = {};
enum Columns {
@@ -504,6 +505,7 @@ public class Postler.Messages : Gtk.TreeView {
public void search (string filter, string header="subject") {
last_filter = filter;
+ last_header = header;
populate (location, account_info, filter.down (), header);
}
@@ -629,7 +631,7 @@ public class Postler.Messages : Gtk.TreeView {
}
public bool populate (string? location, AccountInfo account_info,
- string filter="", string header="subject") {
+ string filter="", string header="") {
clear ();
if (location == null)
return true;
@@ -641,6 +643,8 @@ public class Postler.Messages : Gtk.TreeView {
if (filter != "")
last_filter = filter;
+ if (header != "")
+ last_header = header;
var now = GLib.Date ();
now.set_time_val (GLib.TimeVal ());
@@ -671,7 +675,7 @@ public class Postler.Messages : Gtk.TreeView {
folders += location + "/cur";
folders += location + "/new";
}
- headers += header;
+ headers += last_header != "" ? last_header : null;
filters += last_filter != "" ? last_filter : null;
foreach (var folder in folders) {
More information about the Xfce4-commits
mailing list