Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BrowserWindow.prototype.setThumbnailToolTip #6762

Merged
merged 1 commit into from Aug 8, 2016

Conversation

Projects
None yet
4 participants
@@ -858,6 +864,7 @@ void Window::BuildPrototype(v8::Isolate* isolate,
.SetMethod("unhookWindowMessage", &Window::UnhookWindowMessage)
.SetMethod("unhookAllWindowMessages", &Window::UnhookAllWindowMessages)
.SetMethod("setThumbnailClip", &Window::SetThumbnailClip)
.SetMethod("setThumbnailTooltip", &Window::SetThumbnailTooltip)

This comment has been minimized.

Copy link
@kevinsawicki

kevinsawicki Aug 7, 2016

Contributor

The method on Tray is called setToolTip so I wonder if this should be setThumbnailToolTip for consistency.

This comment has been minimized.

Copy link
@MarshallOfSound

MarshallOfSound Aug 8, 2016

Member

@kevinsawicki Was referring to capitalizing (the second T in ToolTip) "setThumbnailToolTip"

This comment has been minimized.

Copy link
@miniak

miniak Aug 8, 2016

Author Contributor

I guess it's too late... (should go to sleep already) I haven't read his comment properly :)
Renamed to setThumbnailToolTip, even though I don't like it much, as I think tooltip is a single word.

This comment has been minimized.

Copy link
@miniak

miniak Aug 8, 2016

Author Contributor

I've also just noticed that the branch name is incorrect :)

This comment has been minimized.

Copy link
@MarshallOfSound

MarshallOfSound Aug 8, 2016

Member

@miniak As is the MSDN link at the top of the PR, but what's a link and a branch name between friends 😆

@miniak miniak changed the title Add BrowserWindow.prototype.setThumbnailTooltip Add BrowserWindow.prototype.setThumbnailToolTip Aug 8, 2016

@@ -667,6 +667,12 @@ bool Window::SetThumbnailClip(const gfx::Rect& region) {
return window->taskbar_host().SetThumbnailClip(
window_->GetAcceleratedWidget(), region);
}

bool Window::SetThumbnailToolTip(const std::string& tooltip) {

This comment has been minimized.

Copy link
@zcbenz

zcbenz Aug 8, 2016

Member

We can pass const base::string16& directly here, which is more efficient than converting std::string to UTF16 later.

This comment has been minimized.

Copy link
@miniak

miniak Aug 8, 2016

Author Contributor

The other methods also take std::string, I can create another PR to refactor all of them.

This comment has been minimized.

Copy link
@zcbenz

zcbenz Aug 8, 2016

Member

👍

bool SetThumbnailClip(HWND window, const gfx::Rect& region);

// Set the tooltip for the thumbnail in taskbar.
bool setThumbnailToolTip(HWND window, const std::string& tooltip);

This comment has been minimized.

Copy link
@zcbenz

zcbenz Aug 8, 2016

Member

set => Set.

This comment has been minimized.

Copy link
@miniak

miniak Aug 8, 2016

Author Contributor

That's what happens at 3:00 AM being tired :)

@zcbenz zcbenz merged commit 872fbe8 into electron:master Aug 8, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@miniak miniak deleted the miniak:set-thumbnail-clip branch Aug 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.