summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd/src/dlgboxsubclass.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-03 18:05:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-03 18:05:17 +0000
commita4f31a97e407280dc7e306a6c96948b53f9c0cab (patch)
tree8e76329ed4784e0c8e1ee81070c5b9985989263a /plugins/SmileyAdd/src/dlgboxsubclass.cpp
parentf07feab44bd3ef047229f511fadb3a151f200654 (diff)
SmileyAdd:
- array indexes totally unborkred; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@4296 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SmileyAdd/src/dlgboxsubclass.cpp')
-rw-r--r--plugins/SmileyAdd/src/dlgboxsubclass.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp
index d10d8f9246..554258dee7 100644
--- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp
+++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp
@@ -114,7 +114,7 @@ public:
if (OldButtonPlace)
{
- if (isSplit && DBGetContactSettingByte(NULL, "SRMsg", "ShowQuote", FALSE))
+ if (isSplit && db_get_b(NULL, "SRMsg", "ShowQuote", FALSE))
{
GetWindowRect(QuoteB, &rect);
pt.x = rect.right + 12;
@@ -199,17 +199,17 @@ public:
bool showButtonLine;
if (IsOldSrmm())
{
- isSplit = DBGetContactSettingByte(NULL,"SRMsg","Split", TRUE) != 0;
+ isSplit = db_get_b(NULL,"SRMsg","Split", TRUE) != 0;
doSmileyReplace = (isSplit || !isSend);
doSmileyButton &= isSplit || isSend;
- showButtonLine = DBGetContactSettingByte(NULL, "SRMsg", "ShowButtonLine", TRUE) != 0;
+ showButtonLine = db_get_b(NULL, "SRMsg", "ShowButtonLine", TRUE) != 0;
}
else
{
doSmileyReplace = true;
OldButtonPlace = false;
- showButtonLine = DBGetContactSettingByte(NULL, "SRMM", "ShowButtonLine", TRUE) != 0;
+ showButtonLine = db_get_b(NULL, "SRMM", "ShowButtonLine", TRUE) != 0;
}
doSmileyButton &= OldButtonPlace || showButtonLine;
@@ -275,10 +275,8 @@ bool IsOldSrmm(void)
int UpdateSrmmDlg(WPARAM wParam, LPARAM /* lParam */)
{
WaitForSingleObject(g_hMutex, 2000);
- for (int i=0; i<g_MsgWndList.getCount(); ++i)
- {
- if (wParam == 0 || g_MsgWndList[i]->hContact == (HANDLE)wParam)
- {
+ for (int i=0; i < g_MsgWndList.getCount(); ++i) {
+ if (wParam == 0 || g_MsgWndList[i]->hContact == (HANDLE)wParam) {
SendMessage(g_MsgWndList[i]->hwnd, WM_SETREDRAW, FALSE, 0);
SendMessage(g_MsgWndList[i]->hwnd, DM_OPTIONSAPPLIED, 0, 0);
SendMessage(g_MsgWndList[i]->hwnd, WM_SETREDRAW, TRUE, 0);
@@ -541,7 +539,7 @@ void RemoveDialogBoxHook(void)
if (g_hMessageHookPre) UnhookWindowsHookEx(g_hMessageHookPre);
WaitForSingleObject(g_hMutex, 2000);
- for (int i=0; i<g_MsgWndList.getCount(); ++i)
+ for (int i=0; i<g_MsgWndList.getCount(); i++)
delete g_MsgWndList[i];
g_MsgWndList.destroy();
ReleaseMutex(g_hMutex);