summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator/Src/Options.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-10-16 17:39:10 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-10-16 17:39:10 +0000
commit59cc9dc475c94284bd3f8f1fc14bfcc7f9da1d1e (patch)
treeb2c3ed1eac7b1d57867600e6562e593a5a820423 /plugins/NewsAggregator/Src/Options.cpp
parent268fd404aae7e3592874ac8c618ce084ad3bd886 (diff)
NewsAggregator:
- minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@15566 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewsAggregator/Src/Options.cpp')
-rw-r--r--plugins/NewsAggregator/Src/Options.cpp23
1 files changed, 8 insertions, 15 deletions
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);
}
}