diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-10-16 17:39:10 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-10-16 17:39:10 +0000 |
commit | 59cc9dc475c94284bd3f8f1fc14bfcc7f9da1d1e (patch) | |
tree | b2c3ed1eac7b1d57867600e6562e593a5a820423 | |
parent | 268fd404aae7e3592874ac8c618ce084ad3bd886 (diff) |
NewsAggregator:
- minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@15566 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/NewsAggregator/Src/ExportImport.cpp | 4 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Options.cpp | 23 |
2 files changed, 10 insertions, 17 deletions
diff --git a/plugins/NewsAggregator/Src/ExportImport.cpp b/plugins/NewsAggregator/Src/ExportImport.cpp index 20384c3e18..45aac14986 100644 --- a/plugins/NewsAggregator/Src/ExportImport.cpp +++ b/plugins/NewsAggregator/Src/ExportImport.cpp @@ -215,7 +215,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM MessageBox(hwndDlg, mes, TranslateT("News Aggregator"), MB_OK | MB_ICONINFORMATION);
}
}
-
+ // fall through
case IDCANCEL:
DestroyWindow(hwndDlg);
break;
@@ -556,7 +556,7 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM xmlDestroyNode(hXml);
}
}
-
+ // fall through
case IDCANCEL:
DestroyWindow(hwndDlg);
break;
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp index 80810f8a26..9420c88f79 100644 --- a/plugins/NewsAggregator/Src/Options.cpp +++ b/plugins/NewsAggregator/Src/Options.cpp @@ -147,27 +147,20 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP TranslateDialogDefault(hwndDlg);
{
ItemInfo &SelItem = *(ItemInfo*)lParam;
- ItemInfo *nSelItem = new ItemInfo(SelItem);
SetWindowText(hwndDlg, TranslateT("Change Feed"));
SendDlgItemMessage(hwndDlg, IDC_CHECKTIME, EM_LIMITTEXT, 3, 0);
SendDlgItemMessage(hwndDlg, IDC_TIMEOUT_VALUE_SPIN, UDM_SETRANGE32, 0, 999);
- MCONTACT hContact;
- for (hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
+ for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
ptrT dbNick(db_get_tsa(hContact, MODULE, "Nick"));
- if (dbNick == NULL)
- continue;
-
- if (mir_tstrcmp(dbNick, SelItem.nick) != 0)
+ if ((dbNick == NULL) || (mir_tstrcmp(dbNick, SelItem.nick) != 0))
continue;
ptrT dbURL(db_get_tsa(hContact, MODULE, "URL"));
- if (dbURL == NULL)
- continue;
-
- if (mir_tstrcmp(dbURL, SelItem.url) != 0)
+ if ((dbURL == NULL) || (mir_tstrcmp(dbURL, SelItem.url) != 0))
continue;
+ ItemInfo *nSelItem = new ItemInfo(SelItem);
nSelItem->hContact = hContact;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)nSelItem);
SetDlgItemText(hwndDlg, IDC_FEEDURL, SelItem.url);
@@ -189,13 +182,13 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP SetDlgItemText(hwndDlg, IDC_LOGIN, szLogin);
mir_free(szLogin);
}
- ptrA pwd(db_get_sa(hContact, MODULE, "Password"));
+ pass_ptrA pwd(db_get_sa(hContact, MODULE, "Password"));
SetDlgItemTextA(hwndDlg, IDC_PASSWORD, pwd);
}
+ WindowList_Add(hChangeFeedDlgList, hwndDlg, hContact);
+ Utils_RestoreWindowPositionNoSize(hwndDlg, hContact, MODULE, "ChangeDlg");
break;
}
- WindowList_Add(hChangeFeedDlgList, hwndDlg, hContact);
- Utils_RestoreWindowPositionNoSize(hwndDlg, hContact, MODULE, "ChangeDlg");
}
return TRUE;
@@ -351,7 +344,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP SetDlgItemText(hwndDlg, IDC_LOGIN, ptszLogin);
mir_free(ptszLogin);
}
- ptrA pwd(db_get_sa(hContact, MODULE, "Password"));
+ pass_ptrA pwd(db_get_sa(hContact, MODULE, "Password"));
SetDlgItemTextA(hwndDlg, IDC_PASSWORD, pwd);
}
}
|