diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-09 12:57:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-09 12:57:48 +0300 |
commit | 3e3526a52e25abfec0598f305cbc6d8b0049567b (patch) | |
tree | d6c3946c4e6143383e4e602f8a969b0bde248740 /plugins/NewsAggregator/Src/Services.cpp | |
parent | bd989f8f08faf42e19e4e62b507e13cd4643a4ac (diff) |
fix for broken service
Diffstat (limited to 'plugins/NewsAggregator/Src/Services.cpp')
-rw-r--r-- | plugins/NewsAggregator/Src/Services.cpp | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index ad96232894..07a40ef28f 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -157,20 +157,19 @@ INT_PTR AddFeed(WPARAM, LPARAM) INT_PTR ChangeFeed(WPARAM hContact, LPARAM)
{
- //HWND hChangeFeedDlg = WindowList_Find(hChangeFeedDlgList, hContact);
-
- if (pChangeFeedDialog == nullptr) {
- pChangeFeedDialog = new CFeedEditor(-1, nullptr, hContact);
- pChangeFeedDialog->Show();
+ CFeedEditor *pDlg = nullptr;
+ for (auto &it : g_arFeeds)
+ if (it->getContact() == hContact)
+ pDlg = it;
+
+ if (pDlg == nullptr) {
+ pDlg = new CFeedEditor(-1, nullptr, hContact);
+ pDlg->Show();
+ }
+ else {
+ SetForegroundWindow(pDlg->GetHwnd());
+ SetFocus(pDlg->GetHwnd());
}
-
- /*if (!hChangeFeedDlg) {
- hChangeFeedDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), nullptr, DlgProcChangeFeedMenu, hContact);
- ShowWindow(hChangeFeedDlg, SW_SHOW);
- } else {
- SetForegroundWindow(hChangeFeedDlg);
- SetFocus(hChangeFeedDlg);
- }*/
return 0;
}
@@ -179,8 +178,6 @@ INT_PTR ImportFeeds(WPARAM, LPARAM) if (pImportDialog == nullptr)
pImportDialog = new CImportFeed(nullptr);
pImportDialog->Show();
-
- //CreateDialog(hInst, MAKEINTRESOURCE(IDD_FEEDIMPORT), nullptr, DlgProcImportOpts);
return 0;
}
@@ -189,8 +186,6 @@ INT_PTR ExportFeeds(WPARAM, LPARAM) if (pExportDialog == nullptr)
pExportDialog = new CExportFeed();
pExportDialog->Show();
-
- //CreateDialog(hInst, MAKEINTRESOURCE(IDD_FEEDEXPORT), nullptr, DlgProcExportOpts);
return 0;
}
|