summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/eventpopups.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-04 20:37:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-04 20:37:42 +0000
commitc56d8aa7eb2dcaed8420770df76b79747b6c2247 (patch)
treeafcec8962f13912c388b4c02b373b781c290cd3e /plugins/TabSRMM/src/eventpopups.cpp
parent6cc150354bd07c0e7f6e50bd5eca489fe71b63c0 (diff)
more translation fixes for tabs
git-svn-id: http://svn.miranda-ng.org/main/trunk@307 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/eventpopups.cpp')
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index 94cd6b315c..5dfc2e8245 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -174,7 +174,7 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
switch (msg) {
case WM_INITDIALOG: {
TVINSERTSTRUCT tvi = {0};
- int i = 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());
@@ -195,24 +195,21 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
*/
TOptionListGroup *lGroups = CTranslator::getGroupTree(CTranslator::TREE_NEN);
-
- while (lGroups[i].szName != NULL) {
+ for (i=0; lGroups[i].szName != NULL; i++) {
tvi.hParent = 0;
tvi.hInsertAfter = TVI_LAST;
tvi.item.mask = TVIF_TEXT | TVIF_STATE;
- tvi.item.pszText = lGroups[i].szName;
+ tvi.item.pszText = TranslateTS(lGroups[i].szName);
tvi.item.stateMask = TVIS_STATEIMAGEMASK | TVIS_EXPANDED | TVIS_BOLD;
tvi.item.state = INDEXTOSTATEIMAGEMASK(0) | TVIS_EXPANDED | TVIS_BOLD;
- lGroups[i++].handle = (LRESULT)TreeView_InsertItem(GetDlgItem(hWnd, IDC_EVENTOPTIONS), &tvi);
+ lGroups[i].handle = (LRESULT)TreeView_InsertItem(GetDlgItem(hWnd, IDC_EVENTOPTIONS), &tvi);
}
- i = 0;
TOptionListItem *defaultItems = CTranslator::getTree(CTranslator::TREE_NEN);
-
- while (defaultItems[i].szName != 0) {
+ for (i=0; defaultItems[i].szName != 0; i++) {
tvi.hParent = (HTREEITEM)lGroups[defaultItems[i].uGroup].handle;
tvi.hInsertAfter = TVI_LAST;
- tvi.item.pszText = defaultItems[i].szName;
+ tvi.item.pszText = TranslateTS(defaultItems[i].szName);
tvi.item.mask = TVIF_TEXT | TVIF_STATE | TVIF_PARAM;
tvi.item.lParam = i;
tvi.item.stateMask = TVIS_STATEIMAGEMASK;
@@ -223,8 +220,8 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
tvi.item.state = INDEXTOSTATEIMAGEMASK(uVal & defaultItems[i].id ? 3 : 2);//2 : 1);
}
defaultItems[i].handle = (LRESULT)TreeView_InsertItem(GetDlgItem(hWnd, IDC_EVENTOPTIONS), &tvi);
- i++;
}
+
SendDlgItemMessage(hWnd, IDC_COLBACK_MESSAGE, CPM_SETCOLOUR, 0, options->colBackMsg);
SendDlgItemMessage(hWnd, IDC_COLTEXT_MESSAGE, CPM_SETCOLOUR, 0, options->colTextMsg);
SendDlgItemMessage(hWnd, IDC_COLBACK_OTHERS, CPM_SETCOLOUR, 0, options->colBackOthers);
@@ -377,13 +374,12 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
}
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY: {
- int i = 0;
+ int i;
TVITEM item = {0};
struct TContainerData *pContainer = pFirstContainer;
TOptionListItem *defaultItems = CTranslator::getTree(CTranslator::TREE_NEN);
-
- while (defaultItems[i].szName != NULL) {
+ for (i=0; defaultItems[i].szName != NULL; i++) {
item.mask = TVIF_HANDLE | TVIF_STATE;
item.hItem = (HTREEITEM)defaultItems[i].handle;
item.stateMask = TVIS_STATEIMAGEMASK;
@@ -397,8 +393,8 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
UINT *uVal = (UINT *)defaultItems[i].lParam;
*uVal = ((item.state >> 12) == 3/*2*/) ? *uVal | defaultItems[i].id : *uVal & ~defaultItems[i].id;
}
- i++;
}
+
M->WriteByte("Chat", "PopupStyle", (BYTE)g_Settings.iPopupStyle);
DBWriteContactSettingWord(NULL, "Chat", "PopupTimeout", g_Settings.iPopupTimeout);