diff options
Diffstat (limited to 'Nudge/nudge.cpp')
-rw-r--r-- | Nudge/nudge.cpp | 50 |
1 files changed, 14 insertions, 36 deletions
diff --git a/Nudge/nudge.cpp b/Nudge/nudge.cpp index 9455ec6..0d603bb 100644 --- a/Nudge/nudge.cpp +++ b/Nudge/nudge.cpp @@ -43,16 +43,12 @@ int CNudgeElement::ShowContactMenu(bool show) void CNudgeElement::Save(void)
{
char SectionName[512];
- mir_snprintf(SectionName,512,"%s-popupBackColor", ProtocolName);
- DBWriteContactSettingDword(NULL, "Nudge", SectionName, this->popupBackColor);
- mir_snprintf(SectionName,512,"%s-popupTextColor", ProtocolName);
- DBWriteContactSettingDword(NULL, "Nudge", SectionName, this->popupTextColor);
- mir_snprintf(SectionName,512,"%s-popupTimeSec", ProtocolName);
- DBWriteContactSettingDword(NULL, "Nudge", SectionName, this->popupTimeSec);
- mir_snprintf(SectionName,512,"%s-popupWindowColor", ProtocolName);
- DBWriteContactSettingByte(NULL, "Nudge", SectionName, this->popupWindowColor);
- mir_snprintf(SectionName,512,"%s-showEvent", ProtocolName);
- DBWriteContactSettingByte(NULL, "Nudge", SectionName, this->showEvent);
+ mir_snprintf(SectionName,512,"%s-openMessageWindow", ProtocolName);
+ DBWriteContactSettingByte(NULL, "Nudge", SectionName, this->openMessageWindow);
+ mir_snprintf(SectionName,512,"%s-openContactList", ProtocolName);
+ DBWriteContactSettingByte(NULL, "Nudge", SectionName, this->openContactList);
+ mir_snprintf(SectionName,512,"%s-useIgnore", ProtocolName);
+ DBWriteContactSettingByte(NULL, "Nudge", SectionName, this->useIgnoreSettings);
mir_snprintf(SectionName,512,"%s-showStatus", ProtocolName);
DBWriteContactSettingByte(NULL, "Nudge", SectionName, this->showStatus);
mir_snprintf(SectionName,512,"%s-showPopup", ProtocolName);
@@ -68,23 +64,9 @@ void CNudgeElement::Save(void) mir_snprintf(SectionName,512,"%s-statusFlags", ProtocolName);
DBWriteContactSettingDword(NULL, "Nudge", SectionName, this->statusFlags);
mir_snprintf(SectionName,512,"%s-recText", ProtocolName);
- if(DBWriteContactSettingTString(NULL, "Nudge", SectionName, this->recText)) {
- #if defined( _UNICODE )
- char buff[TEXT_LEN];
- WideCharToMultiByte(code_page, 0, this->recText, -1, buff, TEXT_LEN, 0, 0);
- buff[TEXT_LEN] = 0;
- DBWriteContactSettingString(0, "Nudge", SectionName, buff);
- #endif
- }
+ DBWriteContactSettingTString(NULL, "Nudge", SectionName, this->recText);
mir_snprintf(SectionName,512,"%s-senText", ProtocolName);
- if(DBWriteContactSettingTString(NULL, "Nudge", SectionName, this->senText)) {
- #if defined( _UNICODE )
- char buff[TEXT_LEN];
- WideCharToMultiByte(code_page, 0, this->senText, -1, buff, TEXT_LEN, 0, 0);
- buff[TEXT_LEN] = 0;
- DBWriteContactSettingString(0, "Nudge", SectionName, buff);
- #endif
- }
+ DBWriteContactSettingTString(NULL, "Nudge", SectionName, this->senText);
}
@@ -92,16 +74,12 @@ void CNudgeElement::Load(void) {
DBVARIANT dbv;
char SectionName[512];
- mir_snprintf(SectionName,512,"%s-popupBackColor", ProtocolName);
- this->popupBackColor = DBGetContactSettingDword(NULL, "Nudge", SectionName, GetSysColor(COLOR_BTNFACE));
- mir_snprintf(SectionName,512,"%s-popupTextColor", ProtocolName);
- this->popupTextColor = DBGetContactSettingDword(NULL, "Nudge", SectionName, GetSysColor(COLOR_WINDOWTEXT));
- mir_snprintf(SectionName,512,"%s-popupTimeSec", ProtocolName);
- this->popupTimeSec = DBGetContactSettingDword(NULL, "Nudge", SectionName, 4);
- mir_snprintf(SectionName,512,"%s-popupWindowColor", ProtocolName);
- this->popupWindowColor = DBGetContactSettingByte(NULL, "Nudge", SectionName, TRUE) != 0;
- mir_snprintf(SectionName,512,"%s-showEvent", ProtocolName);
- this->showEvent = DBGetContactSettingByte(NULL, "Nudge", SectionName, TRUE) != 0;
+ mir_snprintf(SectionName,512,"%s-openMessageWindow", ProtocolName);
+ this->openMessageWindow = DBGetContactSettingByte(NULL, "Nudge", SectionName, TRUE) != 0;
+ mir_snprintf(SectionName,512,"%s-openContactList", ProtocolName);
+ this->openContactList = DBGetContactSettingByte(NULL, "Nudge", SectionName, TRUE) != 0;
+ mir_snprintf(SectionName,512,"%s-useIgnore", ProtocolName);
+ this->useIgnoreSettings = DBGetContactSettingByte(NULL, "Nudge", SectionName, TRUE) != 0;
mir_snprintf(SectionName,512,"%s-showStatus", ProtocolName);
this->showStatus = DBGetContactSettingByte(NULL, "Nudge", SectionName, TRUE) != 0;
mir_snprintf(SectionName,512,"%s-showPopup", ProtocolName);
|