Fix more API changes due to name changes
This commit is contained in:
parent
50e3bfa764
commit
6be10ffef2
16 changed files with 30 additions and 30 deletions
|
@ -225,7 +225,7 @@ void GlobalMenuBarX11::BuildMenuFromModel(AtomMenuModel* model,
|
|||
menuitem_property_set_bool(item, kPropertyVisible, model->IsVisibleAt(i));
|
||||
|
||||
AtomMenuModel::ItemType type = model->GetTypeAt(i);
|
||||
if (type == AtomMenuModel::Type::SEPARATOR) {
|
||||
if (type == AtomMenuModel::TYPE_SEPARATOR) {
|
||||
menuitem_property_set(item, kPropertyType, kTypeSeparator);
|
||||
} else {
|
||||
std::string label = ui::ConvertAcceleratorsFromWindowsStyle(
|
||||
|
@ -236,7 +236,7 @@ void GlobalMenuBarX11::BuildMenuFromModel(AtomMenuModel* model,
|
|||
g_object_set_data(G_OBJECT(item), "model", model);
|
||||
SetMenuItemID(item, i);
|
||||
|
||||
if (type == AtomMenuModel::Type::SUBMENU) {
|
||||
if (type == AtomMenuModel::TYPE_SUBMENU) {
|
||||
menuitem_property_set(item, kPropertyChildrenDisplay, kDisplaySubmenu);
|
||||
g_signal_connect(item, "about-to-show",
|
||||
G_CALLBACK(OnSubMenuShowThunk), this);
|
||||
|
@ -248,10 +248,10 @@ void GlobalMenuBarX11::BuildMenuFromModel(AtomMenuModel* model,
|
|||
g_signal_connect(item, "item-activated",
|
||||
G_CALLBACK(OnItemActivatedThunk), this);
|
||||
|
||||
if (type == AtomMenuModel::Type::CHECK ||
|
||||
type == AtomMenuModel::Type::RADIO) {
|
||||
if (type == AtomMenuModel::TYPE_CHECK ||
|
||||
type == AtomMenuModel::TYPE_RADIO) {
|
||||
menuitem_property_set(item, kPropertyToggleType,
|
||||
type == AtomMenuModel::Type::CHECK ? kToggleCheck : kToggleRadio);
|
||||
type == AtomMenuModel::TYPE_CHECK ? kToggleCheck : kToggleRadio);
|
||||
menuitem_property_set_int(item, kPropertyToggleState,
|
||||
model->IsItemCheckedAt(i));
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ bool MenuBar::GetMenuButtonFromScreenPoint(const gfx::Point& point,
|
|||
for (int i = 0; i < child_count(); ++i) {
|
||||
views::View* view = child_at(i);
|
||||
if (view->bounds().Contains(location) &&
|
||||
(menu_model_->GetTypeAt(i) == AtomMenuModel::Type::SUBMENU)) {
|
||||
(menu_model_->GetTypeAt(i) == AtomMenuModel::TYPE_SUBMENU)) {
|
||||
*menu_model = menu_model_->GetSubmenuModelAt(i);
|
||||
*button = static_cast<views::MenuButton*>(view);
|
||||
return true;
|
||||
|
@ -148,7 +148,7 @@ void MenuBar::OnMenuButtonClicked(views::MenuButton* source,
|
|||
|
||||
int id = source->tag();
|
||||
AtomMenuModel::ItemType type = menu_model_->GetTypeAt(id);
|
||||
if (type != AtomMenuModel::Type::SUBMENU) {
|
||||
if (type != AtomMenuModel::TYPE_SUBMENU) {
|
||||
menu_model_->ActivatedAt(id, 0);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue