diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-07-25 15:07:49 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-07-25 15:07:49 +0000 |
commit | 153360d2601bded9d77df304a2a2b4c83a5a4998 (patch) | |
tree | 671c97ca536b4e54c8efbb364ad09965cea8d7c9 /plugins/NewsAggregator/Src/Options.cpp | |
parent | 075c7777370258c5e1ccff1dc22f31b416e1e761 (diff) |
MirandaG15: common project
git-svn-id: http://svn.miranda-ng.org/main/trunk@14691 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewsAggregator/Src/Options.cpp')
-rw-r--r-- | plugins/NewsAggregator/Src/Options.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp index 7dac335b90..4c2bcd6995 100644 --- a/plugins/NewsAggregator/Src/Options.cpp +++ b/plugins/NewsAggregator/Src/Options.cpp @@ -115,12 +115,13 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
TCHAR tszURL[MAX_PATH] = { 0 };
- const TCHAR *tszTitle = NULL;
+ TCHAR *tszTitle = NULL;
if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, _countof(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0)
- tszTitle = CheckFeed(tszURL, hwndDlg);
+ tszTitle = (TCHAR*)CheckFeed(tszURL, hwndDlg);
else
MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK);
SetDlgItemText(hwndDlg, IDC_FEEDTITLE, tszTitle);
+ mir_free(tszTitle);
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), TRUE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Check Feed"));
}
@@ -282,8 +283,9 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, _countof(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0) {
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
- const TCHAR *tszTitle = CheckFeed(tszURL, hwndDlg);
+ TCHAR *tszTitle = (TCHAR*)CheckFeed(tszURL, hwndDlg);
SetDlgItemText(hwndDlg, IDC_FEEDTITLE, tszTitle);
+ mir_free(tszTitle);
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), TRUE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Check Feed"));
}
@@ -437,8 +439,9 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, _countof(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0) {
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
- const TCHAR *tszTitle = CheckFeed(tszURL, hwndDlg);
+ TCHAR *tszTitle = (TCHAR*)CheckFeed(tszURL, hwndDlg);
SetDlgItemText(hwndDlg, IDC_FEEDTITLE, tszTitle);
+ mir_free(tszTitle);
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), TRUE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Check Feed"));
}
|