summaryrefslogtreecommitdiffstats
path: root/views/controls
diff options
context:
space:
mode:
authornsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 01:39:31 +0000
committernsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 01:39:31 +0000
commitec2191fc123ffe5208995a4f4bd3f4e350590a44 (patch)
treecd383dc958ea0d9a75c02d59ef2d54f10ee708f4 /views/controls
parent7a9ed29b2d14f043532def474448f50bd38fc029 (diff)
downloadchromium_src-ec2191fc123ffe5208995a4f4bd3f4e350590a44.zip
chromium_src-ec2191fc123ffe5208995a4f4bd3f4e350590a44.tar.gz
chromium_src-ec2191fc123ffe5208995a4f4bd3f4e350590a44.tar.bz2
Revert 28716 - Gets blocked popups to work on views/gtk. I had to fix a couple of
additional things here: . Avoid doing anything in OnSizeAllocation if the size hasn't changed. Because of how gtk works I was getting stuck in a loop if I OnSizeAllocate did anything if the size hadn't changed. . Applied similar shortcut to TabContentsViewGtk. . Made SimpleMenuModel only ask delegate for checked state if the item is a check. BUG=none TEST=none Review URL: http://codereview.chromium.org/261051 TBR=sky@chromium.org Review URL: http://codereview.chromium.org/267069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28768 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r--views/controls/menu/simple_menu_model.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/views/controls/menu/simple_menu_model.cc b/views/controls/menu/simple_menu_model.cc
index 67a9e2d..de86bce 100644
--- a/views/controls/menu/simple_menu_model.cc
+++ b/views/controls/menu/simple_menu_model.cc
@@ -103,9 +103,7 @@ bool SimpleMenuModel::GetAcceleratorAt(int index,
bool SimpleMenuModel::IsItemCheckedAt(int index) const {
if (!delegate_)
return false;
- int item_index = FlipIndex(index);
- return (items_[item_index].type == TYPE_CHECK) ?
- delegate_->IsCommandIdChecked(GetCommandIdAt(index)) : false;
+ return delegate_->IsCommandIdChecked(GetCommandIdAt(index));
}
int SimpleMenuModel::GetGroupIdAt(int index) const {