summaryrefslogtreecommitdiff
path: root/plugins/NewXstatusNotify/src/options.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-09-15 11:18:45 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-09-15 11:18:45 +0000
commitf627d0bf7a1978a9b8360ada9c199ba9667977b1 (patch)
tree173347df3358829fb6e929e8d7c10096c9e70ae9 /plugins/NewXstatusNotify/src/options.cpp
parent2052ceac729e8812227f90ce8433a07c984f27a3 (diff)
set first protocol tamplate in edit box when init status message options page
git-svn-id: http://svn.miranda-ng.org/main/trunk@1574 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewXstatusNotify/src/options.cpp')
-rw-r--r--plugins/NewXstatusNotify/src/options.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp
index 9a3d9e4c55..62fa290147 100644
--- a/plugins/NewXstatusNotify/src/options.cpp
+++ b/plugins/NewXstatusNotify/src/options.cpp
@@ -766,7 +766,7 @@ INT_PTR CALLBACK DlgProcSMPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
else _tcsncpy(prototemplate->ProtoTemplate, dbVar.ptszVal, SIZEOF(prototemplate->ProtoTemplate));
mir_free(szprotoname);
- ListView_InsertItem(hList,&lvItem);
+ ListView_InsertItem(hList, &lvItem);
ProtoTemplates.insert(prototemplate, ProtoTemplates.getCount());
char dbSetting[128];
@@ -774,6 +774,12 @@ INT_PTR CALLBACK DlgProcSMPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
ListView_SetCheckState(hList, lvItem.iItem, DBGetContactSettingByte(NULL, MODULE, dbSetting, TRUE));
lvItem.iItem++;
}
+ if (lvItem.iItem)
+ {
+ ListView_SetSelectionMark(hList, 0);
+ PROTOTEMPLATE *prototemplate = ProtoTemplates[0];
+ SetDlgItemText(hwndDlg, IDC_POPUPTEXT, prototemplate->ProtoTemplate);
+ }
UpdateListFlag = FALSE;
}
return TRUE;
@@ -811,12 +817,12 @@ INT_PTR CALLBACK DlgProcSMPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
NMLISTVIEW *nmlv = (NMLISTVIEW *)lParam;
if (nmlv->uNewState == 3 && !UpdateListFlag)
{
- HWND hList = GetDlgItem(hwndDlg,IDC_PROTOCOLLIST);
+ HWND hList = GetDlgItem(hwndDlg, IDC_PROTOCOLLIST);
PROTOTEMPLATE *prototemplate;
if (ListView_GetHotItem(hList) != ListView_GetSelectionMark(hList)) {
prototemplate = ProtoTemplates[ListView_GetSelectionMark(hList)];
GetDlgItemText(hwndDlg, IDC_POPUPTEXT, prototemplate->ProtoTemplate, MAX_PATH);
- ProtoTemplates.remove( ListView_GetSelectionMark(hList));
+ ProtoTemplates.remove(ListView_GetSelectionMark(hList));
ProtoTemplates.insert(prototemplate, ListView_GetSelectionMark(hList));
}