summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src/history_dlg.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-09-12 20:19:33 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-09-12 20:19:33 +0300
commit9dedc6fb280a58f83d7939ab0b85c00ea0d726f1 (patch)
tree28d685292ca15ae9d0aeb3594e0244b9d019fdb5 /plugins/NewStory/src/history_dlg.cpp
parent8cb9d3fd6d002d034f88b87a67bd76c4976d0271 (diff)
code cleaning
Diffstat (limited to 'plugins/NewStory/src/history_dlg.cpp')
-rw-r--r--plugins/NewStory/src/history_dlg.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/NewStory/src/history_dlg.cpp b/plugins/NewStory/src/history_dlg.cpp
index 0de4d1f494..27ab1c9f72 100644
--- a/plugins/NewStory/src/history_dlg.cpp
+++ b/plugins/NewStory/src/history_dlg.cpp
@@ -265,7 +265,7 @@ class CHistoryDlg : public CDlgBase
break;
default:
- SetWindowText(m_hwnd, ptrW(TplFormatString(TPL_TITLE, m_hContact, 0)));
+ SetWindowText(m_hwnd, TplFormatString(TPL_TITLE, m_hContact, 0));
}
}
@@ -356,11 +356,17 @@ public:
btnFindPrev(this, IDC_FINDPREV, g_plugin.getIcon(IDI_FINDPREV), LPGEN("Find previous")),
btnTimeTree(this, IDC_TIMETREE, g_plugin.getIcon(IDI_TIMETREE), LPGEN("Conversations"))
{
- if (m_hContact > 0) {
+ showFlags = g_plugin.getWord("showFlags", 0x7f);
+ m_dwOptions = g_plugin.getDword("dwOptions");
+
+ if (m_hContact == INVALID_CONTACT_ID)
+ m_dwOptions |= WND_OPT_SEARCHBAR;
+ else if (m_hContact > 0) {
m_toolbar.push_back(Button(btnUserMenu));
m_toolbar.push_back(Button(btnUserInfo));
m_toolbar.push_back(Button(btnSendMsg, Button::SPACED));
}
+
m_toolbar.push_back(Button(btnTimeTree));
m_toolbar.push_back(Button(btnSearch));
m_toolbar.push_back(Button(btnFilter));
@@ -389,9 +395,6 @@ public:
btnUserMenu.OnClick = Callback(this, &CHistoryDlg::onClick_UserMenu);
btnTimeTree.OnClick = Callback(this, &CHistoryDlg::onClick_TimeTree);
- showFlags = g_plugin.getWord(0, "showFlags", 0x7f);
- m_dwOptions = g_plugin.getDword(0, "dwOptions");
-
m_hMenu = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_POPUPS));
TranslateMenu(m_hMenu);
@@ -503,10 +506,7 @@ public:
TimeTreeBuild();
SetFocus(m_histWindow.GetHwnd());
}
- else {
- Utils_RestoreWindowPosition(m_hwnd, 0, MODULENAME, "glb_");
- m_dwOptions |= WND_OPT_SEARCHBAR;
- }
+ else Utils_RestoreWindowPosition(m_hwnd, 0, MODULENAME, "glb_");
m_histCtrl->SetContact(m_hContact);
m_histCtrl->ScrollBottom();