diff options
Diffstat (limited to 'plugins/NewXstatusNotify/src')
-rw-r--r-- | plugins/NewXstatusNotify/src/options.cpp | 12 |
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));
}
|