summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp16
-rw-r--r--plugins/TabSRMM/src/nen.h57
2 files changed, 37 insertions, 36 deletions
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index 531c974e71..e0164d4d59 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -92,9 +92,9 @@ int TSAPI NEN_ReadOptions(NEN_OPTIONS *options)
options->maskActR = (UINT)M.GetByte(MODULE, OPT_MASKACTR, DEFAULT_MASKACTR);
options->maskActTE = (UINT)M.GetByte(MODULE, OPT_MASKACTTE, DEFAULT_MASKACTR) & (MASK_OPEN | MASK_DISMISS);
options->bMergePopup = (BOOL)M.GetByte(MODULE, OPT_MERGEPOPUP, 0);
- options->iDelayMsg = (int)M.GetDword(MODULE, OPT_DELAY_MESSAGE, (DWORD)DEFAULT_DELAY);
- options->iDelayOthers = (int)M.GetDword(MODULE, OPT_DELAY_OTHERS, (DWORD)DEFAULT_DELAY);
- options->iDelayErr = (int)M.GetDword(MODULE, OPT_DELAY_ERR, (DWORD)DEFAULT_DELAY);
+ options->iDelayMsg = (int)M.GetDword(MODULE, OPT_DELAY_MESSAGE, DEFAULT_DELAY);
+ options->iDelayOthers = (int)M.GetDword(MODULE, OPT_DELAY_OTHERS, DEFAULT_DELAY);
+ options->iDelayErr = (int)M.GetDword(MODULE, OPT_DELAY_ERR, DEFAULT_DELAY);
options->iDelayDefault = (int)DBGetContactSettingRangedWord(NULL, "Popup", "Seconds", SETTING_LIFETIME_DEFAULT, SETTING_LIFETIME_MIN, SETTING_LIFETIME_MAX);
options->bShowHeaders = (BYTE)M.GetByte(MODULE, OPT_SHOW_HEADERS, FALSE);
options->bNoRSS = (BOOL)M.GetByte(MODULE, OPT_NORSS, FALSE);
@@ -150,11 +150,10 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
switch (msg) {
case WM_INITDIALOG:
+ TranslateDialogDefault(hWnd);
{
- TVINSERTSTRUCT tvi = {0};
int i;
SetWindowLongPtr(GetDlgItem(hWnd, IDC_EVENTOPTIONS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hWnd, IDC_EVENTOPTIONS), GWL_STYLE) | (TVS_NOHSCROLL | TVS_CHECKBOXES));
- TranslateDialogDefault(hWnd);
HIMAGELIST himl = (HIMAGELIST)SendDlgItemMessage(hWnd, IDC_EVENTOPTIONS, TVM_SETIMAGELIST, TVSIL_STATE, (LPARAM)CreateStateImageList());
ImageList_Destroy(himl);
@@ -166,15 +165,15 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
}
Utils::showDlgControl(hWnd, IDC_NOPOPUPAVAIL, SW_SHOW);
}
- else
- Utils::showDlgControl(hWnd, IDC_NOPOPUPAVAIL, SW_HIDE);
+ else Utils::showDlgControl(hWnd, IDC_NOPOPUPAVAIL, SW_HIDE);
+
/*
* fill the tree view
*/
TOptionListGroup *lGroups = CTranslator::getGroupTree(CTranslator::TREE_NEN);
for (i=0; lGroups[i].szName != NULL; i++) {
- tvi.hParent = 0;
+ TVINSERTSTRUCT tvi = { 0 };
tvi.hInsertAfter = TVI_LAST;
tvi.item.mask = TVIF_TEXT | TVIF_STATE;
tvi.item.pszText = TranslateTS(lGroups[i].szName);
@@ -185,6 +184,7 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
TOptionListItem *defaultItems = CTranslator::getTree(CTranslator::TREE_NEN);
for (i=0; defaultItems[i].szName != 0; i++) {
+ TVINSERTSTRUCT tvi = { 0 };
tvi.hParent = (HTREEITEM)lGroups[defaultItems[i].uGroup].handle;
tvi.hInsertAfter = TVI_LAST;
tvi.item.pszText = TranslateTS(defaultItems[i].szName);
diff --git a/plugins/TabSRMM/src/nen.h b/plugins/TabSRMM/src/nen.h
index c59846b9e0..fdc23c0abb 100644
--- a/plugins/TabSRMM/src/nen.h
+++ b/plugins/TabSRMM/src/nen.h
@@ -50,7 +50,7 @@ int tabSRMM_ShowPopup(HANDLE hContact, HANDLE hDbEvent, WORD eventType, int wind
#define DEFAULT_MASKNOTIFY (MASK_MESSAGE|MASK_URL|MASK_FILE|MASK_OTHER)
#define DEFAULT_MASKACTL (MASK_OPEN|MASK_DISMISS)
#define DEFAULT_MASKACTR (MASK_DISMISS)
-#define DEFAULT_DELAY -1
+#define DEFAULT_DELAY 0
#define MASK_MESSAGE 0x0001
#define MASK_URL 0x0002
@@ -98,39 +98,40 @@ int tabSRMM_ShowPopup(HANDLE hContact, HANDLE hDbEvent, WORD eventType, int wind
struct NEN_OPTIONS
{
- BOOL bPreview;
- BOOL bDefaultColorMsg;
- BOOL bDefaultColorOthers;
- BOOL bDefaultColorErr;
- BOOL bDisableNonMessage;
+ BOOL bPreview;
+ BOOL bDefaultColorMsg;
+ BOOL bDefaultColorOthers;
+ BOOL bDefaultColorErr;
+ BOOL bDisableNonMessage;
+ UINT maskActL;
+ UINT maskActR;
+ UINT maskActTE;
+ int iDelayMsg;
+ int iDelayOthers;
+ int iDelayErr;
+ int iDelayDefault;
+ BOOL bMergePopup;
+ BOOL bShowHeaders;
+ BOOL bNoRSS;
+ int iDisable;
+ int iMUCDisable;
+ int dwStatusMask;
+ BOOL bTraySupport;
+ BOOL bTrayExist;
+ BOOL iNoSounds;
+ BOOL iNoAutoPopup;
+ BOOL bWindowCheck;
+ int iLimitPreview;
+ WORD wMaxRecent;
+ WORD wMaxFavorites;
+ DWORD dwRemoveMask;
+
COLORREF colBackMsg;
COLORREF colTextMsg;
COLORREF colBackOthers;
COLORREF colTextOthers;
COLORREF colBackErr;
COLORREF colTextErr;
- UINT maskActL;
- UINT maskActR;
- UINT maskActTE;
- int iDelayMsg;
- int iDelayOthers;
- int iDelayErr;
- int iDelayDefault;
- BOOL bMergePopup;
- BOOL bShowHeaders;
- BOOL bNoRSS;
- int iDisable;
- int iMUCDisable;
- int dwStatusMask;
- BOOL bTraySupport;
- BOOL bTrayExist;
- BOOL iNoSounds;
- BOOL iNoAutoPopup;
- BOOL bWindowCheck;
- int iLimitPreview;
- WORD wMaxRecent;
- WORD wMaxFavorites;
- DWORD dwRemoveMask;
};
struct EVENT_DATAT