Use BMimeType constructor version directly, as suggested by Jerome.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40403 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin 2011-02-09 11:25:41 +00:00
parent c608a3b2bc
commit 46af96832f

View File

@ -100,9 +100,7 @@ TPeopleApp::TPeopleApp()
// person mime type from the hard-coded default attributes.
bool valid = false;
BMimeType mime;
mime.SetType(B_PERSON_MIMETYPE);
BMimeType mime(B_PERSON_MIMETYPE);
if (mime.IsInstalled()) {
BMessage info;
if (mime.GetAttrInfo(&info) == B_NO_ERROR) {
@ -145,10 +143,10 @@ TPeopleApp::TPeopleApp()
}
if (!valid) {
mime.Install();
mime.SetShortDescription(B_TRANSLATE_WITH_CONTEXT("Person",
mime.SetShortDescription(B_TRANSLATE_WITH_CONTEXT("Person",
"Short mimetype description"));
mime.SetLongDescription(B_TRANSLATE_WITH_CONTEXT(
"Contact information for a person.",
"Contact information for a person.",
"Long mimetype description"));
mime.SetIcon(kPersonIcon, sizeof(kPersonIcon));
mime.SetPreferredApp(APP_SIG);
@ -340,7 +338,7 @@ TPeopleApp::_SavePreferences(BMessage* message) const
BPoint leftTop = frame.LeftTop();
if (fPrefs != NULL) {
fPrefs->Seek(0, 0);
fPrefs->Seek(0, 0);
fPrefs->Write(&leftTop, sizeof(BPoint));
}
}