summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-20 11:28:33 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-20 11:28:33 +0300
commit6685af71a44eb2b53c157ed23c74a4cd50b50031 (patch)
treec4bd31d2ec99cae88f9dd39fb17a2e27d70b7d3a /src
parent470d175efcf15eaa110f55b2834dadc5cce9176e (diff)
code cleaning
Diffstat (limited to 'src')
-rw-r--r--src/core/stdmsg/src/chat_manager.cpp4
-rw-r--r--src/core/stdmsg/src/chat_window.cpp6
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp4
-rw-r--r--src/core/stdmsg/src/msgs.cpp2
-rw-r--r--src/core/stdmsg/src/stdafx.h2
-rw-r--r--src/core/stdmsg/src/tabs.cpp18
6 files changed, 18 insertions, 18 deletions
diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp
index f2763fc919..527e83f5e6 100644
--- a/src/core/stdmsg/src/chat_manager.cpp
+++ b/src/core/stdmsg/src/chat_manager.cpp
@@ -103,7 +103,7 @@ static void OnFlashHighlight(SESSION_INFO *si, int bInactive)
if (!g_Settings.bTabsEnable && si->pDlg && g_Settings.bFlashWindowHighlight)
SetTimer(si->pDlg->GetHwnd(), TIMERID_FLASHWND, 900, nullptr);
if (g_Settings.bTabsEnable && si->pDlg)
- pDialog->SetMessageHighlight(si->pDlg);
+ g_pTabDialog->SetMessageHighlight(si->pDlg);
}
static void OnFlashWindow(SESSION_INFO *si, int bInactive)
@@ -114,7 +114,7 @@ static void OnFlashWindow(SESSION_INFO *si, int bInactive)
if (!g_Settings.bTabsEnable && si->pDlg && g_Settings.bFlashWindow)
SetTimer(si->pDlg->GetHwnd(), TIMERID_FLASHWND, 900, nullptr);
if (g_Settings.bTabsEnable && si->pDlg)
- pDialog->SetTabHighlight(si->pDlg);
+ g_pTabDialog->SetTabHighlight(si->pDlg);
}
static BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce)
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp
index 50b38a63f2..f6644e82df 100644
--- a/src/core/stdmsg/src/chat_window.cpp
+++ b/src/core/stdmsg/src/chat_window.cpp
@@ -288,7 +288,7 @@ void CChatRoomDlg::UpdateOptions()
}
if (g_Settings.bTabsEnable)
- pDialog->FixTabIcons(nullptr);
+ g_pTabDialog->FixTabIcons(nullptr);
SendMessage(m_pOwner->m_hwndStatus, SB_SETICON, 0, (LPARAM)hIcon);
@@ -344,7 +344,7 @@ void CChatRoomDlg::UpdateStatusBar()
SendMessage(m_pOwner->m_hwndStatus, SB_SETICON, 0, (LPARAM)hIcon);
if (g_Settings.bTabsEnable)
- pDialog->FixTabIcons(nullptr);
+ g_pTabDialog->FixTabIcons(nullptr);
SendMessage(m_pOwner->m_hwndStatus, SB_SETTEXT, 0, (LPARAM)ptszDispName);
SendMessage(m_pOwner->m_hwndStatus, SB_SETTEXT, 1, (LPARAM)(m_si->ptszStatusbarText ? m_si->ptszStatusbarText : L""));
@@ -1111,7 +1111,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (g_Settings.bTabsEnable) {
m_si->wState &= ~GC_EVENT_HIGHLIGHT;
m_si->wState &= ~STATE_TALK;
- pDialog->FixTabIcons(nullptr);
+ g_pTabDialog->FixTabIcons(nullptr);
}
break;
}
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index d3e42b2ac1..553156dd6c 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -571,8 +571,8 @@ public:
pci->ReloadSettings();
if (bOldValue != db_get_b(0, CHAT_MODULE, "Tabs", 1)) {
- if (pDialog != nullptr)
- pDialog->Close();
+ if (g_pTabDialog != nullptr)
+ g_pTabDialog->Close();
g_Settings.bTabsEnable = db_get_b(0, CHAT_MODULE, "Tabs", 1) != 0;
}
else Chat_UpdateOptions();
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index a995434bda..eac78a6b84 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -139,7 +139,7 @@ INT_PTR SendMessageCmd(MCONTACT hContact, wchar_t *pwszInitialText)
}
else {
CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
- pDialog->m_tab.ActivatePage(pDialog->m_tab.GetDlgIndex(pDlg));
+ g_pTabDialog->m_tab.ActivatePage(g_pTabDialog->m_tab.GetDlgIndex(pDlg));
}
}
else GetContainer()->AddPage(hContact, pwszInitialText, false);
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h
index 0d4c990b2a..2705dc8261 100644
--- a/src/core/stdmsg/src/stdafx.h
+++ b/src/core/stdmsg/src/stdafx.h
@@ -171,7 +171,7 @@ public:
virtual int Resizer(UTILRESIZECONTROL *urc) override;
};
-extern CTabbedWindow *pDialog;
+extern CTabbedWindow *g_pTabDialog;
void UninitTabs(void);
CTabbedWindow* GetContainer();
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp
index 88961a6931..d2e4357dff 100644
--- a/src/core/stdmsg/src/tabs.cpp
+++ b/src/core/stdmsg/src/tabs.cpp
@@ -41,7 +41,7 @@ void TB_SaveSession(SESSION_INFO *si)
arSavedTabs.insert(new CSavedTab(si->pszModule, si->ptszID));
}
-CTabbedWindow *pDialog = nullptr;
+CTabbedWindow *g_pTabDialog = nullptr;
int g_iMessageIconIndex;
/////////////////////////////////////////////////////////////////////////////////////////
@@ -49,11 +49,11 @@ int g_iMessageIconIndex;
CTabbedWindow* GetContainer()
{
if (g_Settings.bTabsEnable) {
- if (pDialog == nullptr) {
- pDialog = new CTabbedWindow();
- pDialog->Show();
+ if (g_pTabDialog == nullptr) {
+ g_pTabDialog = new CTabbedWindow();
+ g_pTabDialog->Show();
}
- return pDialog;
+ return g_pTabDialog;
}
return new CTabbedWindow();
@@ -114,7 +114,7 @@ void CTabbedWindow::OnDestroy()
Utils_SaveWindowPosition(m_hwnd, g_dat.bSavePerContact ? ((m_pEmbed == nullptr) ? 0 : m_pEmbed->m_hContact) : 0, CHAT_MODULE, "room");
if (m_pEmbed == nullptr)
- pDialog = nullptr;
+ g_pTabDialog = nullptr;
}
int CTabbedWindow::Resizer(UTILRESIZECONTROL *urc)
@@ -661,9 +661,9 @@ INT_PTR CTabbedWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
void UninitTabs()
{
- if (pDialog != nullptr) {
- pDialog->Close();
- pDialog = nullptr;
+ if (g_pTabDialog != nullptr) {
+ g_pTabDialog->Close();
+ g_pTabDialog = nullptr;
}
arSavedTabs.destroy();