Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Added support of Native Menus in Linux #602

Merged
merged 13 commits into from
May 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions appshell/appshell_extensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,9 @@ class ProcessMessageDelegate : public ClientHandler::ProcessMessageDelegate {
bool enabled = argList->GetBool(2);
bool checked = argList->GetBool(3);
error = NativeMenuModel::getInstance(getMenuParent(browser)).setMenuItemState(command, enabled, checked);
if (error == NO_ERROR) {
error = SetMenuItemState(browser, command, enabled, checked);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be common code (i.e. windows, mac and win).
Isn't the menu item state being set in line 608?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually NativeMenuModel::getInstance(getMenuParent(browser)).setMenuItemState(command, enabled, checked); does not work for Linux as it only sets a flag, so I have added SetMenuState function which is meant only for Linux and for case of Windows and MAC it is No Op

}
}
} else if (message_name == "SetMenuTitle") {
// Parameters:
Expand Down
Loading