summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-08-12 13:32:57 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-08-12 13:32:57 +0000
commit5a5db63d2250396ea17b194e4dc7b455cdd521fd (patch)
tree5c8678e3ea936df18d9ec074e115f49e6e6cb4d8 /plugins
parent262955b51eb11e3f8e38546d716f9820231854e1 (diff)
more correct check for avatars
git-svn-id: http://svn.miranda-ng.org/main/trunk@10165 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TabSRMM/src/container.cpp6
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp14
2 files changed, 7 insertions, 13 deletions
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 6eb56bf111..3784bc8abb 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -1449,12 +1449,6 @@ panel_found:
szTitleFormat[0] = 0;
if (pContainer->isCloned && pContainer->hContactFrom != 0) {
- //if (pContainer->settings == 0)
- // pContainer->settings = (TContainerSettings *)mir_alloc(sizeof(TContainerSettings));
-
- //CopyMemory((void*)pContainer->settings, (void*)&PluginConfig.globalContainerSettings, sizeof(TContainerSettings));
- //Utils::ReadContainerSettingsFromDB(pContainer->hContactFrom, pContainer->settings);
-
pContainer->settings = &PluginConfig.globalContainerSettings;
pContainer->szRelThemeFile[0] = pContainer->szAbsThemeFile[0] = 0;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 46f1a0e2a4..85a872ac5e 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -607,6 +607,9 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat)
switch (bAvatarMode) {
case 0: // globally on
dat->bShowAvatar = true;
+LBL_Check:
+ if (!dat->hwndContactPic)
+ dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
break;
case 2: // globally OFF
dat->bShowAvatar = false;
@@ -615,16 +618,13 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat)
case 1:
HBITMAP hbm = (dat->ace && !(dat->ace->dwFlags & AVS_HIDEONCLIST)) ? dat->ace->hbmPic : 0;
dat->bShowAvatar = (hbm && hbm != PluginConfig.g_hbmUnknown);
- break;
+ goto LBL_Check;
}
- if (dat->bShowAvatar) {
- if (!dat->hwndContactPic)
- dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
-
+ if (dat->bShowAvatar)
dat->bShowAvatar = hideOverride == 0 ? 0 : dat->bShowAvatar;
- }
- else dat->bShowAvatar = hideOverride == 1 ? 1 : dat->bShowAvatar;
+ else
+ dat->bShowAvatar = hideOverride == 1 ? 1 : dat->bShowAvatar;
// reloads avatars
if (dat->hwndPanelPic) { // shows contact or user picture, depending on panel visibility