summaryrefslogtreecommitdiff
path: root/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-12 23:09:05 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-12 23:09:05 +0300
commit048b9e053a99a228b6040463db58fe0b492879ff (patch)
tree05f490ea6df47b3c5324a69b0f3ec75b4cd56f47 /plugins/HistoryLinkListPlus/src/linklist_fct.cpp
parente756b7df80eb39edfbec3ae436d324d1fd0e93a6 (diff)
LinkList -> g_plugin
Diffstat (limited to 'plugins/HistoryLinkListPlus/src/linklist_fct.cpp')
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_fct.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
index 56cafca663..75b00ae4e8 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
@@ -811,77 +811,77 @@ void GetListInfo(BYTE params, LISTELEMENT *listStart, LPCTSTR searchString, size
void GetListOptions(LISTOPTIONS *options)
{
- options->openNewWindow = db_get_b(0, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, 0xFF);
+ options->openNewWindow = g_plugin.getByte(LINKLIST_OPEN_WINDOW, 0xFF);
if (options->openNewWindow == 0xFF)
{
// No DB entry for this Plugin
- db_set_b(0, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, 0x00);
+ g_plugin.setByte(LINKLIST_OPEN_WINDOW, 0x00);
options->openNewWindow = 0x00;
}
- options->updateWindow = db_get_b(0, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0xFF);
+ options->updateWindow = g_plugin.getByte(LINKLIST_UPDATE_WINDOW, 0xFF);
if (options->updateWindow == 0xFF)
{
// No DB entry for this Plugin
- db_set_b(0, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0x00);
+ g_plugin.setByte(LINKLIST_UPDATE_WINDOW, 0x00);
options->updateWindow = 0x00;
}
- options->mouseEvent = db_get_b(0, LINKLIST_MODULE, LINKLIST_MOUSE_EVENT, 0xFF);
+ options->mouseEvent = g_plugin.getByte(LINKLIST_MOUSE_EVENT, 0xFF);
if (options->mouseEvent == 0xFF)
{
// No DB entry for this Plugin
- db_set_b(0, LINKLIST_MODULE, LINKLIST_MOUSE_EVENT, 0x00);
+ g_plugin.setByte(LINKLIST_MOUSE_EVENT, 0x00);
options->mouseEvent = 0x00;
}
- options->saveSpecial = db_get_b(0, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, 0xFF);
+ options->saveSpecial = g_plugin.getByte(LINKLIST_SAVESPECIAL, 0xFF);
if (options->saveSpecial == 0xFF)
{
// No DB entry for this Plugin
- db_set_b(0, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, 0x00);
+ g_plugin.setByte(LINKLIST_SAVESPECIAL, 0x00);
options->saveSpecial = 0x00;
}
- options->showDate = db_get_b(0, LINKLIST_MODULE, LINKLIST_SHOW_DATE, 0xFF);
+ options->showDate = g_plugin.getByte(LINKLIST_SHOW_DATE, 0xFF);
if (options->showDate == 0xFF)
{
// No DB entry for this Plugin
- db_set_b(0, LINKLIST_MODULE, LINKLIST_SHOW_DATE, 0x01);
+ g_plugin.setByte(LINKLIST_SHOW_DATE, 0x01);
options->showDate = 0x01;
}
- options->showLine = db_get_b(0, LINKLIST_MODULE, LINKLIST_SHOW_LINE, 0xFF);
+ options->showLine = g_plugin.getByte(LINKLIST_SHOW_LINE, 0xFF);
if (options->showLine == 0xFF)
{
// No DB entry for this Plugin
- db_set_b(0, LINKLIST_MODULE, LINKLIST_SHOW_LINE, 0x01);
+ g_plugin.setByte(LINKLIST_SHOW_LINE, 0x01);
options->showLine = 0x01;
}
- options->showTime = db_get_b(0, LINKLIST_MODULE, LINKLIST_SHOW_TIME, 0xFF);
+ options->showTime = g_plugin.getByte(LINKLIST_SHOW_TIME, 0xFF);
if (options->showTime == 0xFF)
{
// No DB entry for this Plugin
- db_set_b(0, LINKLIST_MODULE, LINKLIST_SHOW_TIME, 0x01);
+ g_plugin.setByte(LINKLIST_SHOW_TIME, 0x01);
options->showTime = 0x01;
}
- options->showDirection = db_get_b(0, LINKLIST_MODULE, LINKLIST_SHOW_DIRECTION, 0xFF);
+ options->showDirection = g_plugin.getByte(LINKLIST_SHOW_DIRECTION, 0xFF);
if (options->showDirection == 0xFF)
{
// No DB entry for this Plugin
- db_set_b(0, LINKLIST_MODULE, LINKLIST_SHOW_DIRECTION, 0x01);
+ g_plugin.setByte(LINKLIST_SHOW_DIRECTION, 0x01);
options->showDirection = 0x01;
}
- options->showType = db_get_b(0, LINKLIST_MODULE, LINKLIST_SHOW_TYPE, 0xFF);
+ options->showType = g_plugin.getByte(LINKLIST_SHOW_TYPE, 0xFF);
if (options->showType == 0xFF)
{
// No DB entry for this Plugin
- db_set_b(0, LINKLIST_MODULE, LINKLIST_SHOW_TYPE, 0x01);
+ g_plugin.setByte(LINKLIST_SHOW_TYPE, 0x01);
options->showType = 0x01;
}
@@ -890,15 +890,15 @@ void GetListOptions(LISTOPTIONS *options)
void SetListOptions(LISTOPTIONS *options)
{
- db_set_b(0, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, options->openNewWindow);
- db_set_b(0, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, options->updateWindow);
- db_set_b(0, LINKLIST_MODULE, LINKLIST_MOUSE_EVENT, options->mouseEvent);
- db_set_b(0, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, options->saveSpecial);
- db_set_b(0, LINKLIST_MODULE, LINKLIST_SHOW_DATE, options->showDate);
- db_set_b(0, LINKLIST_MODULE, LINKLIST_SHOW_LINE, options->showLine);
- db_set_b(0, LINKLIST_MODULE, LINKLIST_SHOW_TIME, options->showTime);
- db_set_b(0, LINKLIST_MODULE, LINKLIST_SHOW_DIRECTION, options->showDirection);
- db_set_b(0, LINKLIST_MODULE, LINKLIST_SHOW_TYPE, options->showType);
+ g_plugin.setByte(LINKLIST_OPEN_WINDOW, options->openNewWindow);
+ g_plugin.setByte(LINKLIST_UPDATE_WINDOW, options->updateWindow);
+ g_plugin.setByte(LINKLIST_MOUSE_EVENT, options->mouseEvent);
+ g_plugin.setByte(LINKLIST_SAVESPECIAL, options->saveSpecial);
+ g_plugin.setByte(LINKLIST_SHOW_DATE, options->showDate);
+ g_plugin.setByte(LINKLIST_SHOW_LINE, options->showLine);
+ g_plugin.setByte(LINKLIST_SHOW_TIME, options->showTime);
+ g_plugin.setByte(LINKLIST_SHOW_DIRECTION, options->showDirection);
+ g_plugin.setByte(LINKLIST_SHOW_TYPE, options->showType);
}
/*
@@ -946,11 +946,11 @@ void GetColour(MYCOLOURSET *colourSet)
DWORD colour;
BYTE useDefault;
- useDefault = db_get_b(0, LINKLIST_MODULE, LINKLIST_USE_DEF, 0xFF);
+ useDefault = g_plugin.getByte(LINKLIST_USE_DEF, 0xFF);
if (useDefault == 0xFF)
{
// No DB entry for this Plugin
- db_set_b(0, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x01);
+ g_plugin.setByte(LINKLIST_USE_DEF, 0x01);
useDefault = 0x01;
}
@@ -969,7 +969,7 @@ void GetColour(MYCOLOURSET *colourSet)
colourSet->incoming = colour;
else
{
- db_set_b(0, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x00);
+ g_plugin.setByte(LINKLIST_USE_DEF, 0x00);
useDefault = 0x00;
}
}
@@ -986,7 +986,7 @@ void GetColour(MYCOLOURSET *colourSet)
colourSet->outgoing = colour;
else
{
- db_set_b(0, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x00);
+ g_plugin.setByte(LINKLIST_USE_DEF, 0x00);
useDefault = 0x00;
}
}
@@ -1003,7 +1003,7 @@ void GetColour(MYCOLOURSET *colourSet)
colourSet->background = colour;
else
{
- db_set_b(0, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x00);
+ g_plugin.setByte(LINKLIST_USE_DEF, 0x00);
useDefault = 0x00;
}
}
@@ -1053,7 +1053,7 @@ void GetDBColour(MYCOLOURSET *colourSet)
colourSet->incoming = colour;
else
{
- db_set_dw(0, LINKLIST_MODULE, LINKLIST_IN_COL, IN_COL_DEF);
+ g_plugin.setDword(LINKLIST_IN_COL, IN_COL_DEF);
colourSet->incoming = IN_COL_DEF;
}
@@ -1062,7 +1062,7 @@ void GetDBColour(MYCOLOURSET *colourSet)
colourSet->outgoing = colour;
else
{
- db_set_dw(0, LINKLIST_MODULE, LINKLIST_OUT_COL, OUT_COL_DEF);
+ g_plugin.setDword(LINKLIST_OUT_COL, OUT_COL_DEF);
colourSet->outgoing = OUT_COL_DEF;
}
@@ -1071,7 +1071,7 @@ void GetDBColour(MYCOLOURSET *colourSet)
colourSet->background = colour;
else
{
- db_set_dw(0, LINKLIST_MODULE, LINKLIST_BG_COL, BG_COL_DEF);
+ g_plugin.setDword(LINKLIST_BG_COL, BG_COL_DEF);
colourSet->background = BG_COL_DEF;
}
@@ -1080,7 +1080,7 @@ void GetDBColour(MYCOLOURSET *colourSet)
colourSet->text = colour;
else
{
- db_set_dw(0, LINKLIST_MODULE, LINKLIST_TXT_COL, TXT_COL_DEF);
+ g_plugin.setDword(LINKLIST_TXT_COL, TXT_COL_DEF);
colourSet->text = TXT_COL_DEF;
}
}
@@ -1141,21 +1141,21 @@ Write user defined colours to the database
*/
void SetDBColour(MYCOLOURSET *colourSet)
{
- db_set_dw(0, LINKLIST_MODULE, LINKLIST_IN_COL, colourSet->incoming);
- db_set_dw(0, LINKLIST_MODULE, LINKLIST_OUT_COL, colourSet->outgoing);
- db_set_dw(0, LINKLIST_MODULE, LINKLIST_BG_COL, colourSet->background);
- db_set_dw(0, LINKLIST_MODULE, LINKLIST_TXT_COL, colourSet->text);
+ g_plugin.setDword(LINKLIST_IN_COL, colourSet->incoming);
+ g_plugin.setDword(LINKLIST_OUT_COL, colourSet->outgoing);
+ g_plugin.setDword(LINKLIST_BG_COL, colourSet->background);
+ g_plugin.setDword(LINKLIST_TXT_COL, colourSet->text);
}
BYTE GetUpdateSetting(void)
{
BYTE updateWindow;
- updateWindow = db_get_b(0, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0xFF);
+ updateWindow = g_plugin.getByte(LINKLIST_UPDATE_WINDOW, 0xFF);
if (updateWindow == 0xFF)
{
// No DB entry for this Plugin
- db_set_b(0, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0x00);
+ g_plugin.setByte(LINKLIST_UPDATE_WINDOW, 0x00);
return 0;
}
if (updateWindow == 0x00)