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

Issue 11557015: Tooltip notification. Check for update fixes. (Closed)

Created:
Sept. 5, 2013, 10:43 p.m. by Oleksandr
Modified:
Oct. 7, 2013, 10:03 p.m.
Visibility:
Public.

Description

Tooltip notification. Check for update fixes.

Patch Set 1 #

Total comments: 27

Patch Set 2 : Addressing comments #

Total comments: 18

Patch Set 3 : More comments addressed #

Patch Set 4 : More and more comments addressing #

Total comments: 3

Patch Set 5 : Evem more comments addressing #

Total comments: 5

Patch Set 6 : Nits addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -7 lines) Patch
M .hgsubstate View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/plugin/NotificationMessage.cpp View 1 2 3 4 5 3 chunks +4 lines, -6 lines 0 comments Download

Messages

Total messages: 17
Oleksandr
http://codereview.adblockplus.org/11557015/diff/1/adblockplus.gyp File adblockplus.gyp (right): http://codereview.adblockplus.org/11557015/diff/1/adblockplus.gyp#newcode102 adblockplus.gyp:102: 'defines': ['PRODUCT_ADBLOCKPLUS', 'ISOLATION_AWARE_ENABLED'], See "Adding Visual Style Support to ...
Sept. 5, 2013, 10:48 p.m. (2013-09-05 22:48:01 UTC) #1
Wladimir Palant
http://codereview.adblockplus.org/11557015/diff/1/locales/en.ini File locales/en.ini (right): http://codereview.adblockplus.org/11557015/diff/1/locales/en.ini#newcode22 locales/en.ini:22: checking-for-updates-text=Adblock Plus is checking for a new version IMHO ...
Sept. 11, 2013, 1:07 p.m. (2013-09-11 13:07:06 UTC) #2
Felix Dahlke
Nice, I had some trouble showing a tooltip if you recall, but I definitely prefer ...
Sept. 11, 2013, 3:22 p.m. (2013-09-11 15:22:59 UTC) #3
Wladimir Palant
On 2013/09/11 15:22:59, Felix H. Dahlke wrote: > One question: The tooltips will also be ...
Sept. 12, 2013, 2:11 p.m. (2013-09-12 14:11:01 UTC) #4
Wladimir Palant
http://codereview.adblockplus.org/11557015/diff/1/src/plugin/PluginClass.cpp File src/plugin/PluginClass.cpp (right): http://codereview.adblockplus.org/11557015/diff/1/src/plugin/PluginClass.cpp#newcode221 src/plugin/PluginClass.cpp:221: InitCommonControlsEx(&commControls); On 2013/09/11 15:22:59, Felix H. Dahlke wrote: > ...
Sept. 12, 2013, 2:13 p.m. (2013-09-12 14:13:34 UTC) #5
Felix Dahlke
http://codereview.adblockplus.org/11557015/diff/1/src/plugin/PluginClass.cpp File src/plugin/PluginClass.cpp (right): http://codereview.adblockplus.org/11557015/diff/1/src/plugin/PluginClass.cpp#newcode221 src/plugin/PluginClass.cpp:221: InitCommonControlsEx(&commControls); On 2013/09/12 14:13:34, Wladimir Palant wrote: > On ...
Sept. 12, 2013, 2:23 p.m. (2013-09-12 14:23:49 UTC) #6
Oleksandr
http://codereview.adblockplus.org/11557015/diff/1/src/plugin/PluginClass.cpp File src/plugin/PluginClass.cpp (right): http://codereview.adblockplus.org/11557015/diff/1/src/plugin/PluginClass.cpp#newcode221 src/plugin/PluginClass.cpp:221: InitCommonControlsEx(&commControls); NotificationMessage sounds best for me as well then. ...
Sept. 12, 2013, 2:26 p.m. (2013-09-12 14:26:26 UTC) #7
Oleksandr
http://codereview.adblockplus.org/11557015/diff/1/src/plugin/AdblockPlusClient.cpp File src/plugin/AdblockPlusClient.cpp (right): http://codereview.adblockplus.org/11557015/diff/1/src/plugin/AdblockPlusClient.cpp#newcode447 src/plugin/AdblockPlusClient.cpp:447: request << Communication::PROC_CHECK_FOR_UPDATES << (int32_t&)callbackWindow; On 2013/09/11 13:07:06, Wladimir ...
Sept. 16, 2013, 1:52 p.m. (2013-09-16 13:52:46 UTC) #8
Wladimir Palant
http://codereview.adblockplus.org/11557015/diff/1/src/plugin/AdblockPlusClient.cpp File src/plugin/AdblockPlusClient.cpp (right): http://codereview.adblockplus.org/11557015/diff/1/src/plugin/AdblockPlusClient.cpp#newcode447 src/plugin/AdblockPlusClient.cpp:447: request << Communication::PROC_CHECK_FOR_UPDATES << (int32_t&)callbackWindow; Felix seems to think ...
Sept. 16, 2013, 2:37 p.m. (2013-09-16 14:37:18 UTC) #9
Wladimir Palant
http://codereview.adblockplus.org/11557015/diff/14001/src/engine/Main.cpp File src/engine/Main.cpp (right): http://codereview.adblockplus.org/11557015/diff/14001/src/engine/Main.cpp#newcode67 src/engine/Main.cpp:67: checkingForUpdate = false; I would normally protect every access ...
Sept. 19, 2013, 8:59 a.m. (2013-09-19 08:59:16 UTC) #10
Oleksandr
http://codereview.adblockplus.org/11557015/diff/1/src/plugin/AdblockPlusClient.cpp File src/plugin/AdblockPlusClient.cpp (right): http://codereview.adblockplus.org/11557015/diff/1/src/plugin/AdblockPlusClient.cpp#newcode447 src/plugin/AdblockPlusClient.cpp:447: request << Communication::PROC_CHECK_FOR_UPDATES << (int32_t&)callbackWindow; I agree with that ...
Sept. 25, 2013, 10:03 a.m. (2013-09-25 10:03:14 UTC) #11
Wladimir Palant
http://codereview.adblockplus.org/11557015/diff/1/src/plugin/AdblockPlusClient.cpp File src/plugin/AdblockPlusClient.cpp (right): http://codereview.adblockplus.org/11557015/diff/1/src/plugin/AdblockPlusClient.cpp#newcode447 src/plugin/AdblockPlusClient.cpp:447: request << Communication::PROC_CHECK_FOR_UPDATES << (int32_t&)callbackWindow; On 2013/09/25 10:03:14, Oleksandr ...
Sept. 25, 2013, 10:27 a.m. (2013-09-25 10:27:14 UTC) #12
Oleksandr
http://codereview.adblockplus.org/11557015/diff/14001/src/plugin/NotificationMessage.cpp File src/plugin/NotificationMessage.cpp (right): http://codereview.adblockplus.org/11557015/diff/14001/src/plugin/NotificationMessage.cpp#newcode99 src/plugin/NotificationMessage.cpp:99: return IsWindowVisible(toolTipWindow); Did that. Also if we do miss ...
Sept. 25, 2013, 12:37 p.m. (2013-09-25 12:37:45 UTC) #13
Wladimir Palant
http://codereview.adblockplus.org/11557015/diff/41001/src/plugin/NotificationMessage.cpp File src/plugin/NotificationMessage.cpp (right): http://codereview.adblockplus.org/11557015/diff/41001/src/plugin/NotificationMessage.cpp#newcode12 src/plugin/NotificationMessage.cpp:12: NotificationMessage::NotificationMessage(HWND parent) You can merge the two constuctors by ...
Sept. 25, 2013, 2 p.m. (2013-09-25 14:00:44 UTC) #14
Oleksandr
Sept. 25, 2013, 2:31 p.m. (2013-09-25 14:31:15 UTC) #15
Wladimir Palant
LGTM with the nit below fixed. http://codereview.adblockplus.org/11557015/diff/45001/src/plugin/NotificationMessage.cpp File src/plugin/NotificationMessage.cpp (right): http://codereview.adblockplus.org/11557015/diff/45001/src/plugin/NotificationMessage.cpp#newcode57 src/plugin/NotificationMessage.cpp:57: SetTextAndIcon(message.c_str(), title.c_str(), icon); ...
Sept. 25, 2013, 3:12 p.m. (2013-09-25 15:12:48 UTC) #16
Felix Dahlke
Oct. 1, 2013, 12:59 p.m. (2013-10-01 12:59:53 UTC) #17
A bunch of nits from me, otherwise LGTM.

