From 8a74e7495ce5ad39de4f5c25121a84d35df90c36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2018 15:08:48 +0300 Subject: CMPlugin to receive a reference to PLUGININFOEX --- plugins/NewEventNotify/src/options.cpp | 136 ++++++++++++++++----------------- 1 file changed, 68 insertions(+), 68 deletions(-) (limited to 'plugins/NewEventNotify/src/options.cpp') 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; } -- cgit v1.2.3