diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/menu/simple_menu_model.cc | 4 | ||||
-rw-r--r-- | views/widget/widget_gtk.cc | 9 | ||||
-rw-r--r-- | views/widget/widget_gtk.h | 7 |
3 files changed, 1 insertions, 19 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 { diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc index 51140a6..cc0aec9 100644 --- a/views/widget/widget_gtk.cc +++ b/views/widget/widget_gtk.cc @@ -628,15 +628,6 @@ void WidgetGtk::CreateGtkWidget(GtkWidget* parent, const gfx::Rect& bounds) { } void WidgetGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) { - // See comment next to size_ as to why we do this. Also note, it's tempting - // to put this in the static method so subclasses don't need to worry about - // it, but if a subclasses needs to set a shape then they need to always - // reset the shape in this method regardless of whether the size changed. - gfx::Size new_size(allocation->width, allocation->height); - if (new_size == size_) - return; - - size_ = new_size; root_view_->SetBounds(0, 0, allocation->width, allocation->height); root_view_->SchedulePaint(); } diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h index e082eea..ccd3bd5 100644 --- a/views/widget/widget_gtk.h +++ b/views/widget/widget_gtk.h @@ -8,7 +8,6 @@ #include <gtk/gtk.h> #include "app/active_window_watcher_x.h" -#include "base/gfx/size.h" #include "base/message_loop.h" #include "views/focus/focus_manager.h" #include "views/widget/widget.h" @@ -414,12 +413,6 @@ class WidgetGtk // See make_transient_to_parent for a description. bool transient_to_parent_; - // Last size supplied to OnSizeAllocate. We cache this as any time the - // size of a GtkWidget changes size_allocate is called, even if the size - // didn't change. If we didn't cache this and ignore calls when the size - // hasn't changed, we can end up getting stuck in a never ending loop. - gfx::Size size_; - DISALLOW_COPY_AND_ASSIGN(WidgetGtk); }; |