summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/modern_docking.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-28 21:28:50 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-28 21:28:50 +0000
commit190968e9803a32bd4e609176989564735098146c (patch)
treea3ab28871ffd27d84f401ebd9e4f79423c1823e8 /plugins/Clist_modern/modern_docking.cpp
parent46c66c9252010602ba3194956e7710946066879b (diff)
database stubs moved to mir_core
git-svn-id: http://svn.miranda-ng.org/main/trunk@676 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/modern_docking.cpp')
-rw-r--r--plugins/Clist_modern/modern_docking.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Clist_modern/modern_docking.cpp b/plugins/Clist_modern/modern_docking.cpp
index a7ffe8e506..d9d4c717da 100644
--- a/plugins/Clist_modern/modern_docking.cpp
+++ b/plugins/Clist_modern/modern_docking.cpp
@@ -109,13 +109,13 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
MSG *msg=(MSG*)wParam;
if(msg->message==WM_DESTROY)
- ModernWriteSettingByte(NULL,"CList","Docked",(BYTE)g_CluiData.fDocked);
+ db_set_b(NULL,"CList","Docked",(BYTE)g_CluiData.fDocked);
if (!g_CluiData.fDocked && msg->message!=WM_CREATE && msg->message!=WM_MOVING && msg->message!=WM_CREATEDOCKED && msg->message != WM_MOVE && msg->message != WM_SIZE) return 0;
switch(msg->message) {
case WM_CREATE:
//if(GetSystemMetrics(SM_CMONITORS)>1) return 0;
- if(ModernGetSettingByte(NULL,"CList","Docked",0) && ModernGetSettingByte(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT))
+ if(db_get_b(NULL,"CList","Docked",0) && db_get_b(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT))
{
PostMessage(msg->hwnd,WM_CREATEDOCKED,0,0);
}
@@ -124,7 +124,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
case WM_CREATEDOCKED:
//we need to post a message just after creation to let main message function do some work
- g_CluiData.fDocked=(BOOL)ModernGetSettingByte(NULL,"CList","Docked",0);
+ g_CluiData.fDocked=(BOOL)db_get_b(NULL,"CList","Docked",0);
if(IsWindowVisible(msg->hwnd) && !IsIconic(msg->hwnd)) {
RECT rc, rcMonitor;
ZeroMemory(&abd,sizeof(abd));
@@ -187,7 +187,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
if (((ptCursor.x<rcMonitor.left+EDGESENSITIVITY)
|| (ptCursor.x>=rcMonitor.right-EDGESENSITIVITY))
- && ModernGetSettingByte(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT))
+ && db_get_b(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT))
{
ZeroMemory(&abd,sizeof(abd));
abd.cbSize=sizeof(abd);
@@ -211,7 +211,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
Sync(CLUIFrames_OnMoving,msg->hwnd,(LPRECT)msg->lParam);
g_CluiData.mutexPreventDockMoving=1;
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
- ModernWriteSettingByte(NULL,"CList","Docked",(BYTE)g_CluiData.fDocked);
+ db_set_b(NULL,"CList","Docked",(BYTE)g_CluiData.fDocked);
ModernSkinButton_ReposButtons( msg->hwnd, SBRF_DO_NOT_DRAW, NULL );
return TRUE;
}
@@ -271,7 +271,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
case WM_SHOWWINDOW:
{
if(msg->lParam) return 0;
- BOOL toBeDocked = (BOOL) ModernGetSettingByte(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT);
+ BOOL toBeDocked = (BOOL) db_get_b(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT);
if ((msg->wParam && g_CluiData.fDocked<0) || (!msg->wParam && g_CluiData.fDocked>0)) g_CluiData.fDocked=-g_CluiData.fDocked;
ZeroMemory(&abd,sizeof(abd));
abd.cbSize=sizeof(abd);
@@ -328,8 +328,8 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
g_CluiData.fDocked=0;
GetCursorPos(&pt);
PostMessage(msg->hwnd,WM_NCLBUTTONDOWN,HTCAPTION,MAKELPARAM(pt.x,pt.y));
- SetWindowPos(msg->hwnd,0,pt.x-rc.right/2,pt.y-GetSystemMetrics(SM_CYFRAME)-GetSystemMetrics(SM_CYSMCAPTION)/2,ModernGetSettingDword(NULL,"CList","Width",0),ModernGetSettingDword(NULL,"CList","Height",0),SWP_NOZORDER);
- ModernWriteSettingByte(NULL,"CList","Docked",(BYTE)g_CluiData.fDocked);
+ SetWindowPos(msg->hwnd,0,pt.x-rc.right/2,pt.y-GetSystemMetrics(SM_CYFRAME)-GetSystemMetrics(SM_CYSMCAPTION)/2,db_get_dw(NULL,"CList","Width",0),db_get_dw(NULL,"CList","Height",0),SWP_NOZORDER);
+ db_set_b(NULL,"CList","Docked",(BYTE)g_CluiData.fDocked);
// ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, NULL);
}
return 1;