* add 'flag:unread' as a synonym for 'flag:new OR NOT flag:seen'

- update documentation
  - update test cases
  - some cleanups in the C++-code
  - bump the database version, to trigger the --rebuild warning
This commit is contained in:
Dirk-Jan C. Binnema
2011-03-31 23:08:26 +03:00
parent 9a4ba103d2
commit b27a9f47c4
10 changed files with 56 additions and 33 deletions

View File

@ -99,7 +99,8 @@ mu_msg_file_get_flags_from_path (const char *path)
mtype = check_msg_type (path, &info);
if (mtype == MSG_TYPE_NEW) { /* we ignore any new-msg flags */
flags = MU_MSG_FLAG_NEW;
/* note NEW implies UNREAD */
flags = MU_MSG_FLAG_NEW | MU_MSG_FLAG_UNREAD;
goto leave;
}
@ -120,6 +121,10 @@ mu_msg_file_get_flags_from_path (const char *path)
}
}
/* the UNREAD pseudo flag => NEW OR NOT SEEN */
if (!(flags & MU_MSG_FLAG_SEEN))
flags |= MU_MSG_FLAG_UNREAD;
leave:
g_free(info);
return flags;
@ -147,7 +152,7 @@ get_flags_str_s (MuMsgFlags flags)
flagstr[i++] = 'S';
if (flags & MU_MSG_FLAG_TRASHED)
flagstr[i++] = 'T';
flagstr[i] = '\0';
return flagstr;