* More cleanup.
* Fixed slightly incorrect copyright year, thanks Clemens :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42261 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 20011, Haiku Inc. All Rights Reserved.
|
* Copyright 2011, Haiku Inc. All Rights Reserved.
|
||||||
* Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
|
* Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -128,10 +128,10 @@ BMailSettings::WindowFollowsCorner()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BMailSettings::SetWindowFollowsCorner(int32 which_corner)
|
BMailSettings::SetWindowFollowsCorner(int32 whichCorner)
|
||||||
{
|
{
|
||||||
if (fData.ReplaceInt32("WindowFollowsCorner",which_corner))
|
if (fData.ReplaceInt32("WindowFollowsCorner", whichCorner) != B_OK)
|
||||||
fData.AddInt32("WindowFollowsCorner",which_corner);
|
fData.AddInt32("WindowFollowsCorner", whichCorner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ BMailSettings::ShowStatusWindow()
|
|||||||
void
|
void
|
||||||
BMailSettings::SetShowStatusWindow(uint32 mode)
|
BMailSettings::SetShowStatusWindow(uint32 mode)
|
||||||
{
|
{
|
||||||
if (fData.ReplaceInt32("ShowStatusWindow",mode))
|
if (fData.ReplaceInt32("ShowStatusWindow", mode) != B_OK)
|
||||||
fData.AddInt32("ShowStatusWindow", mode);
|
fData.AddInt32("ShowStatusWindow", mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,10 +164,10 @@ BMailSettings::DaemonAutoStarts()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BMailSettings::SetDaemonAutoStarts(bool does_it)
|
BMailSettings::SetDaemonAutoStarts(bool startIt)
|
||||||
{
|
{
|
||||||
if (fData.ReplaceBool("DaemonAutoStarts",does_it))
|
if (fData.ReplaceBool("DaemonAutoStarts", startIt) != B_OK)
|
||||||
fData.AddBool("DaemonAutoStarts",does_it);
|
fData.AddBool("DaemonAutoStarts", startIt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ BMailSettings::ConfigWindowFrame()
|
|||||||
void
|
void
|
||||||
BMailSettings::SetConfigWindowFrame(BRect frame)
|
BMailSettings::SetConfigWindowFrame(BRect frame)
|
||||||
{
|
{
|
||||||
if (fData.ReplaceRect("ConfigWindowFrame",frame))
|
if (fData.ReplaceRect("ConfigWindowFrame", frame) != B_OK)
|
||||||
fData.AddRect("ConfigWindowFrame", frame);
|
fData.AddRect("ConfigWindowFrame", frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,7 +200,7 @@ BMailSettings::StatusWindowFrame()
|
|||||||
void
|
void
|
||||||
BMailSettings::SetStatusWindowFrame(BRect frame)
|
BMailSettings::SetStatusWindowFrame(BRect frame)
|
||||||
{
|
{
|
||||||
if (fData.ReplaceRect("StatusWindowFrame",frame))
|
if (fData.ReplaceRect("StatusWindowFrame", frame) != B_OK)
|
||||||
fData.AddRect("StatusWindowFrame", frame);
|
fData.AddRect("StatusWindowFrame", frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,7 +219,7 @@ BMailSettings::StatusWindowWorkspaces()
|
|||||||
void
|
void
|
||||||
BMailSettings::SetStatusWindowWorkspaces(int32 workspace)
|
BMailSettings::SetStatusWindowWorkspaces(int32 workspace)
|
||||||
{
|
{
|
||||||
if (fData.ReplaceInt32("StatusWindowWorkSpace",workspace))
|
if (fData.ReplaceInt32("StatusWindowWorkSpace", workspace) != B_OK)
|
||||||
fData.AddInt32("StatusWindowWorkSpace", workspace);
|
fData.AddInt32("StatusWindowWorkSpace", workspace);
|
||||||
|
|
||||||
BMessage msg('wsch');
|
BMessage msg('wsch');
|
||||||
@@ -238,7 +238,7 @@ BMailSettings::StatusWindowLook()
|
|||||||
void
|
void
|
||||||
BMailSettings::SetStatusWindowLook(int32 look)
|
BMailSettings::SetStatusWindowLook(int32 look)
|
||||||
{
|
{
|
||||||
if (fData.ReplaceInt32("StatusWindowLook",look))
|
if (fData.ReplaceInt32("StatusWindowLook", look) != B_OK)
|
||||||
fData.AddInt32("StatusWindowLook", look);
|
fData.AddInt32("StatusWindowLook", look);
|
||||||
|
|
||||||
BMessage msg('lkch');
|
BMessage msg('lkch');
|
||||||
@@ -262,7 +262,7 @@ BMailSettings::AutoCheckInterval()
|
|||||||
void
|
void
|
||||||
BMailSettings::SetAutoCheckInterval(bigtime_t interval)
|
BMailSettings::SetAutoCheckInterval(bigtime_t interval)
|
||||||
{
|
{
|
||||||
if (fData.ReplaceInt64("AutoCheckInterval",interval))
|
if (fData.ReplaceInt64("AutoCheckInterval", interval) != B_OK)
|
||||||
fData.AddInt64("AutoCheckInterval", interval);
|
fData.AddInt64("AutoCheckInterval", interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,11 +307,14 @@ BMailSettings::DefaultOutboundAccount()
|
|||||||
void
|
void
|
||||||
BMailSettings::SetDefaultOutboundAccount(int32 to)
|
BMailSettings::SetDefaultOutboundAccount(int32 to)
|
||||||
{
|
{
|
||||||
if (fData.ReplaceInt32("DefaultOutboundAccount",to))
|
if (fData.ReplaceInt32("DefaultOutboundAccount", to) != B_OK)
|
||||||
fData.AddInt32("DefaultOutboundAccount", to);
|
fData.AddInt32("DefaultOutboundAccount", to);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
BMailAccounts::BMailAccounts()
|
BMailAccounts::BMailAccounts()
|
||||||
{
|
{
|
||||||
BPath path;
|
BPath path;
|
||||||
@@ -412,14 +415,13 @@ BMailAccounts::AccountByName(const char* name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
using std::vector;
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
AddonSettings::AddonSettings()
|
AddonSettings::AddonSettings()
|
||||||
:
|
:
|
||||||
fModified(false)
|
fModified(false)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -427,12 +429,11 @@ bool
|
|||||||
AddonSettings::Load(const BMessage& message)
|
AddonSettings::Load(const BMessage& message)
|
||||||
{
|
{
|
||||||
const char* addonPath = NULL;
|
const char* addonPath = NULL;
|
||||||
if (message.FindString("add-on path", &addonPath) != B_OK)
|
if (message.FindString("add-on path", &addonPath) != B_OK
|
||||||
return false;
|
|| get_ref_for_path(addonPath, &fAddonRef) != B_OK
|
||||||
if (get_ref_for_path(addonPath, &fAddonRef) != B_OK)
|
|| message.FindMessage("settings", &fSettings) != B_OK)
|
||||||
return false;
|
|
||||||
if (message.FindMessage("settings", &fSettings) != B_OK)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
fModified = false;
|
fModified = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -485,6 +486,9 @@ AddonSettings::HasBeenModified()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
MailAddonSettings::Load(const BMessage& message)
|
MailAddonSettings::Load(const BMessage& message)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user