diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-08 12:53:27 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-08 12:53:35 +0300 |
commit | 1a6f8de0cfcff7500258b8b048b7216d5dc26dc9 (patch) | |
tree | 1d5ddb53464b80eff669603fb3e7171cb9e48a45 /plugins/TabSRMM/src/globals.cpp | |
parent | 69dbc8aac3c51e5ec4fdd16bb12f17071e0819df (diff) |
massive code cleaning
Diffstat (limited to 'plugins/TabSRMM/src/globals.cpp')
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 4260385af8..21c8880da1 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -415,7 +415,7 @@ int CGlobals::DBSettingChanged(WPARAM hContact, LPARAM lParam) dat->m_nTypeSecs = 0;
dat->m_bShowTyping = 0;
dat->m_wszStatusBar[0] = 0;
- PostMessage(c->getHwnd(), DM_UPDATELASTMESSAGE, 0, 0);
+ PostMessage(dat->GetHwnd(), DM_UPDATELASTMESSAGE, 0, 0);
}
}
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_LOGSTATUSCHANGE, MAKELONG(c->getStatus(), c->getOldStatus()), (LPARAM)c);
@@ -447,10 +447,11 @@ int CGlobals::MetaContactEvent(WPARAM hContact, LPARAM) if (hContact) {
CContactCache *c = CContactCache::getContactCache(hContact);
c->updateMeta();
- if (c->getHwnd()) {
- ::PostMessage(c->getHwnd(), DM_UPDATETITLE, 0, 1);
- ::PostMessage(c->getHwnd(), DM_UPDATEPICLAYOUT, 0, 0);
- InvalidateRect(c->getHwnd(), 0, TRUE); // force redraw
+ CTabBaseDlg *pDlg = c->getDat();
+ if (pDlg) {
+ ::PostMessage(pDlg->GetHwnd(), DM_UPDATETITLE, 0, 1);
+ ::PostMessage(pDlg->GetHwnd(), DM_UPDATEPICLAYOUT, 0, 0);
+ InvalidateRect(pDlg->GetHwnd(), 0, TRUE); // force redraw
}
}
return 0;
|