diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-05-11 08:34:14 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-05-11 08:34:14 +0000 |
commit | 272a838e68d47ee269273c7b1e309279187e465b (patch) | |
tree | 36c62de34037601b04f7810baf632f2d4ef82653 | |
parent | f55b0c5e30c04f7b6630f3d860e8ef2901a72b6c (diff) |
qsearch_cond_type now persists between sessions.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1691 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | libsylph/folder.c | 24 |
3 files changed, 33 insertions, 0 deletions
@@ -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\"", |