mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Revert the CefMenuModel separator changes added in revision 747.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@749 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -167,7 +167,6 @@ struct CefMenuModelImpl::Item {
|
||||
const CefString& label,
|
||||
int group_id)
|
||||
: type_(type),
|
||||
separator_type_(MENUSEPARATORTYPE_NONE),
|
||||
command_id_(command_id),
|
||||
label_(label),
|
||||
group_id_(group_id),
|
||||
@ -183,7 +182,6 @@ struct CefMenuModelImpl::Item {
|
||||
|
||||
// Basic information.
|
||||
cef_menu_item_type_t type_;
|
||||
cef_menu_separator_type_t separator_type_;
|
||||
int command_id_;
|
||||
CefString label_;
|
||||
int group_id_;
|
||||
@ -227,17 +225,11 @@ int CefMenuModelImpl::GetCount() {
|
||||
return static_cast<int>(items_.size());
|
||||
}
|
||||
|
||||
bool CefMenuModelImpl::AddSeparator(MenuSeparatorType type) {
|
||||
bool CefMenuModelImpl::AddSeparator() {
|
||||
if (!VerifyContext())
|
||||
return false;
|
||||
|
||||
DCHECK(type != MENUSEPARATORTYPE_NONE);
|
||||
if (type == MENUSEPARATORTYPE_NONE)
|
||||
return false;
|
||||
|
||||
Item item(MENUITEMTYPE_SEPARATOR, kSeparatorId, CefString(), -1);
|
||||
item.separator_type_ = type;
|
||||
AppendItem(item);
|
||||
AppendItem(Item(MENUITEMTYPE_SEPARATOR, kSeparatorId, CefString(), -1));
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -277,17 +269,12 @@ CefRefPtr<CefMenuModel> CefMenuModelImpl::AddSubMenu(int command_id,
|
||||
return item.submenu_.get();
|
||||
}
|
||||
|
||||
bool CefMenuModelImpl::InsertSeparatorAt(int index, MenuSeparatorType type) {
|
||||
bool CefMenuModelImpl::InsertSeparatorAt(int index) {
|
||||
if (!VerifyContext())
|
||||
return false;
|
||||
|
||||
DCHECK(type != MENUSEPARATORTYPE_NONE);
|
||||
if (type == MENUSEPARATORTYPE_NONE)
|
||||
return false;
|
||||
|
||||
Item item(MENUITEMTYPE_SEPARATOR, kSeparatorId, CefString(), -1);
|
||||
item.separator_type_ = type;
|
||||
InsertItemAt(item, index);
|
||||
InsertItemAt(Item(MENUITEMTYPE_SEPARATOR, kSeparatorId, CefString(), -1),
|
||||
index);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -417,16 +404,6 @@ CefMenuModelImpl::MenuItemType CefMenuModelImpl::GetTypeAt(int index) {
|
||||
return MENUITEMTYPE_NONE;
|
||||
}
|
||||
|
||||
CefMenuModelImpl::MenuSeparatorType
|
||||
CefMenuModelImpl::GetSeparatorTypeAt(int index) {
|
||||
if (!VerifyContext())
|
||||
return MENUSEPARATORTYPE_NONE;
|
||||
|
||||
if (index >= 0 && index < static_cast<int>(items_.size()))
|
||||
return items_[index].separator_type_;
|
||||
return MENUSEPARATORTYPE_NONE;
|
||||
}
|
||||
|
||||
int CefMenuModelImpl::GetGroupId(int command_id) {
|
||||
return GetGroupIdAt(GetIndexOf(command_id));
|
||||
}
|
||||
|
Reference in New Issue
Block a user