summaryrefslogtreecommitdiff
path: root/plugins/BasicHistory/src/HistoryWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/BasicHistory/src/HistoryWindow.cpp')
-rw-r--r--plugins/BasicHistory/src/HistoryWindow.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp
index ebac3bd0c5..17c78befc3 100644
--- a/plugins/BasicHistory/src/HistoryWindow.cpp
+++ b/plugins/BasicHistory/src/HistoryWindow.cpp
@@ -1608,14 +1608,14 @@ void HistoryWindow::RestorePos()
contactToLoad = NULL;
}
- if (db_get_b(contactToLoad, MODULENAME, "history_ismax", 0))
+ if (g_plugin.getByte(contactToLoad, "history_ismax"))
ShowWindow(m_hWnd, SW_SHOWMAXIMIZED);
- LONG pos = db_get_dw(contactToLoad, MODULENAME, "history_splitterv", 0);
+ LONG pos = g_plugin.getDword(contactToLoad, "history_splitterv");
if (pos > 0)
SplitterMoved(splitterYhWnd, pos, false);
- pos = db_get_dw(contactToLoad, MODULENAME, "history_splitter", 0);
+ pos = g_plugin.getDword(contactToLoad, "history_splitter");
if (pos > 0)
SplitterMoved(splitterXhWnd, pos, false);
}
@@ -1625,13 +1625,13 @@ void HistoryWindow::SavePos(bool all)
MCONTACT contactToSave = m_hContact;
if (all) {
for (auto &_hContact : Contacts()) {
- db_unset(_hContact, MODULENAME, "history_x");
- db_unset(_hContact, MODULENAME, "history_y");
- db_unset(_hContact, MODULENAME, "history_width");
- db_unset(_hContact, MODULENAME, "history_height");
- db_unset(_hContact, MODULENAME, "history_ismax");
- db_unset(_hContact, MODULENAME, "history_splitterv");
- db_unset(_hContact, MODULENAME, "history_splitter");
+ g_plugin.delSetting(_hContact, "history_x");
+ g_plugin.delSetting(_hContact, "history_y");
+ g_plugin.delSetting(_hContact, "history_width");
+ g_plugin.delSetting(_hContact, "history_height");
+ g_plugin.delSetting(_hContact, "history_ismax");
+ g_plugin.delSetting(_hContact, "history_splitterv");
+ g_plugin.delSetting(_hContact, "history_splitter");
}
contactToSave = NULL;
@@ -1641,9 +1641,9 @@ void HistoryWindow::SavePos(bool all)
WINDOWPLACEMENT wp;
wp.length = sizeof(wp);
GetWindowPlacement(m_hWnd, &wp);
- db_set_b(contactToSave, MODULENAME, "history_ismax", wp.showCmd == SW_MAXIMIZE ? 1 : 0);
- db_set_dw(contactToSave, MODULENAME, "history_splitterv", splitterX);
- db_set_dw(contactToSave, MODULENAME, "history_splitter", splitterY);
+ g_plugin.setByte(contactToSave, "history_ismax", wp.showCmd == SW_MAXIMIZE ? 1 : 0);
+ g_plugin.setDword(contactToSave, "history_splitterv", splitterX);
+ g_plugin.setDword(contactToSave, "history_splitter", splitterY);
}
#define DEF_FILTERS_START 50000