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