Remove some code that pretty much looks like some legacy code to add additional attributes to a running system.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40797 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f5c0a9970a
commit
b0acdd1578
@ -643,8 +643,7 @@ MailDaemonApp::MakeMimeTypes(bool remakeMIMETypes)
|
||||
|
||||
for (size_t i = 0; i < kNTypes; i++) {
|
||||
BMessage info;
|
||||
BMimeType mime;
|
||||
mime.SetTo(types[i]);
|
||||
BMimeType mime(types[i]);
|
||||
if (mime.InitCheck() != B_OK) {
|
||||
fputs("could not init mime type.\n", stderr);
|
||||
return;
|
||||
@ -652,7 +651,7 @@ MailDaemonApp::MakeMimeTypes(bool remakeMIMETypes)
|
||||
|
||||
if (!mime.IsInstalled() || remakeMIMETypes) {
|
||||
// install the full mime type
|
||||
mime.Delete ();
|
||||
mime.Delete();
|
||||
mime.Install();
|
||||
|
||||
// Set up the list of e-mail related attributes that Tracker will
|
||||
@ -684,37 +683,7 @@ MailDaemonApp::MakeMimeTypes(bool remakeMIMETypes)
|
||||
mime.SetLongDescription("A Partially Downloaded E-mail");
|
||||
mime.SetPreferredApp("application/x-vnd.Be-MAIL");
|
||||
}
|
||||
} else {
|
||||
// Just add the e-mail related attribute types we use to the MIME
|
||||
// system.
|
||||
mime.GetAttrInfo(&info);
|
||||
bool hasAccount = false;
|
||||
bool hasThread = false;
|
||||
bool hasSize = false;
|
||||
const char* result;
|
||||
for (int32 index = 0; info.FindString("attr:name", index, &result)
|
||||
== B_OK; index++) {
|
||||
if (!strcmp(result, B_MAIL_ATTR_ACCOUNT))
|
||||
hasAccount = true;
|
||||
if (!strcmp(result, B_MAIL_ATTR_THREAD))
|
||||
hasThread = true;
|
||||
if (!strcmp(result, "MAIL:fullsize"))
|
||||
hasSize = true;
|
||||
}
|
||||
|
||||
if (!hasAccount) {
|
||||
addAttribute(info, B_MAIL_ATTR_ACCOUNT, "Account",
|
||||
B_STRING_TYPE, true, false, 100);
|
||||
}
|
||||
if (!hasThread)
|
||||
addAttribute(info, B_MAIL_ATTR_THREAD, "Thread");
|
||||
/*if (!hasSize)
|
||||
addAttribute(info,"MAIL:fullsize","Message Size",B_SIZE_T_TYPE,true,false,100);*/
|
||||
// TODO: Tracker can't display SIZT attributes. What a pain.
|
||||
if (!hasAccount || !hasThread/* || !hasSize*/)
|
||||
mime.SetAttrInfo(&info);
|
||||
}
|
||||
mime.Unset();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user