summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-05 22:41:06 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-05 22:41:06 +0000
commite3cefc7b6ca803e3f87dbadae54a110332778490 (patch)
tree0ee41f14f962f946c9e64fae4a11fbcb197af853 /plugins
parentf0fb070eab8f276e66c0154363656045bc0dadb3 (diff)
- first of the /Core standard plugins;
- code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@778 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Clist_nicer/SRC/clc.cpp12
-rw-r--r--plugins/Clist_nicer/SRC/clcpaint.cpp24
-rw-r--r--plugins/Clist_nicer/SRC/clui.cpp1
-rw-r--r--plugins/Clist_nicer/SRC/init.cpp65
-rw-r--r--plugins/Clist_nicer/SRC/statusbar.cpp2
-rw-r--r--plugins/Mir_core/Miranda32.libbin2204 -> 0 bytes
-rw-r--r--plugins/Mir_core/Miranda64.libbin2186 -> 0 bytes
-rw-r--r--plugins/Mir_core/mir_core_10.vcxproj12
-rw-r--r--plugins/TabSRMM/include/themes.h1
-rw-r--r--plugins/TabSRMM/src/themes.cpp11
10 files changed, 59 insertions, 69 deletions
diff --git a/plugins/Clist_nicer/SRC/clc.cpp b/plugins/Clist_nicer/SRC/clc.cpp
index 17af82664b..9a7d81a66b 100644
--- a/plugins/Clist_nicer/SRC/clc.cpp
+++ b/plugins/Clist_nicer/SRC/clc.cpp
@@ -186,11 +186,6 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int ClcModulesLoaded(WPARAM wParam, LPARAM lParam)
-{
- return 0;
-}
-
static int ClcPreshutdown(WPARAM wParam, LPARAM lParam)
{
SFL_Destroy();
@@ -218,13 +213,11 @@ int ClcShutdown(WPARAM wParam, LPARAM lParam)
DeleteObject(cfg::dat.hBrushColorKey);
DeleteObject(cfg::dat.hBrushCLCBk);
DeleteObject(cfg::dat.hBrushAvatarBorder);
- DestroyMenu(cfg::dat.hMenuNotify);
+ DestroyMenu(cfg::dat.hMenuNotify);
ClearIcons(1);
SFL_UnregisterWindowClass();
if (cfg::eCache) {
- int i;
-
- for (i = 0; i < cfg::nextCacheEntry; i++) {
+ for (int i = 0; i < cfg::nextCacheEntry; i++) {
if (cfg::eCache[i].statusMsg)
free(cfg::eCache[i].statusMsg);
if (cfg::eCache[i].status_item) {
@@ -255,7 +248,6 @@ int LoadCLCModule(void)
hCListImages = (HIMAGELIST) CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0);
- HookEvent(ME_SYSTEM_MODULESLOADED, ClcModulesLoaded);
hClcSettingsChanged = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ClcSettingChanged);
hClcDBEvent = HookEvent(ME_DB_EVENT_ADDED, ClcEventAdded);
HookEvent(ME_OPT_INITIALISE, ClcOptInit);
diff --git a/plugins/Clist_nicer/SRC/clcpaint.cpp b/plugins/Clist_nicer/SRC/clcpaint.cpp
index 8844972745..c9b11d07b3 100644
--- a/plugins/Clist_nicer/SRC/clcpaint.cpp
+++ b/plugins/Clist_nicer/SRC/clcpaint.cpp
@@ -1387,22 +1387,22 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT *rcPaint)
my_status = GetGeneralisedStatus();
g_HDC = hdc;
- /*
- * temporary DC for avatar drawing
- */
+ /*
+ * temporary DC for avatar drawing
+ */
- g_padding_y = 0;
+ g_padding_y = 0;
- hdcTempAV = CreateCompatibleDC(g_HDC);
- hdcAV = CreateCompatibleDC(g_HDC);
- hbmTempAV = CreateCompatibleBitmap(g_HDC, g_maxAV_X, g_maxAV_Y);
- hbmTempOldAV = reinterpret_cast<HBITMAP>(SelectObject(hdcTempAV, hbmTempAV));
+ hdcTempAV = CreateCompatibleDC(g_HDC);
+ hdcAV = CreateCompatibleDC(g_HDC);
+ hbmTempAV = CreateCompatibleBitmap(g_HDC, g_maxAV_X, g_maxAV_Y);
+ hbmTempOldAV = reinterpret_cast<HBITMAP>(SelectObject(hdcTempAV, hbmTempAV));
- cfg::dat.t_now = time(NULL);
+ cfg::dat.t_now = time(NULL);
GetSystemTime(&cfg::dat.st);
SystemTimeToFileTime(&cfg::dat.st, &cfg::dat.ft);
- cfg::dat.bUseFastGradients = cfg::dat.bWantFastGradients && (API::pfnGradientFill != 0);
+ cfg::dat.bUseFastGradients = cfg::dat.bWantFastGradients && (API::pfnGradientFill != 0);
av_left = (cfg::dat.dwFlags & CLUI_FRAME_AVATARSLEFT);
av_right = (cfg::dat.dwFlags & CLUI_FRAME_AVATARSRIGHT);
@@ -1581,8 +1581,8 @@ bgdone:
}
line_num++;
- if(cfg::dat.bForceRefetchOnPaint)
- group->cl.items[group->scanIndex]->ace = (struct avatarCacheEntry*)-1;
+ if(cfg::dat.bForceRefetchOnPaint)
+ group->cl.items[group->scanIndex]->ace = (struct avatarCacheEntry*)-1;
if (y > rcPaint->top - dat->row_heights[line_num] && y <= rcPaint->bottom) {
if (group->cl.items[group->scanIndex]->ace == (struct avatarCacheEntry*)-1 )
diff --git a/plugins/Clist_nicer/SRC/clui.cpp b/plugins/Clist_nicer/SRC/clui.cpp
index e4009d6feb..366e503c76 100644
--- a/plugins/Clist_nicer/SRC/clui.cpp
+++ b/plugins/Clist_nicer/SRC/clui.cpp
@@ -2066,6 +2066,7 @@ void LoadCLUIModule(void)
HookEvent(ME_MC_SUBCONTACTSCHANGED, MetaChanged);
InitGroupMenus();
+ LoadExtBkSettingsFromDB();
wndclass.style = 0;
wndclass.lpfnWndProc = EventAreaWndProc;
diff --git a/plugins/Clist_nicer/SRC/init.cpp b/plugins/Clist_nicer/SRC/init.cpp
index 0454d0d36a..16a33bfc66 100644
--- a/plugins/Clist_nicer/SRC/init.cpp
+++ b/plugins/Clist_nicer/SRC/init.cpp
@@ -205,7 +205,6 @@ static int systemModulesLoaded(WPARAM wParam, LPARAM lParam)
ZeroMemory((void *)overlayicons, sizeof(HICON) * 10);
CLN_LoadAllIcons(1);
- LoadExtBkSettingsFromDB();
return 0;
}
@@ -240,38 +239,38 @@ extern "C" int __declspec(dllexport) CListInitialise()
cfg::maxCacheEntry = iCount;
cfg::init();
- cfg::dat.hMenuNotify = CreatePopupMenu();
- cfg::dat.wNextMenuID = 1;
- cfg::dat.sortTimer = cfg::getDword("CLC", "SortTimer", 150);
- cfg::dat.szNoEvents = TranslateTS(szNoevents);
- cfg::dat.avatarBorder = (COLORREF)cfg::getDword("CLC", "avatarborder", 0);
- cfg::dat.avatarRadius = (COLORREF)cfg::getDword("CLC", "avatarradius", 4);
- cfg::dat.hBrushAvatarBorder = CreateSolidBrush(cfg::dat.avatarBorder);
- cfg::dat.avatarSize = cfg::getWord("CList", "AvatarSize", 24);
- cfg::dat.dualRowMode = cfg::getByte("CLC", "DualRowMode", 0);
- cfg::dat.avatarPadding = cfg::getByte("CList", "AvatarPadding", 0);
- cfg::dat.isTransparent = cfg::getByte("CList", "Transparent", 0);
- cfg::dat.alpha = cfg::getByte("CList", "Alpha", SETTING_ALPHA_DEFAULT);
- cfg::dat.autoalpha = cfg::getByte("CList", "AutoAlpha", SETTING_ALPHA_DEFAULT);
- cfg::dat.fadeinout = cfg::getByte("CLUI", "FadeInOut", 0);
- cfg::dat.autosize = cfg::getByte("CLUI", "AutoSize", 0);
- cfg::dat.dwExtraImageMask = cfg::getDword("CLUI", "ximgmask", 0);
- cfg::dat.bNoOfflineAvatars = cfg::getByte("CList", "NoOfflineAV", 1);
- cfg::dat.bFullTransparent = cfg::getByte("CLUI", "fulltransparent", 0);
- cfg::dat.bDblClkAvatars = cfg::getByte("CLC", "dblclkav", 0);
- cfg::dat.bEqualSections = cfg::getByte("CLUI", "EqualSections", 0);
- cfg::dat.bCenterStatusIcons = cfg::getByte("CLC", "si_centered", 1);
- cfg::dat.boldHideOffline = -1;
- cfg::dat.bSecIMAvail = ServiceExists("SecureIM/IsContactSecured") ? 1 : 0;
- cfg::dat.bNoTrayTips = cfg::getByte("CList", "NoTrayTips", 0);
- cfg::dat.bShowLocalTime = cfg::getByte("CLC", "ShowLocalTime", 1);
- cfg::dat.bShowLocalTimeSelective = cfg::getByte("CLC", "SelectiveLocalTime", 1);
- cfg::dat.bDontSeparateOffline = cfg::getByte("CList", "DontSeparateOffline", 0);
- cfg::dat.bShowXStatusOnSbar = cfg::getByte("CLUI", "xstatus_sbar", 0);
- cfg::dat.bLayeredHack = cfg::getByte("CLUI", "layeredhack", 1);
- cfg::dat.bFirstRun = cfg::getByte("CLUI", "firstrun", 1);
- cfg::dat.langPackCP = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);
- cfg::dat.realTimeSaving = cfg::getByte("CLUI", "save_pos_always", 0);
+ cfg::dat.hMenuNotify = CreatePopupMenu();
+ cfg::dat.wNextMenuID = 1;
+ cfg::dat.sortTimer = cfg::getDword("CLC", "SortTimer", 150);
+ cfg::dat.szNoEvents = TranslateTS(szNoevents);
+ cfg::dat.avatarBorder = (COLORREF)cfg::getDword("CLC", "avatarborder", 0);
+ cfg::dat.avatarRadius = (COLORREF)cfg::getDword("CLC", "avatarradius", 4);
+ cfg::dat.hBrushAvatarBorder = CreateSolidBrush(cfg::dat.avatarBorder);
+ cfg::dat.avatarSize = cfg::getWord("CList", "AvatarSize", 24);
+ cfg::dat.dualRowMode = cfg::getByte("CLC", "DualRowMode", 0);
+ cfg::dat.avatarPadding = cfg::getByte("CList", "AvatarPadding", 0);
+ cfg::dat.isTransparent = cfg::getByte("CList", "Transparent", 0);
+ cfg::dat.alpha = cfg::getByte("CList", "Alpha", SETTING_ALPHA_DEFAULT);
+ cfg::dat.autoalpha = cfg::getByte("CList", "AutoAlpha", SETTING_ALPHA_DEFAULT);
+ cfg::dat.fadeinout = cfg::getByte("CLUI", "FadeInOut", 0);
+ cfg::dat.autosize = cfg::getByte("CLUI", "AutoSize", 0);
+ cfg::dat.dwExtraImageMask = cfg::getDword("CLUI", "ximgmask", 0);
+ cfg::dat.bNoOfflineAvatars = cfg::getByte("CList", "NoOfflineAV", 1);
+ cfg::dat.bFullTransparent = cfg::getByte("CLUI", "fulltransparent", 0);
+ cfg::dat.bDblClkAvatars = cfg::getByte("CLC", "dblclkav", 0);
+ cfg::dat.bEqualSections = cfg::getByte("CLUI", "EqualSections", 0);
+ cfg::dat.bCenterStatusIcons = cfg::getByte("CLC", "si_centered", 1);
+ cfg::dat.boldHideOffline = -1;
+ cfg::dat.bSecIMAvail = ServiceExists("SecureIM/IsContactSecured") ? 1 : 0;
+ cfg::dat.bNoTrayTips = cfg::getByte("CList", "NoTrayTips", 0);
+ cfg::dat.bShowLocalTime = cfg::getByte("CLC", "ShowLocalTime", 1);
+ cfg::dat.bShowLocalTimeSelective = cfg::getByte("CLC", "SelectiveLocalTime", 1);
+ cfg::dat.bDontSeparateOffline = cfg::getByte("CList", "DontSeparateOffline", 0);
+ cfg::dat.bShowXStatusOnSbar = cfg::getByte("CLUI", "xstatus_sbar", 0);
+ cfg::dat.bLayeredHack = cfg::getByte("CLUI", "layeredhack", 1);
+ cfg::dat.bFirstRun = cfg::getByte("CLUI", "firstrun", 1);
+ cfg::dat.langPackCP = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);
+ cfg::dat.realTimeSaving = cfg::getByte("CLUI", "save_pos_always", 0);
DWORD sortOrder = cfg::getDword("CList", "SortOrder", SORTBY_NAME);
cfg::dat.sortOrder[0] = LOBYTE(LOWORD(sortOrder));
diff --git a/plugins/Clist_nicer/SRC/statusbar.cpp b/plugins/Clist_nicer/SRC/statusbar.cpp
index 8d130cd866..09036b2ed7 100644
--- a/plugins/Clist_nicer/SRC/statusbar.cpp
+++ b/plugins/Clist_nicer/SRC/statusbar.cpp
@@ -83,7 +83,7 @@ LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
break;
case WM_PAINT:
- if(cfg::shutDown)
+ if(cfg::shutDown || !StatusItems)
return 0;
if(cfg::dat.bSkinnedStatusBar) {
diff --git a/plugins/Mir_core/Miranda32.lib b/plugins/Mir_core/Miranda32.lib
deleted file mode 100644
index 966aff352a..0000000000
--- a/plugins/Mir_core/Miranda32.lib
+++ /dev/null
Binary files differ
diff --git a/plugins/Mir_core/Miranda64.lib b/plugins/Mir_core/Miranda64.lib
deleted file mode 100644
index b3feb4c445..0000000000
--- a/plugins/Mir_core/Miranda64.lib
+++ /dev/null
Binary files differ
diff --git a/plugins/Mir_core/mir_core_10.vcxproj b/plugins/Mir_core/mir_core_10.vcxproj
index 52717bfdd2..03ea9c52e1 100644
--- a/plugins/Mir_core/mir_core_10.vcxproj
+++ b/plugins/Mir_core/mir_core_10.vcxproj
@@ -121,8 +121,7 @@
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>miranda32.lib;ws2_32.lib;comctl32.lib;winmm.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>
- </AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
</Link>
<CustomBuildStep>
@@ -158,8 +157,7 @@
<ImportLibrary>$(IntDir)$(TargetName)64.lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>miranda64.lib;ws2_32.lib;comctl32.lib;winmm.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>
- </AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4197 %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
@@ -190,8 +188,7 @@
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>miranda32.lib;ws2_32.lib;comctl32.lib;winmm.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>
- </AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
</Link>
<CustomBuildStep>
@@ -231,8 +228,7 @@
<ImportLibrary>$(IntDir)$(TargetName)64.lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>miranda64.lib;ws2_32.lib;comctl32.lib;winmm.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>
- </AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4197 %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
diff --git a/plugins/TabSRMM/include/themes.h b/plugins/TabSRMM/include/themes.h
index 38c46e07e3..fcd4d03927 100644
--- a/plugins/TabSRMM/include/themes.h
+++ b/plugins/TabSRMM/include/themes.h
@@ -252,6 +252,7 @@ public:
CSkin()
{
+ ZeroMemory(this, sizeof(CSkin));
m_default_bf.SourceConstantAlpha = 255;
m_default_bf.AlphaFormat = AC_SRC_ALPHA;
m_default_bf.BlendOp = AC_SRC_OVER;
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index 031eec0328..5bf22158dc 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -1084,7 +1084,6 @@ void CSkin::setFileName()
void CSkin::Init(bool fStartup)
{
m_ImageItems = 0;
- ZeroMemory(this, sizeof(CSkin));
m_SkinItems = ::SkinItems;
m_fLoadOnStartup = false;
m_skinEnabled = m_frameSkins = false;
@@ -1204,11 +1203,13 @@ void CSkin::Unload()
::DeleteObject(m_SkinDarkShadowPen);
m_SkinDarkShadowPen = 0;
- for(i = 0; i < ID_EXTBK_LAST; i++) {
- m_SkinItems[i].IGNORED = 1;
- m_SkinItems[i].imageItem = 0;
+ if (m_SkinItems) {
+ for(i = 0; i < ID_EXTBK_LAST; i++) {
+ m_SkinItems[i].IGNORED = 1;
+ m_SkinItems[i].imageItem = 0;
+ }
+ m_SkinItems[ID_EXTBKINFOPANELBG] = _defInfoPanel;
}
- m_SkinItems[ID_EXTBKINFOPANELBG] = _defInfoPanel;
ZeroMemory(this, sizeof(CSkin));