diff options
author | George Hazan <ghazan@miranda.im> | 2019-10-05 21:16:50 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-10-05 21:16:50 +0300 |
commit | fc98d12131682de5aa3329283ae519d33e8fd439 (patch) | |
tree | 843b8b0f33c4de3eeaf0c64d788ea15f1afa9436 | |
parent | 4aa51242baf91d470fd8a8cfde32a53e01fa3bb0 (diff) |
fixes #2091 (tabSRMM: added "Use the same splitter height for all sessions")
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgother.cpp | 7 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgoptions.cpp | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 1 |
6 files changed, 8 insertions, 11 deletions
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 9df35769e1..ecd013bad5 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -128,6 +128,7 @@ void CGlobals::reloadSettings(bool fReloadSkins) m_bCutContactNameOnTabs = M.GetBool("cuttitle", false);
m_bStatusOnTabs = M.GetBool("tabstatus", true);
m_bLogStatusChanges = M.GetBool("logstatuschanges", false);
+ m_bUseSameSplitSize = M.GetBool("usesamesplitsize", true);
m_bUseDividers = M.GetBool("usedividers", false);
m_bDividersUsePopupConfig = M.GetBool("div_popupconfig", false);
m_MsgTimeout = g_plugin.getDword(SRMSGSET_MSGTIMEOUT, SRMSGDEFSET_MSGTIMEOUT);
diff --git a/plugins/TabSRMM/src/globals.h b/plugins/TabSRMM/src/globals.h index 579a507603..93856b9e4f 100644 --- a/plugins/TabSRMM/src/globals.h +++ b/plugins/TabSRMM/src/globals.h @@ -89,6 +89,7 @@ public: bool m_bHideOnClose;
bool m_bStatusOnTabs;
bool m_bLogStatusChanges;
+ bool m_bUseSameSplitSize;
bool m_bUseDividers;
bool m_bDividersUsePopupConfig;
bool m_bAllowOfflineMultisend;
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 8100da457e..0005e8ef3b 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -263,7 +263,9 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM GetClientRect(hwnd, &rc);
int selection;
- if (dat->m_bIsAutosizingInput)
+ if (PluginConfig.m_bUseSameSplitSize)
+ selection = ID_SPLITTERCONTEXT_SAVEGLOBALFORALLSESSIONS;
+ else if (dat->m_bIsAutosizingInput)
selection = ID_SPLITTERCONTEXT_SETPOSITIONFORTHISSESSION;
else
selection = TrackPopupMenu(GetSubMenu(PluginConfig.g_hMenuContext, 8), TPM_RETURNCMD, pt.x, pt.y, 0, hwndParent, nullptr);
@@ -410,7 +412,7 @@ bool CMsgDialog::OnInitDialog() m_cache->updateUIN();
m_cache->setWindowData(this);
- m_bIsAutosizingInput = IsAutoSplitEnabled();
+ m_bIsAutosizingInput = (m_pContainer->m_dwFlags & CNT_AUTOSPLITTER) && !(m_dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE);
m_szProto = const_cast<char *>(m_cache->getProto());
m_bIsMeta = m_cache->isMeta();
if (m_bIsMeta)
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp index a21f3f99a0..653f108fec 100644 --- a/plugins/TabSRMM/src/msgdlgother.cpp +++ b/plugins/TabSRMM/src/msgdlgother.cpp @@ -751,13 +751,6 @@ void CMsgDialog::HandlePasteAndSend() } ///////////////////////////////////////////////////////////////////////////////////////// - -bool CMsgDialog::IsAutoSplitEnabled() const -{ - return (m_pContainer->m_dwFlags & CNT_AUTOSPLITTER) && !(m_dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE); -} - -///////////////////////////////////////////////////////////////////////////////////////// // read keyboard state and return the state of the modifier keys void CMsgDialog::KbdState(bool &isShift, bool &isControl, bool &isAlt) diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 2f8418ed32..14e0f156dc 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -178,7 +178,7 @@ class CSkinOptsDlg : public CDlgBase wchar_t tszSkinRoot[MAX_PATH], tszFindMask[MAX_PATH];
wcsncpy_s(tszSkinRoot, M.getSkinPath(), _TRUNCATE);
- SetDlgItemText(m_hwnd, IDC_SKINROOTFOLDER, tszSkinRoot);
+ SetDlgItemTextW(m_hwnd, IDC_SKINROOTFOLDER, tszSkinRoot);
mir_snwprintf(tszFindMask, L"%s*.*", tszSkinRoot);
cmbSkins.ResetContent();
@@ -510,6 +510,7 @@ static TOptionListItem lvItemsMsg[] = { 0, LPGENW("Allow BBCode formatting in outgoing messages"), 0, LOI_TYPE_SETTING, (UINT_PTR)"sendformat", 1 },
{ 0, LPGENW("Automatically split long messages (experimental, use with care)"), 0, LOI_TYPE_SETTING, (UINT_PTR)"autosplit", 2 },
{ 0, LPGENW("Log status changes"), 0, LOI_TYPE_SETTING, (UINT_PTR)"logstatuschanges", 2 },
+ { 0, LPGENW("Use the same splitter height for all sessions"), 1, LOI_TYPE_SETTING, (UINT_PTR)"usesamesplitsize", 2 },
{ 0, LPGENW("Automatically copy selected text"), 1, LOI_TYPE_SETTING, (UINT_PTR)"autocopy", 2 },
{ 0, nullptr, 0, 0, 0, 0 }
};
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 029307088c..f3c2323869 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -335,7 +335,6 @@ class CMsgDialog : public CSrmmBaseDialog HICON GetXStatusIcon() const;
void HandlePasteAndSend(void);
void Init(void);
- bool IsAutoSplitEnabled(void) const;
void LoadContactAvatar(void);
void LoadOwnAvatar(void);
void LoadSplitter(void);
|