Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/NotificationMessage.cpp

Issue 29333356: Noissue - Eliminate compile warnings in the plugin (Closed)
Patch Set: Created Jan. 11, 2016, 3:46 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/plugin/NotificationMessage.h ('k') | src/plugin/PluginClass.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 ti.hwnd = parentWindow; 61 ti.hwnd = parentWindow;
62 ti.hinst = NULL; 62 ti.hinst = NULL;
63 ti.uId = (UINT_PTR)parentWindow; 63 ti.uId = (UINT_PTR)parentWindow;
64 ti.lpszText = const_cast<LPWSTR>(message.c_str()); 64 ti.lpszText = const_cast<LPWSTR>(message.c_str());
65 GetClientRect(parentWindow, &ti.rect); 65 GetClientRect(parentWindow, &ti.rect);
66 66
67 LRESULT res = ::SendMessage(toolTipWindow, TTM_ADDTOOL, 0, (LPARAM)&ti); 67 LRESULT res = ::SendMessage(toolTipWindow, TTM_ADDTOOL, 0, (LPARAM)&ti);
68 68
69 RECT rect; 69 RECT rect;
70 GetWindowRect(parentWindow, &rect); 70 GetWindowRect(parentWindow, &rect);
71 Move(rect.left + (rect.right - rect.left) / 2, rect.top + (rect.bottom - rect. top) / 2); 71 MoveToCenter(rect);
72 72
73 SetTextAndIcon(message, title, icon); 73 SetTextAndIcon(message, title, icon);
74 res = ::SendMessage(toolTipWindow, TTM_TRACKACTIVATE, TRUE, (LPARAM)&ti); 74 res = ::SendMessage(toolTipWindow, TTM_TRACKACTIVATE, TRUE, (LPARAM)&ti);
75 75
76 return true; 76 return true;
77 } 77 }
78 78
79 void NotificationMessage::Hide() 79 void NotificationMessage::Hide()
80 { 80 {
81 if (toolTipWindow != 0) 81 if (toolTipWindow != 0)
(...skipping 24 matching lines...) Expand all
106 106
107 void NotificationMessage::SetParent(HWND parent) 107 void NotificationMessage::SetParent(HWND parent)
108 { 108 {
109 parentWindow = parent; 109 parentWindow = parent;
110 } 110 }
111 111
112 bool NotificationMessage::IsVisible() 112 bool NotificationMessage::IsVisible()
113 { 113 {
114 if (toolTipWindow == 0) 114 if (toolTipWindow == 0)
115 return false; 115 return false;
116 return IsWindowVisible(toolTipWindow); 116 return IsWindowVisible(toolTipWindow) != FALSE;
117 } 117 }
OLDNEW
« no previous file with comments | « src/plugin/NotificationMessage.h ('k') | src/plugin/PluginClass.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld