diff options
Diffstat (limited to 'plugins/HistoryLinkListPlus/src/linklist_fct.cpp')
-rw-r--r-- | plugins/HistoryLinkListPlus/src/linklist_fct.cpp | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp index bc5c5abe61..3e12ced1ef 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp @@ -842,77 +842,77 @@ void GetListInfo(BYTE params, LISTELEMENT *listStart, LPCTSTR searchString, siz void GetListOptions(LISTOPTIONS *options)
{
- options->openNewWindow = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, 0xFF);
+ options->openNewWindow = db_get_b(NULL, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, 0xFF);
if(options->openNewWindow == 0xFF)
{
// No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, 0x00);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, 0x00);
options->openNewWindow = 0x00;
}
- options->updateWindow = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0xFF);
+ options->updateWindow = db_get_b(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0xFF);
if(options->updateWindow == 0xFF)
{
// No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0x00);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0x00);
options->updateWindow = 0x00;
}
- options->mouseEvent = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_MOUSE_EVENT, 0xFF);
+ options->mouseEvent = db_get_b(NULL, LINKLIST_MODULE, LINKLIST_MOUSE_EVENT, 0xFF);
if(options->mouseEvent == 0xFF)
{
// No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_MOUSE_EVENT, 0x00);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_MOUSE_EVENT, 0x00);
options->mouseEvent = 0x00;
}
- options->saveSpecial = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, 0xFF);
+ options->saveSpecial = db_get_b(NULL, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, 0xFF);
if(options->saveSpecial == 0xFF)
{
// No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, 0x00);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, 0x00);
options->saveSpecial = 0x00;
}
- options->showDate = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DATE, 0xFF);
+ options->showDate = db_get_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DATE, 0xFF);
if(options->showDate == 0xFF)
{
// No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DATE, 0x01);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DATE, 0x01);
options->showDate = 0x01;
}
- options->showLine = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_LINE, 0xFF);
+ options->showLine = db_get_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_LINE, 0xFF);
if(options->showLine == 0xFF)
{
// No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_LINE, 0x01);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_LINE, 0x01);
options->showLine = 0x01;
}
- options->showTime = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TIME, 0xFF);
+ options->showTime = db_get_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TIME, 0xFF);
if(options->showTime == 0xFF)
{
// No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TIME, 0x01);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TIME, 0x01);
options->showTime = 0x01;
}
- options->showDirection = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DIRECTION, 0xFF);
+ options->showDirection = db_get_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DIRECTION, 0xFF);
if(options->showDirection == 0xFF)
{
// No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DIRECTION, 0x01);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DIRECTION, 0x01);
options->showDirection = 0x01;
}
- options->showType = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TYPE, 0xFF);
+ options->showType = db_get_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TYPE, 0xFF);
if(options->showType == 0xFF)
{
// No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TYPE, 0x01);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TYPE, 0x01);
options->showType = 0x01;
}
@@ -921,15 +921,15 @@ void GetListOptions(LISTOPTIONS *options) void SetListOptions(LISTOPTIONS *options)
{
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, options->openNewWindow);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, options->updateWindow);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_MOUSE_EVENT, options->mouseEvent);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, options->saveSpecial);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DATE, options->showDate);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_LINE, options->showLine);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TIME, options->showTime);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DIRECTION, options->showDirection);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TYPE, options->showType);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, options->openNewWindow);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, options->updateWindow);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_MOUSE_EVENT, options->mouseEvent);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, options->saveSpecial);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DATE, options->showDate);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_LINE, options->showLine);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TIME, options->showTime);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DIRECTION, options->showDirection);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TYPE, options->showType);
}
/*
@@ -977,11 +977,11 @@ void GetColour(MYCOLOURSET *colourSet) DWORD colour;
BYTE useDefault;
- useDefault = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0xFF);
+ useDefault = db_get_b(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0xFF);
if ( useDefault == 0xFF )
{
// No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x01);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x01);
useDefault = 0x01;
}
@@ -990,51 +990,51 @@ void GetColour(MYCOLOURSET *colourSet) // Use Miranda-IM Default colours
// CHANGED AT MIRANDA 0.4!!!!
// Use SRMM... if it is not there try SRMsg (older Miranda Versions)
- colour = DBGetContactSettingDword(NULL, "SRMM", "SRMFont1Col", 0xFF000000);
+ colour = db_get_dw(NULL, "SRMM", "SRMFont1Col", 0xFF000000);
if ( colour != 0xFF000000 )
colourSet->incoming = colour;
else
{
- colour = DBGetContactSettingDword(NULL, "SRMsg", "Font3Col", 0xFF000000);
+ colour = db_get_dw(NULL, "SRMsg", "Font3Col", 0xFF000000);
if ( colour != 0xFF000000 )
colourSet->incoming = colour;
else
{
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x00);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x00);
useDefault = 0x00;
}
}
// SRMM
- colour = DBGetContactSettingDword(NULL, "SRMM", "SRMFont0Col", 0xFF000000);
+ colour = db_get_dw(NULL, "SRMM", "SRMFont0Col", 0xFF000000);
if ( colour != 0xFF000000 )
colourSet->outgoing = colour;
else
{
// SRMsg
- colour = DBGetContactSettingDword(NULL, "SRMsg", "Font0Col", 0xFF000000);
+ colour = db_get_dw(NULL, "SRMsg", "Font0Col", 0xFF000000);
if ( colour != 0xFF000000 )
colourSet->outgoing = colour;
else
{
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x00);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x00);
useDefault = 0x00;
}
}
// SRMM
- colour = DBGetContactSettingDword(NULL, "SRMM", "BkgColour", 0xFF000000);
+ colour = db_get_dw(NULL, "SRMM", "BkgColour", 0xFF000000);
if ( colour != 0xFF000000 )
colourSet->background = colour;
else
{
// SRMsg
- colour = DBGetContactSettingDword(NULL, "SRMsg", "BkgColour", 0xFF000000);
+ colour = db_get_dw(NULL, "SRMsg", "BkgColour", 0xFF000000);
if ( colour != 0xFF000000 )
colourSet->background = colour;
else
{
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x00);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x00);
useDefault = 0x00;
}
}
@@ -1044,25 +1044,25 @@ void GetColour(MYCOLOURSET *colourSet) if ( useDefault == 0x00 )
{
// Use Plugin user defined or default colours
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_IN_COL, 0xFF000000);
+ colour = db_get_dw(NULL, LINKLIST_MODULE, LINKLIST_IN_COL, 0xFF000000);
if ( colour != 0xFF000000 )
colourSet->incoming = colour;
else
colourSet->incoming = IN_COL_DEF;
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_OUT_COL, 0xFF000000);
+ colour = db_get_dw(NULL, LINKLIST_MODULE, LINKLIST_OUT_COL, 0xFF000000);
if ( colour != 0xFF000000 )
colourSet->outgoing = colour;
else
colourSet->outgoing = OUT_COL_DEF;
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_BG_COL, 0xFF000000);
+ colour = db_get_dw(NULL, LINKLIST_MODULE, LINKLIST_BG_COL, 0xFF000000);
if ( colour != 0xFF000000 )
colourSet->background = colour;
else
colourSet->background = BG_COL_DEF;
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_TXT_COL, 0xFF000000);
+ colour = db_get_dw(NULL, LINKLIST_MODULE, LINKLIST_TXT_COL, 0xFF000000);
if ( colour != 0xFF000000 )
colourSet->text = colour;
else
@@ -1079,39 +1079,39 @@ void GetDBColour(MYCOLOURSET *colourSet) DWORD colour;
// Use Plugin user defined or default colours
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_IN_COL, 0xFF000000);
+ colour = db_get_dw(NULL, LINKLIST_MODULE, LINKLIST_IN_COL, 0xFF000000);
if(colour != 0xFF000000)
colourSet->incoming = colour;
else
{
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_IN_COL, IN_COL_DEF);
+ db_set_dw(NULL, LINKLIST_MODULE, LINKLIST_IN_COL, IN_COL_DEF);
colourSet->incoming = IN_COL_DEF;
}
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_OUT_COL, 0xFF000000);
+ colour = db_get_dw(NULL, LINKLIST_MODULE, LINKLIST_OUT_COL, 0xFF000000);
if(colour != 0xFF000000)
colourSet->outgoing = colour;
else
{
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_OUT_COL, OUT_COL_DEF);
+ db_set_dw(NULL, LINKLIST_MODULE, LINKLIST_OUT_COL, OUT_COL_DEF);
colourSet->outgoing = OUT_COL_DEF;
}
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_BG_COL, 0xFF000000);
+ colour = db_get_dw(NULL, LINKLIST_MODULE, LINKLIST_BG_COL, 0xFF000000);
if(colour != 0xFF000000)
colourSet->background = colour;
else
{
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_BG_COL, BG_COL_DEF);
+ db_set_dw(NULL, LINKLIST_MODULE, LINKLIST_BG_COL, BG_COL_DEF);
colourSet->background = BG_COL_DEF;
}
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_TXT_COL, 0xFF000000);
+ colour = db_get_dw(NULL, LINKLIST_MODULE, LINKLIST_TXT_COL, 0xFF000000);
if(colour != 0xFF000000)
colourSet->text = colour;
else
{
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_TXT_COL, TXT_COL_DEF);
+ db_set_dw(NULL, LINKLIST_MODULE, LINKLIST_TXT_COL, TXT_COL_DEF);
colourSet->text = TXT_COL_DEF;
}
}
@@ -1125,12 +1125,12 @@ int GetMirandaColour(MYCOLOURSET *colourSet) // Use Miranda-IM Default colours
// Try SRMM (Miranda 0.4) .... or SRMsg... for older versions
- colour = DBGetContactSettingDword(NULL, "SRMM", "SRMFont1Col", 0xFF000000);
+ colour = db_get_dw(NULL, "SRMM", "SRMFont1Col", 0xFF000000);
if(colour != 0xFF000000)
colourSet->incoming = colour;
else
{
- colour = DBGetContactSettingDword(NULL, "SRMsg", "Font3Col", 0xFF000000);
+ colour = db_get_dw(NULL, "SRMsg", "Font3Col", 0xFF000000);
if(colour != 0xFF000000)
colourSet->incoming = colour;
else
@@ -1138,24 +1138,24 @@ int GetMirandaColour(MYCOLOURSET *colourSet) }
- colour = DBGetContactSettingDword(NULL, "SRMM", "SRMFont0Col", 0xFF000000);
+ colour = db_get_dw(NULL, "SRMM", "SRMFont0Col", 0xFF000000);
if(colour != 0xFF000000)
colourSet->outgoing = colour;
else
{
- colour = DBGetContactSettingDword(NULL, "SRMsg", "Font0Col", 0xFF000000);
+ colour = db_get_dw(NULL, "SRMsg", "Font0Col", 0xFF000000);
if(colour != 0xFF000000)
colourSet->outgoing = colour;
else
return 1;
}
- colour = DBGetContactSettingDword(NULL, "SRMM", "BkgColour", 0xFF000000);
+ colour = db_get_dw(NULL, "SRMM", "BkgColour", 0xFF000000);
if(colour != 0xFF000000)
colourSet->background = colour;
else
{
- colour = DBGetContactSettingDword(NULL, "SRMsg", "BkgColour", 0xFF000000);
+ colour = db_get_dw(NULL, "SRMsg", "BkgColour", 0xFF000000);
if(colour != 0xFF000000)
colourSet->background = colour;
else
@@ -1172,21 +1172,21 @@ Write user defined colours to the database */
void SetDBColour(MYCOLOURSET *colourSet)
{
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_IN_COL, colourSet->incoming);
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_OUT_COL, colourSet->outgoing);
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_BG_COL, colourSet->background);
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_TXT_COL, colourSet->text);
+ db_set_dw(NULL, LINKLIST_MODULE, LINKLIST_IN_COL, colourSet->incoming);
+ db_set_dw(NULL, LINKLIST_MODULE, LINKLIST_OUT_COL, colourSet->outgoing);
+ db_set_dw(NULL, LINKLIST_MODULE, LINKLIST_BG_COL, colourSet->background);
+ db_set_dw(NULL, LINKLIST_MODULE, LINKLIST_TXT_COL, colourSet->text);
}
BYTE GetUpdateSetting(void)
{
BYTE updateWindow;
- updateWindow = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0xFF);
+ updateWindow = db_get_b(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0xFF);
if ( updateWindow == 0xFF )
{
// No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0x00);
+ db_set_b(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0x00);
return 0;
}
if ( updateWindow == 0x00 )
|