summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregstor/Src/Services.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewsAggregstor/Src/Services.cpp')
-rw-r--r--plugins/NewsAggregstor/Src/Services.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/plugins/NewsAggregstor/Src/Services.cpp b/plugins/NewsAggregstor/Src/Services.cpp
index 42fbc2e0b0..b47d688f08 100644
--- a/plugins/NewsAggregstor/Src/Services.cpp
+++ b/plugins/NewsAggregstor/Src/Services.cpp
@@ -70,10 +70,8 @@ int NewsAggrPreShutdown(WPARAM wParam,LPARAM lParam)
{
SendMessage(hAddFeedDlg, WM_CLOSE, 0, 0);
}
- if (hChangeFeedDlg)
- {
- SendMessage(hChangeFeedDlg, WM_CLOSE, 0, 0);
- }
+ WindowList_Broadcast(hChangeFeedDlgList, WM_CLOSE, 0, 0);
+
mir_forkthread(WorkingThread, (void*)ID_STATUS_OFFLINE);
KillTimer(NULL, timerId);
NetlibUnInit();
@@ -182,8 +180,18 @@ INT_PTR AddFeed(WPARAM wParam,LPARAM lParam)
INT_PTR ChangeFeed(WPARAM wParam,LPARAM lParam)
{
- hChangeFeedDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), NULL, DlgProcChangeFeedMenu, (LPARAM)wParam);
- ShowWindow(hChangeFeedDlg, SW_SHOW);
+ HANDLE hContact = (HANDLE) wParam;
+ HWND hChangeFeedDlg = WindowList_Find(hChangeFeedDlgList,hContact);
+ if(!hChangeFeedDlg)
+ {
+ hChangeFeedDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), NULL, DlgProcChangeFeedMenu, (LPARAM)hContact);
+ ShowWindow(hChangeFeedDlg, SW_SHOW);
+ }
+ else
+ {
+ SetForegroundWindow(hChangeFeedDlg);
+ SetFocus(hChangeFeedDlg);
+ }
return 0;
}