From b236590d991e59ef0f482bf52757efb59588009d Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Thu, 13 Nov 2014 18:07:48 +0000 Subject: minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@10981 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewsAggregator/Src/Options.cpp | 18 +++--------------- plugins/NewsAggregator/Src/Utils.cpp | 2 +- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp index 90bad063a1..ec41c43f7d 100644 --- a/plugins/NewsAggregator/Src/Options.cpp +++ b/plugins/NewsAggregator/Src/Options.cpp @@ -48,10 +48,6 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); break; } - if (GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false) < 0) { - MessageBox(hwndDlg, TranslateT("Enter checking interval"), TranslateT("Error"), MB_OK); - break; - } if (!GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str))) { MessageBox(hwndDlg, TranslateT("Enter message format"), TranslateT("Error"), MB_OK); break; @@ -66,7 +62,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)); db_set_ts(hContact, MODULE, "URL", str); db_set_b(hContact, MODULE, "CheckState", 1); - db_set_dw(hContact, MODULE, "UpdateTime", GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false)); + db_set_dw(hContact, MODULE, "UpdateTime", (DWORD)GetDlgItemInt(hwndDlg, IDC_CHECKTIME, NULL, false)); GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str)); db_set_ts(hContact, MODULE, "MsgFormat", str); db_set_w(hContact, MODULE, "Status", CallProtoService(MODULE, PS_GETSTATUS, 0, 0)); @@ -216,10 +212,6 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); break; } - if (GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false) < 0) { - MessageBox(hwndDlg, TranslateT("Enter checking interval"), TranslateT("Error"), MB_OK); - break; - } if (!GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str))) { MessageBox(hwndDlg, TranslateT("Enter message format"), TranslateT("Error"), MB_OK); break; @@ -229,7 +221,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP db_set_ts(SelItem->hContact, MODULE, "URL", str); GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str)); db_set_ts(SelItem->hContact, MODULE, "Nick", str); - db_set_dw(SelItem->hContact, MODULE, "UpdateTime", GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false)); + db_set_dw(SelItem->hContact, MODULE, "UpdateTime", (DWORD)GetDlgItemInt(hwndDlg, IDC_CHECKTIME, NULL, false)); GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str)); db_set_ts(SelItem->hContact, MODULE, "MsgFormat", str); if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) { @@ -377,10 +369,6 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); break; } - if (GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false) < 0) { - MessageBox(hwndDlg, TranslateT("Enter checking interval"), TranslateT("Error"), MB_OK); - break; - } if (!GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str))) { MessageBox(hwndDlg, TranslateT("Enter message format"), TranslateT("Error"), MB_OK); break; @@ -390,7 +378,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP db_set_ts(hContact, MODULE, "URL", str); GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str)); db_set_ts(hContact, MODULE, "Nick", str); - db_set_dw(hContact, MODULE, "UpdateTime", GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false)); + db_set_dw(hContact, MODULE, "UpdateTime", (DWORD)GetDlgItemInt(hwndDlg, IDC_CHECKTIME, NULL, false)); GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str)); db_set_ts(hContact, MODULE, "MsgFormat", str); if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) { diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index 1db0e19e4a..68b09039d0 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -85,11 +85,11 @@ void GetNewsData(TCHAR *tszUrl, char **szData, MCONTACT hContact, HWND hwndDlg) nlhr.headers[2].szValue = "no-cache"; nlhr.headers[3].szName = "Connection"; nlhr.headers[3].szValue = "close"; + char auth[256]; if (db_get_b(hContact, MODULE, "UseAuth", 0) || IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) { nlhr.headersCount++; nlhr.headers[4].szName = "Authorization"; - char auth[256]; CreateAuthString(auth, hContact, hwndDlg); nlhr.headers[4].szValue = auth; } -- cgit v1.2.3