diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
commit | 8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch) | |
tree | 03e5b4870f09a3163306740c2eebee47bc15b042 /plugins/NewEventNotify/src/options.cpp | |
parent | c5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff) |
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/NewEventNotify/src/options.cpp')
-rw-r--r-- | plugins/NewEventNotify/src/options.cpp | 136 |
1 files changed, 68 insertions, 68 deletions
diff --git a/plugins/NewEventNotify/src/options.cpp b/plugins/NewEventNotify/src/options.cpp index 7e1c92c14a..f943a37a9d 100644 --- a/plugins/NewEventNotify/src/options.cpp +++ b/plugins/NewEventNotify/src/options.cpp @@ -29,80 +29,80 @@ BOOL bWmNotify; int OptionsRead(void)
{
- options->bDisable = db_get_b(NULL, MODULE, OPT_DISABLE, FALSE);
- options->bPreview = db_get_b(NULL, MODULE, OPT_PREVIEW, TRUE);
- options->bMenuitem = db_get_b(NULL, MODULE, OPT_MENUITEM, FALSE);
- options->bDefaultColorMsg = db_get_b(NULL, MODULE, OPT_COLDEFAULT_MESSAGE, FALSE);
- options->bDefaultColorUrl = db_get_b(NULL, MODULE, OPT_COLDEFAULT_URL, FALSE);
- options->bDefaultColorFile = db_get_b(NULL, MODULE, OPT_COLDEFAULT_FILE, FALSE);
- options->bDefaultColorOthers = db_get_b(NULL, MODULE, OPT_COLDEFAULT_OTHERS, FALSE);
- options->colBackMsg = (COLORREF)db_get_dw(NULL, MODULE, OPT_COLBACK_MESSAGE, DEFAULT_COLBACK);
- options->colTextMsg = (COLORREF)db_get_dw(NULL, MODULE, OPT_COLTEXT_MESSAGE, DEFAULT_COLTEXT);
- options->colBackUrl = (COLORREF)db_get_dw(NULL, MODULE, OPT_COLBACK_URL, DEFAULT_COLBACK);
- options->colTextUrl = (COLORREF)db_get_dw(NULL, MODULE, OPT_COLTEXT_URL, DEFAULT_COLTEXT);
- options->colBackFile = (COLORREF)db_get_dw(NULL, MODULE, OPT_COLBACK_FILE, DEFAULT_COLBACK);
- options->colTextFile = (COLORREF)db_get_dw(NULL, MODULE, OPT_COLTEXT_FILE, DEFAULT_COLTEXT);
- options->colBackOthers = (COLORREF)db_get_dw(NULL, MODULE, OPT_COLBACK_OTHERS, DEFAULT_COLBACK);
- options->colTextOthers = (COLORREF)db_get_dw(NULL, MODULE, OPT_COLTEXT_OTHERS, DEFAULT_COLTEXT);
- options->maskNotify = (UINT)db_get_b(NULL, MODULE, OPT_MASKNOTIFY, DEFAULT_MASKNOTIFY);
- options->maskActL = (UINT)db_get_b(NULL, MODULE, OPT_MASKACTL, DEFAULT_MASKACTL);
- options->maskActR = (UINT)db_get_b(NULL, MODULE, OPT_MASKACTR, DEFAULT_MASKACTR);
- options->maskActTE = (UINT)db_get_b(NULL, MODULE, OPT_MASKACTTE, DEFAULT_MASKACTE);
- options->bMsgWindowCheck = db_get_b(NULL, MODULE, OPT_MSGWINDOWCHECK, TRUE);
- options->bMsgReplyWindow = db_get_b(NULL, MODULE, OPT_MSGREPLYWINDOW, FALSE);
- options->bMergePopup = db_get_b(NULL, MODULE, OPT_MERGEPOPUP, TRUE);
- options->iDelayMsg = (int)db_get_dw(NULL, MODULE, OPT_DELAY_MESSAGE, DEFAULT_DELAY);
- options->iDelayUrl = (int)db_get_dw(NULL, MODULE, OPT_DELAY_URL, DEFAULT_DELAY);
- options->iDelayFile = (int)db_get_dw(NULL, MODULE, OPT_DELAY_FILE, DEFAULT_DELAY);
- options->iDelayOthers = (int)db_get_dw(NULL, MODULE, OPT_DELAY_OTHERS, DEFAULT_DELAY);
+ options->bDisable = db_get_b(NULL, MODULENAME, OPT_DISABLE, FALSE);
+ options->bPreview = db_get_b(NULL, MODULENAME, OPT_PREVIEW, TRUE);
+ options->bMenuitem = db_get_b(NULL, MODULENAME, OPT_MENUITEM, FALSE);
+ options->bDefaultColorMsg = db_get_b(NULL, MODULENAME, OPT_COLDEFAULT_MESSAGE, FALSE);
+ options->bDefaultColorUrl = db_get_b(NULL, MODULENAME, OPT_COLDEFAULT_URL, FALSE);
+ options->bDefaultColorFile = db_get_b(NULL, MODULENAME, OPT_COLDEFAULT_FILE, FALSE);
+ options->bDefaultColorOthers = db_get_b(NULL, MODULENAME, OPT_COLDEFAULT_OTHERS, FALSE);
+ options->colBackMsg = (COLORREF)db_get_dw(NULL, MODULENAME, OPT_COLBACK_MESSAGE, DEFAULT_COLBACK);
+ options->colTextMsg = (COLORREF)db_get_dw(NULL, MODULENAME, OPT_COLTEXT_MESSAGE, DEFAULT_COLTEXT);
+ options->colBackUrl = (COLORREF)db_get_dw(NULL, MODULENAME, OPT_COLBACK_URL, DEFAULT_COLBACK);
+ options->colTextUrl = (COLORREF)db_get_dw(NULL, MODULENAME, OPT_COLTEXT_URL, DEFAULT_COLTEXT);
+ options->colBackFile = (COLORREF)db_get_dw(NULL, MODULENAME, OPT_COLBACK_FILE, DEFAULT_COLBACK);
+ options->colTextFile = (COLORREF)db_get_dw(NULL, MODULENAME, OPT_COLTEXT_FILE, DEFAULT_COLTEXT);
+ options->colBackOthers = (COLORREF)db_get_dw(NULL, MODULENAME, OPT_COLBACK_OTHERS, DEFAULT_COLBACK);
+ options->colTextOthers = (COLORREF)db_get_dw(NULL, MODULENAME, OPT_COLTEXT_OTHERS, DEFAULT_COLTEXT);
+ options->maskNotify = (UINT)db_get_b(NULL, MODULENAME, OPT_MASKNOTIFY, DEFAULT_MASKNOTIFY);
+ options->maskActL = (UINT)db_get_b(NULL, MODULENAME, OPT_MASKACTL, DEFAULT_MASKACTL);
+ options->maskActR = (UINT)db_get_b(NULL, MODULENAME, OPT_MASKACTR, DEFAULT_MASKACTR);
+ options->maskActTE = (UINT)db_get_b(NULL, MODULENAME, OPT_MASKACTTE, DEFAULT_MASKACTE);
+ options->bMsgWindowCheck = db_get_b(NULL, MODULENAME, OPT_MSGWINDOWCHECK, TRUE);
+ options->bMsgReplyWindow = db_get_b(NULL, MODULENAME, OPT_MSGREPLYWINDOW, FALSE);
+ options->bMergePopup = db_get_b(NULL, MODULENAME, OPT_MERGEPOPUP, TRUE);
+ options->iDelayMsg = (int)db_get_dw(NULL, MODULENAME, OPT_DELAY_MESSAGE, DEFAULT_DELAY);
+ options->iDelayUrl = (int)db_get_dw(NULL, MODULENAME, OPT_DELAY_URL, DEFAULT_DELAY);
+ options->iDelayFile = (int)db_get_dw(NULL, MODULENAME, OPT_DELAY_FILE, DEFAULT_DELAY);
+ options->iDelayOthers = (int)db_get_dw(NULL, MODULENAME, OPT_DELAY_OTHERS, DEFAULT_DELAY);
options->iDelayDefault = (int)DBGetContactSettingRangedWord(NULL, "Popup", "Seconds", SETTING_LIFETIME_DEFAULT, SETTING_LIFETIME_MIN, SETTING_LIFETIME_MAX);
- options->bShowDate = db_get_b(NULL, MODULE, OPT_SHOW_DATE, TRUE);
- options->bShowTime = db_get_b(NULL, MODULE, OPT_SHOW_TIME, TRUE);
- options->bShowHeaders = db_get_b(NULL, MODULE, OPT_SHOW_HEADERS, TRUE);
- options->iNumberMsg = (BYTE)db_get_b(NULL, MODULE, OPT_NUMBER_MSG, TRUE);
- options->bShowON = db_get_b(NULL, MODULE, OPT_SHOW_ON, TRUE);
- options->bHideSend = db_get_b(NULL, MODULE, OPT_HIDESEND, TRUE);
- options->bNoRSS = db_get_b(NULL, MODULE, OPT_NORSS, FALSE);
- options->bReadCheck = db_get_b(NULL, MODULE, OPT_READCHECK, FALSE);
+ options->bShowDate = db_get_b(NULL, MODULENAME, OPT_SHOW_DATE, TRUE);
+ options->bShowTime = db_get_b(NULL, MODULENAME, OPT_SHOW_TIME, TRUE);
+ options->bShowHeaders = db_get_b(NULL, MODULENAME, OPT_SHOW_HEADERS, TRUE);
+ options->iNumberMsg = (BYTE)db_get_b(NULL, MODULENAME, OPT_NUMBER_MSG, TRUE);
+ options->bShowON = db_get_b(NULL, MODULENAME, OPT_SHOW_ON, TRUE);
+ options->bHideSend = db_get_b(NULL, MODULENAME, OPT_HIDESEND, TRUE);
+ options->bNoRSS = db_get_b(NULL, MODULENAME, OPT_NORSS, FALSE);
+ options->bReadCheck = db_get_b(NULL, MODULENAME, OPT_READCHECK, FALSE);
return 0;
}
int OptionsWrite(void)
{
- db_set_b(NULL, MODULE, OPT_DISABLE, options->bDisable);
- db_set_b(NULL, MODULE, OPT_PREVIEW, options->bPreview);
- db_set_b(NULL, MODULE, OPT_MENUITEM, options->bMenuitem);
- db_set_b(NULL, MODULE, OPT_COLDEFAULT_MESSAGE, options->bDefaultColorMsg);
- db_set_b(NULL, MODULE, OPT_COLDEFAULT_URL, options->bDefaultColorUrl);
- db_set_b(NULL, MODULE, OPT_COLDEFAULT_FILE, options->bDefaultColorFile);
- db_set_b(NULL, MODULE, OPT_COLDEFAULT_OTHERS, options->bDefaultColorOthers);
- db_set_dw(NULL, MODULE, OPT_COLBACK_MESSAGE, (DWORD)options->colBackMsg);
- db_set_dw(NULL, MODULE, OPT_COLTEXT_MESSAGE, (DWORD)options->colTextMsg);
- db_set_dw(NULL, MODULE, OPT_COLBACK_URL, (DWORD)options->colBackUrl);
- db_set_dw(NULL, MODULE, OPT_COLTEXT_URL, (DWORD)options->colTextUrl);
- db_set_dw(NULL, MODULE, OPT_COLBACK_FILE, (DWORD)options->colBackFile);
- db_set_dw(NULL, MODULE, OPT_COLTEXT_FILE, (DWORD)options->colTextFile);
- db_set_dw(NULL, MODULE, OPT_COLBACK_OTHERS, (DWORD)options->colBackOthers);
- db_set_dw(NULL, MODULE, OPT_COLTEXT_OTHERS, (DWORD)options->colTextOthers);
- db_set_b(NULL, MODULE, OPT_MASKNOTIFY, (BYTE)options->maskNotify);
- db_set_b(NULL, MODULE, OPT_MASKACTL, (BYTE)options->maskActL);
- db_set_b(NULL, MODULE, OPT_MASKACTR, (BYTE)options->maskActR);
- db_set_b(NULL, MODULE, OPT_MASKACTTE, (BYTE)options->maskActTE);
- db_set_b(NULL, MODULE, OPT_MSGWINDOWCHECK, options->bMsgWindowCheck);
- db_set_b(NULL, MODULE, OPT_MSGREPLYWINDOW, options->bMsgReplyWindow);
- db_set_b(NULL, MODULE, OPT_MERGEPOPUP, options->bMergePopup);
- db_set_dw(NULL, MODULE, OPT_DELAY_MESSAGE, (DWORD)options->iDelayMsg);
- db_set_dw(NULL, MODULE, OPT_DELAY_URL, (DWORD)options->iDelayUrl);
- db_set_dw(NULL, MODULE, OPT_DELAY_FILE, (DWORD)options->iDelayFile);
- db_set_dw(NULL, MODULE, OPT_DELAY_OTHERS, (DWORD)options->iDelayOthers);
- db_set_b(NULL, MODULE, OPT_SHOW_DATE, options->bShowDate);
- db_set_b(NULL, MODULE, OPT_SHOW_TIME, options->bShowTime);
- db_set_b(NULL, MODULE, OPT_SHOW_HEADERS, options->bShowHeaders);
- db_set_b(NULL, MODULE, OPT_NUMBER_MSG, (BYTE)options->iNumberMsg);
- db_set_b(NULL, MODULE, OPT_SHOW_ON, options->bShowON);
- db_set_b(NULL, MODULE, OPT_HIDESEND, options->bHideSend);
- db_set_b(NULL, MODULE, OPT_NORSS, options->bNoRSS);
- db_set_b(NULL, MODULE, OPT_READCHECK, options->bReadCheck);
+ db_set_b(NULL, MODULENAME, OPT_DISABLE, options->bDisable);
+ db_set_b(NULL, MODULENAME, OPT_PREVIEW, options->bPreview);
+ db_set_b(NULL, MODULENAME, OPT_MENUITEM, options->bMenuitem);
+ db_set_b(NULL, MODULENAME, OPT_COLDEFAULT_MESSAGE, options->bDefaultColorMsg);
+ db_set_b(NULL, MODULENAME, OPT_COLDEFAULT_URL, options->bDefaultColorUrl);
+ db_set_b(NULL, MODULENAME, OPT_COLDEFAULT_FILE, options->bDefaultColorFile);
+ db_set_b(NULL, MODULENAME, OPT_COLDEFAULT_OTHERS, options->bDefaultColorOthers);
+ db_set_dw(NULL, MODULENAME, OPT_COLBACK_MESSAGE, (DWORD)options->colBackMsg);
+ db_set_dw(NULL, MODULENAME, OPT_COLTEXT_MESSAGE, (DWORD)options->colTextMsg);
+ db_set_dw(NULL, MODULENAME, OPT_COLBACK_URL, (DWORD)options->colBackUrl);
+ db_set_dw(NULL, MODULENAME, OPT_COLTEXT_URL, (DWORD)options->colTextUrl);
+ db_set_dw(NULL, MODULENAME, OPT_COLBACK_FILE, (DWORD)options->colBackFile);
+ db_set_dw(NULL, MODULENAME, OPT_COLTEXT_FILE, (DWORD)options->colTextFile);
+ db_set_dw(NULL, MODULENAME, OPT_COLBACK_OTHERS, (DWORD)options->colBackOthers);
+ db_set_dw(NULL, MODULENAME, OPT_COLTEXT_OTHERS, (DWORD)options->colTextOthers);
+ db_set_b(NULL, MODULENAME, OPT_MASKNOTIFY, (BYTE)options->maskNotify);
+ db_set_b(NULL, MODULENAME, OPT_MASKACTL, (BYTE)options->maskActL);
+ db_set_b(NULL, MODULENAME, OPT_MASKACTR, (BYTE)options->maskActR);
+ db_set_b(NULL, MODULENAME, OPT_MASKACTTE, (BYTE)options->maskActTE);
+ db_set_b(NULL, MODULENAME, OPT_MSGWINDOWCHECK, options->bMsgWindowCheck);
+ db_set_b(NULL, MODULENAME, OPT_MSGREPLYWINDOW, options->bMsgReplyWindow);
+ db_set_b(NULL, MODULENAME, OPT_MERGEPOPUP, options->bMergePopup);
+ db_set_dw(NULL, MODULENAME, OPT_DELAY_MESSAGE, (DWORD)options->iDelayMsg);
+ db_set_dw(NULL, MODULENAME, OPT_DELAY_URL, (DWORD)options->iDelayUrl);
+ db_set_dw(NULL, MODULENAME, OPT_DELAY_FILE, (DWORD)options->iDelayFile);
+ db_set_dw(NULL, MODULENAME, OPT_DELAY_OTHERS, (DWORD)options->iDelayOthers);
+ db_set_b(NULL, MODULENAME, OPT_SHOW_DATE, options->bShowDate);
+ db_set_b(NULL, MODULENAME, OPT_SHOW_TIME, options->bShowTime);
+ db_set_b(NULL, MODULENAME, OPT_SHOW_HEADERS, options->bShowHeaders);
+ db_set_b(NULL, MODULENAME, OPT_NUMBER_MSG, (BYTE)options->iNumberMsg);
+ db_set_b(NULL, MODULENAME, OPT_SHOW_ON, options->bShowON);
+ db_set_b(NULL, MODULENAME, OPT_HIDESEND, options->bHideSend);
+ db_set_b(NULL, MODULENAME, OPT_NORSS, options->bNoRSS);
+ db_set_b(NULL, MODULENAME, OPT_READCHECK, options->bReadCheck);
return 0;
}
|