diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-11 20:46:09 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-11 20:46:17 +0300 |
commit | 1a23578ffa4dd87cc024f362bd8b2fadfa087e23 (patch) | |
tree | b98bd46ac4c6004d2f6c02615eafd7046e061018 /plugins/Scriver/src/chat/main.cpp | |
parent | a81484f320776e7c945e2f74172f979745dd870b (diff) |
group chats:
- massive extinction of all remaining GC_* messages;
- color chooser completely moved to mir_app;
- color buttons' subclass function also moved to mir_app;
- all code management transferred to a bunch of virtual functions, members of CChatRoomDlg;
- numerous small fixes, like fix for a broken highlight in StdMsg
Diffstat (limited to 'plugins/Scriver/src/chat/main.cpp')
-rw-r--r-- | plugins/Scriver/src/chat/main.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/plugins/Scriver/src/chat/main.cpp b/plugins/Scriver/src/chat/main.cpp index 4a419ebde8..086b64c529 100644 --- a/plugins/Scriver/src/chat/main.cpp +++ b/plugins/Scriver/src/chat/main.cpp @@ -57,13 +57,13 @@ static void OnReplaceSession(SESSION_INFO *si) static void OnNewUser(SESSION_INFO *si, USERINFO*)
{
if (si->pDlg)
- SendMessage(si->pDlg->GetHwnd(), GC_UPDATENICKLIST, 0, 0);
+ si->pDlg->UpdateNickList();
}
static void OnSetStatus(SESSION_INFO *si, int)
{
if (si->pDlg)
- PostMessage(si->pDlg->GetHwnd(), GC_FIXTABICONS, 0, 0);
+ si->pDlg->FixTabIcons();
}
static void OnFlashHighlight(SESSION_INFO *si, int bInactive)
@@ -73,7 +73,14 @@ static void OnFlashHighlight(SESSION_INFO *si, int bInactive) if (g_Settings.bFlashWindowHighlight)
SendMessage(GetParent(si->pDlg->GetHwnd()), CM_STARTFLASHING, 0, 0);
- SendMessage(si->pDlg->GetHwnd(), GC_SETMESSAGEHIGHLIGHT, 0, 0);
+
+ si->wState |= GC_EVENT_HIGHLIGHT;
+ si->pDlg->FixTabIcons();
+ si->pDlg->UpdateTitle();
+
+ HWND hwndParent = GetParent(si->pDlg->GetHwnd());
+ if (g_Settings.bFlashWindowHighlight && GetActiveWindow() != si->pDlg->GetHwnd() && GetForegroundWindow() != hwndParent)
+ SendMessage(hwndParent, CM_STARTFLASHING, 0, 0);
}
static void OnFlashWindow(SESSION_INFO *si, int bInactive)
@@ -83,7 +90,13 @@ static void OnFlashWindow(SESSION_INFO *si, int bInactive) if (g_Settings.bFlashWindow)
SendMessage(GetParent(si->pDlg->GetHwnd()), CM_STARTFLASHING, 0, 0);
- SendMessage(si->pDlg->GetHwnd(), GC_SETTABHIGHLIGHT, 0, 0);
+
+ si->pDlg->FixTabIcons();
+ si->pDlg->UpdateTitle();
+
+ HWND hwndParent = GetParent(si->pDlg->GetHwnd());
+ if (g_Settings.bFlashWindow && GetActiveWindow() != hwndParent && GetForegroundWindow() != hwndParent)
+ SendMessage(hwndParent, CM_STARTFLASHING, 0, 0);
}
static void OnCreateModule(MODULEINFO *mi)
|