summaryrefslogtreecommitdiff
path: root/protocols/Xfire/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-15 16:26:10 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-15 16:26:10 +0000
commit7fe6e93058f0e9253e2a79d7fc2d7a136784f791 (patch)
tree861225801bcda335939cac2fa6ddc6083f52f51f /protocols/Xfire/src
parent21e84e8d5012cc0b600f27a4d796d3813b29a16c (diff)
various popup related code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@4056 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src')
-rw-r--r--protocols/Xfire/src/tools.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/protocols/Xfire/src/tools.cpp b/protocols/Xfire/src/tools.cpp
index 626745d3e9..8d16127d26 100644
--- a/protocols/Xfire/src/tools.cpp
+++ b/protocols/Xfire/src/tools.cpp
@@ -89,12 +89,11 @@ int displayPopup(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,HICON hi
static HICON hicNotify = NULL, hicWarning = NULL, hicError = NULL;
- if ((uType&MB_TYPEMASK) == MB_OK)
- {
- POPUPDATA ppd = {0};
+ if ((uType & MB_TYPEMASK) == MB_OK) {
+ POPUPDATA ppd = { 0 };
+ ppd.lchIcon = hicon;
- if (bIconsNotLoaded)
- {
+ if (bIconsNotLoaded) {
hicNotify = Skin_GetIcon("popup_notify");
hicWarning = Skin_GetIcon("popup_warning");
hicError = Skin_GetIcon("popup_error");
@@ -104,28 +103,22 @@ int displayPopup(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,HICON hi
lstrcpynA(ppd.lpzContactName, lpCaption, sizeof(ppd.lpzContactName));
lstrcpynA(ppd.lpzText, lpText, sizeof(ppd.lpzText));
- if ((uType&MB_ICONMASK) == MB_ICONSTOP)
- {
+ if ((uType & MB_ICONMASK) == MB_ICONSTOP) {
ppd.lchIcon = hicError;
ppd.colorBack = RGB(191,0,0);
ppd.colorText = RGB(255,245,225);
- } else
- if ((uType&MB_ICONMASK) == MB_ICONWARNING)
- {
+ }
+ else if ((uType & MB_ICONMASK) == MB_ICONWARNING) {
ppd.lchIcon = hicWarning;
ppd.colorBack = RGB(210,210,150);
ppd.colorText = RGB(0,0,0);
- } else
- /* if ((uType&MB_ICONMASK) == MB_ICONINFORMATION) */
- {
+ }
+ else {
ppd.lchIcon = hicNotify;
ppd.colorBack = RGB(230,230,230);
ppd.colorText = RGB(0,0,0);
}
- if(hicon!=NULL)
- ppd.lchIcon=hicon;
-
PUAddPopUp(&ppd);
}