aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ChangeLog.ja5
-rw-r--r--libsylph/folder.c24
3 files changed, 33 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 73906319..cc12937b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2007-05-10
+ * libsylph/folder.c: qsearch_cond_type now persists between sessions.
+
+2007-05-10
+
* src/mainwindow.c: main_window_set_toolbar_sensitive(): made a
workaround for the GTK+ bug (Bug 56070 - Can't click button after
setting it sensitive.)
diff --git a/ChangeLog.ja b/ChangeLog.ja
index fa8db3d5..51b7ff1c 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,10 @@
2007-05-10
+ * libsylph/folder.c: qsearch_cond_type がセッション間で保持される
+ ようにした。
+
+2007-05-10
+
* src/mainwindow.c: main_window_set_toolbar_sensitive(): GTK+ のバグ
(Bug 56070 - Can't click button after setting it sensitive.)
への対策を行った。
diff --git a/libsylph/folder.c b/libsylph/folder.c
index 0837c17c..6527c848 100644
--- a/libsylph/folder.c
+++ b/libsylph/folder.c
@@ -1251,6 +1251,7 @@ static gboolean folder_build_tree(GNode *node, gpointer data)
threaded = TRUE, ac_apply_sub = FALSE;
FolderSortKey sort_key = SORT_BY_NONE;
FolderSortType sort_type = SORT_ASCENDING;
+ gboolean qsearch_cond_type = 0;
gint new = 0, unread = 0, total = 0;
time_t mtime = 0;
gboolean use_auto_to_on_reply = FALSE;
@@ -1346,6 +1347,21 @@ static gboolean folder_build_tree(GNode *node, gpointer data)
sort_type = SORT_ASCENDING;
else
sort_type = SORT_DESCENDING;
+ } else if (!strcmp(attr->name, "qsearch_cond")) {
+ if (!strcmp(attr->value, "all"))
+ qsearch_cond_type = 0;
+ else if (!strcmp(attr->value, "unread"))
+ qsearch_cond_type = 1;
+ else if (!strcmp(attr->value, "mark"))
+ qsearch_cond_type = 2;
+ else if (!strcmp(attr->value, "clabel"))
+ qsearch_cond_type = 3;
+ else if (!strcmp(attr->value, "mime"))
+ qsearch_cond_type = 4;
+ else if (!strcmp(attr->value, "w1day"))
+ qsearch_cond_type = 5;
+ else if (!strcmp(attr->value, "last5"))
+ qsearch_cond_type = 6;
} else if (!strcmp(attr->name, "account_id")) {
account = account_find_from_id(atoi(attr->value));
if (!account) g_warning("account_id: %s not found\n",
@@ -1405,6 +1421,7 @@ static gboolean folder_build_tree(GNode *node, gpointer data)
item->auto_replyto = auto_replyto;
item->trim_summary_subject = trim_summary_subject;
item->trim_compose_subject = trim_compose_subject;
+ item->qsearch_cond_type = qsearch_cond_type;
node->data = item;
xml_free_node(xmlnode);
@@ -1521,6 +1538,8 @@ static void folder_write_list_recursive(GNode *node, gpointer data)
"thread-date",
"from", "subject", "score", "label",
"mark", "unread", "mime", "to"};
+ static gchar *qsearch_cond_str[] = {"all", "unread", "mark", "clabel",
+ "mime", "w1day", "last5"};
g_return_if_fail(node != NULL);
g_return_if_fail(fp != NULL);
@@ -1578,6 +1597,11 @@ static void folder_write_list_recursive(GNode *node, gpointer data)
else
fprintf(fp, " sort_type=\"descending\"");
}
+ if (item->qsearch_cond_type > 0 &&
+ item->qsearch_cond_type < 7) {
+ fprintf(fp, " qsearch_cond=\"%s\"",
+ qsearch_cond_str[item->qsearch_cond_type]);
+ }
fprintf(fp,
" mtime=\"%lu\" new=\"%d\" unread=\"%d\" total=\"%d\"",