diff options
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/res/resource.rc | 6 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_manager.cpp | 1 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_window.cpp | 3 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgoptions.cpp | 8 | ||||
-rw-r--r-- | src/core/stdmsg/src/resource.h | 1 | ||||
-rw-r--r-- | src/core/stdmsg/src/stdafx.h | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/tabs.cpp | 31 |
8 files changed, 10 insertions, 48 deletions
diff --git a/src/core/stdmsg/res/resource.rc b/src/core/stdmsg/res/resource.rc index 4e1be5d546..aebd57bef9 100644 --- a/src/core/stdmsg/res/resource.rc +++ b/src/core/stdmsg/res/resource.rc @@ -127,9 +127,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN
CONTROL "Use a tabbed interface",IDC_USETABS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,11,263,13
CONTROL "Close tab on double click",IDC_CLOSETABS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,26,246,10
- CONTROL "Restore previously open tabs when showing the window",IDC_RESTORETABS,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,39,250,10
- CONTROL "Show tabs at the bottom",IDC_TABSBOTTOM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,52,233,10
+ CONTROL "Show tabs at the bottom",IDC_TABSBOTTOM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,39,250,10
END
IDD_OPT_MSGTYPE DIALOGEX 0, 0, 283, 234
@@ -167,7 +165,7 @@ IDD_CONTAINER DIALOGEX 0, 0, 275, 200 STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- CONTROL "Tab1",IDC_TAB,"SysTabControl32",TCS_MULTILINE,0,0,275,200
+ CONTROL "Tab1",IDC_TAB,"SysTabControl32",TCS_MULTILINE | TCS_FOCUSNEVER | WS_CLIPSIBLINGS,0,0,275,200
END
IDD_FILTER DIALOGEX 0, 0, 83, 125
diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp index b4b8c880c3..288c306ec3 100644 --- a/src/core/stdmsg/src/chat_manager.cpp +++ b/src/core/stdmsg/src/chat_manager.cpp @@ -137,7 +137,6 @@ static void OnLoadSettings() g_Settings.iY = db_get_dw(0, CHAT_MODULE, "roomy", -1); g_Settings.bTabsEnable = db_get_b(0, CHAT_MODULE, "Tabs", 1) != 0; - g_Settings.bTabRestore = db_get_b(0, CHAT_MODULE, "TabRestore", 0) != 0; g_Settings.bTabsAtBottom = db_get_b(0, CHAT_MODULE, "TabBottom", 0) != 0; g_Settings.bTabCloseOnDblClick = db_get_b(0, CHAT_MODULE, "TabCloseOnDblClick", 0) != 0; diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp index 99c2e2fd1e..5df7a4fb4f 100644 --- a/src/core/stdmsg/src/chat_window.cpp +++ b/src/core/stdmsg/src/chat_window.cpp @@ -1152,7 +1152,8 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) break; case DM_UPDATETITLE: - UpdateTitle(); + if (lParam == 0 || lParam == m_hContact) + UpdateTitle(); break; case DM_CLOSETAB: diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 572ae73bec..90029de1c6 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -1196,8 +1196,10 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_TIMER:
if (wParam == TIMERID_FLASHWND) {
- if (m_nFlash > 2 * g_dat.nFlashMax)
+ if (m_nFlash > 2 * g_dat.nFlashMax) {
StopFlash();
+ return 0;
+ }
}
else if (wParam == TIMERID_TYPE) {
ShowTime(false);
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index 917de61ce3..34ccdf45dc 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -527,15 +527,14 @@ public: class COptionsTabDlg : public CDlgBase
{
- CCtrlCheck m_chkTabs, m_chkTabsBottom, m_chkTabsClose, m_chkTabsRestore;
+ CCtrlCheck m_chkTabs, m_chkTabsBottom, m_chkTabsClose;
public:
COptionsTabDlg() :
CDlgBase(g_hInst, IDD_OPT_TABS),
m_chkTabs(this, IDC_USETABS),
m_chkTabsBottom(this, IDC_TABSBOTTOM),
- m_chkTabsClose(this, IDC_CLOSETABS),
- m_chkTabsRestore(this, IDC_RESTORETABS)
+ m_chkTabsClose(this, IDC_CLOSETABS)
{
m_chkTabs.OnChange = Callback(this, &COptionsTabDlg::onChange_Tabs);
}
@@ -545,7 +544,6 @@ public: m_chkTabs.SetState(g_Settings.bTabsEnable);
m_chkTabsBottom.SetState(g_Settings.bTabsAtBottom);
m_chkTabsClose.SetState(g_Settings.bTabCloseOnDblClick);
- m_chkTabsRestore.SetState(g_Settings.bTabRestore);
onChange_Tabs(&m_chkTabs);
}
@@ -556,7 +554,6 @@ public: db_set_b(0, CHAT_MODULE, "Tabs", m_chkTabs.GetState());
db_set_b(0, CHAT_MODULE, "TabBottom", m_chkTabsBottom.GetState());
db_set_b(0, CHAT_MODULE, "TabCloseOnDblClick", m_chkTabsClose.GetState());
- db_set_b(0, CHAT_MODULE, "TabRestore", m_chkTabsRestore.GetState());
pci->ReloadSettings();
@@ -573,7 +570,6 @@ public: bool bEnabled = pCheck->GetState() != 0;
m_chkTabsBottom.Enable(bEnabled);
m_chkTabsClose.Enable(bEnabled);
- m_chkTabsRestore.Enable(bEnabled);
}
};
diff --git a/src/core/stdmsg/src/resource.h b/src/core/stdmsg/src/resource.h index affe1f1b02..2464723183 100644 --- a/src/core/stdmsg/src/resource.h +++ b/src/core/stdmsg/src/resource.h @@ -155,7 +155,6 @@ #define IDC_POPLIST 1616
#define IDC_USETABS 1620
#define IDC_CLOSETABS 1621
-#define IDC_RESTORETABS 1622
#define IDC_TABSBOTTOM 1623
#define IDM_CUT 40000
#define IDM_COPY 40001
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index 00b1304b57..3baa9a50a5 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -101,7 +101,7 @@ struct GlobalLogSettings : public GlobalLogSettingsBase {
int iX, iY;
int iSplitterX, iSplitterY;
- bool bTabsEnable, bTabsAtBottom, bTabCloseOnDblClick, bTabRestore;
+ bool bTabsEnable, bTabsAtBottom, bTabCloseOnDblClick;
HFONT MessageAreaFont;
COLORREF MessageAreaColor;
@@ -181,6 +181,4 @@ extern CTabbedWindow *g_pTabDialog; void UninitTabs(void);
CTabbedWindow* GetContainer();
-void TB_SaveSession(SESSION_INFO *si);
-
#pragma comment(lib,"comctl32.lib")
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp index 67544cb86f..06b77e6c0d 100644 --- a/src/core/stdmsg/src/tabs.cpp +++ b/src/core/stdmsg/src/tabs.cpp @@ -22,25 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" #include "statusicon.h" -struct CSavedTab -{ - CSavedTab(const char *szModule, const wchar_t *wszId) : - m_szModule(mir_strdup(szModule)), - m_id(mir_wstrdup(wszId)) - {} - - ptrW m_id; - ptrA m_szModule; -}; - -static OBJLIST<CSavedTab> arSavedTabs(1); - -void TB_SaveSession(SESSION_INFO *si) -{ - if (si) - arSavedTabs.insert(new CSavedTab(si->pszModule, si->ptszID)); -} - CTabbedWindow *g_pTabDialog = nullptr; ///////////////////////////////////////////////////////////////////////////////////////// @@ -187,16 +168,6 @@ void CTabbedWindow::OnInitDialog() TabCtrl_SetMinTabWidth(m_tab.GetHwnd(), 80); TabCtrl_SetImageList(m_tab.GetHwnd(), Clist_GetImageList()); - - // restore previous tabs - if (g_Settings.bTabRestore) { - for (auto &p : arSavedTabs) { - SESSION_INFO *si = pci->SM_FindSession(p->m_id, p->m_szModule); - if (si) - AddPage(si); - } - arSavedTabs.destroy(); - } } void CTabbedWindow::OnDestroy() @@ -694,6 +665,4 @@ void UninitTabs() g_pTabDialog->Close(); g_pTabDialog = nullptr; } - - arSavedTabs.destroy(); } |