diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/label.cc | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | views/window/dialog_client_view.cc | 8 | ||||
-rw-r--r-- | views/window/window_gtk.cc | 5 | ||||
-rw-r--r-- | views/window/window_gtk.h | 2 |
4 files changed, 15 insertions, 8 deletions
diff --git a/views/controls/label.cc b/views/controls/label.cc index 6e9a360..6da6c48 100644 --- a/views/controls/label.cc +++ b/views/controls/label.cc @@ -100,6 +100,14 @@ gfx::Size Label::GetPreferredSize() { int Label::ComputeMultiLineFlags() { int flags = gfx::Canvas::MULTI_LINE; + #if !defined(OS_WIN) + // Don't ellide multiline labels on Linux. + // Todo(davemoore): Do we depend on elliding multiline text? + // Pango insists on limiting the number of lines to one if text is + // ellided. You can get around this if you can pass a maximum height + // but we don't currently have that data when we call the pango code. + flags |= gfx::Canvas::NO_ELLIPSIS; + #endif if (allow_character_break_) flags |= gfx::Canvas::CHARACTER_BREAK; switch (horiz_alignment_) { diff --git a/views/window/dialog_client_view.cc b/views/window/dialog_client_view.cc index 40355d4..64c4677 100644..100755 --- a/views/window/dialog_client_view.cc +++ b/views/window/dialog_client_view.cc @@ -251,14 +251,10 @@ bool DialogClientView::CanClose() const { } void DialogClientView::WindowClosing() { -#if defined(OS_WIN) FocusManager* focus_manager = GetFocusManager(); DCHECK(focus_manager); if (focus_manager) focus_manager->RemoveFocusChangeListener(this); -#else - NOTIMPLEMENTED(); -#endif ClientView::WindowClosing(); } @@ -306,16 +302,12 @@ void DialogClientView::ViewHierarchyChanged(bool is_add, View* parent, ShowDialogButtons(); ClientView::ViewHierarchyChanged(is_add, parent, child); -#if defined(OS_WIN) FocusManager* focus_manager = GetFocusManager(); // Listen for focus change events so we can update the default button. DCHECK(focus_manager); // bug #1291225: crash reports seem to indicate it // can be NULL. if (focus_manager) focus_manager->AddFocusChangeListener(this); -#else - NOTIMPLEMENTED(); -#endif // The "extra view" must be created and installed after the contents view // has been inserted into the view hierarchy. diff --git a/views/window/window_gtk.cc b/views/window/window_gtk.cc index a3a3192..c17df87 100644 --- a/views/window/window_gtk.cc +++ b/views/window/window_gtk.cc @@ -451,4 +451,9 @@ void WindowGtk::SizeWindowToDefault(GtkWindow* parent) { SetBounds(bounds, NULL); } +void WindowGtk::OnDestroy() { + non_client_view_->WindowClosing(); + WidgetGtk::OnDestroy(); +} + } // namespace views diff --git a/views/window/window_gtk.h b/views/window/window_gtk.h index f7fffc7..7829e28 100644 --- a/views/window/window_gtk.h +++ b/views/window/window_gtk.h @@ -78,6 +78,8 @@ class WindowGtk : public WidgetGtk, public Window { // Initializes the window to the passed in bounds. void Init(GtkWindow* parent, const gfx::Rect& bounds); + virtual void OnDestroy(); + private: static gboolean CallConfigureEvent(GtkWidget* widget, GdkEventConfigure* event, |