summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-11-13 18:07:48 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-11-13 18:07:48 +0000
commitb236590d991e59ef0f482bf52757efb59588009d (patch)
tree757c3648555b468aec2c2797820c651f4aee0da1 /plugins
parentdab7b035d265597172485653d7478384a18ec04d (diff)
minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@10981 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewsAggregator/Src/Options.cpp18
-rw-r--r--plugins/NewsAggregator/Src/Utils.cpp2
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;
}