Regarding casts: C-style casts are a bit weird and I personally prefer to avoid
them. They basically try all the more specific C++ style casts (except
dynamic_cast) in turn until something works. The worst case is always both
const_cast and reinterpret_cast. In places where we have to do that, I don't
mind C-style casts for brevity. Otherwise we should avoid them IMO.

http://codereview.adblockplus.org/11557015/diff/45001/src/plugin/Notification...
File src/plugin/NotificationMessage.cpp (right):

http://codereview.adblockplus.org/11557015/diff/45001/src/plugin/Notification...
src/plugin/NotificationMessage.cpp:8: parentWindow = parent;
Would rather do this in the initialiser list.

http://codereview.adblockplus.org/11557015/diff/45001/src/plugin/Notification...
src/plugin/NotificationMessage.cpp:42: TOOLINFOW ti;
Would rather have all members set to zeroes, just in case we don't set them all
below.

We typically do that, either by using ZeroMemory/memset or by default
initialising (TOOLINFOW ti = {}). I prefer the latter.

http://codereview.adblockplus.org/11557015/diff/45001/src/plugin/Notification...
src/plugin/NotificationMessage.cpp:48: ti.lpszText =
const_cast<LPWSTR>(message.c_str());
Can you get rid of this trailing whitespace?

http://codereview.adblockplus.org/11557015/diff/45001/src/plugin/Notification...
src/plugin/NotificationMessage.cpp:80: TOOLINFOW ti;
As above, would prefer to default initialise this to avoid accidental garbage
values for fields we don't set.

Powered by Google App Engine
This is Rietveld