X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2Fcommon%2Fpreferences.cpp;h=e965f486a03cf0ae3cbbe31b976a5b484f573388;hp=009afea777e65d7e77d743114bf90147e2feb76d;hb=d1663f3d3931bb05c791ef2c86926a22932c6014;hpb=56ae8d824bd9183aa8658dccda528fba2548d834 diff --git a/source/common/preferences.cpp b/source/common/preferences.cpp index 009afea..e965f48 100644 --- a/source/common/preferences.cpp +++ b/source/common/preferences.cpp @@ -72,7 +72,7 @@ XABPreferences::XABPreferences(wxString PreferencesFilename){ if (ValueInc == wxT("true")){ - SaveWindowPos = TRUE; + SaveWindowPos = true; wxRect WindowPosition; long PosX, PosY, PosH, PosW = 0; @@ -107,7 +107,18 @@ XABPreferences::XABPreferences(wxString PreferencesFilename){ settingfile->Read(wxT("HideLocalAddressBooks"), &ValueInc); if (ValueInc == wxT("true")){ - HideLocalABs = TRUE; + HideLocalABs = true; + } + + settingfile->Read(wxT("UseBackgroundContactColour"), &ValueInc); + + if (ValueInc == wxT("true")){ + UseBackgroundContactColour = true; + wxString BackgroundContactColourRead; + settingfile->Read(wxT("BackgroundContactColour"), &BackgroundContactColourRead); + if (BackgroundContactColourRead.Mid(0, 1) == "#"){ + BackgroundContactColour.Set(BackgroundContactColourRead); + } } delete settingfile; @@ -271,8 +282,9 @@ bool XABPreferences::GetBoolData(wxString SettingName){ if (SettingName == wxT("SaveWindowPosition")) { return SaveWindowPos; } else if (SettingName == wxT("HideLocalAddressBooks")) { return HideLocalABs; } + else if (SettingName == wxT("UseBackgroundContactColour")) { return UseBackgroundContactColour; } - return FALSE; + return false; } @@ -292,6 +304,18 @@ void XABPreferences::SetMainWindowData(wxRect WindowData){ } +wxColour XABPreferences::GetBackgroundContactColourData(){ + + return BackgroundContactColour; + +} + +void XABPreferences::SetBackgroundContactColourData(wxColour ColourData){ + + BackgroundContactColour = ColourData; + +} + // XABPrefAccounts XABPrefAccounts::XABPrefAccounts(){