Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1179)

Side by Side Diff: chrome/browser/gtk/tabs/tab_strip_gtk.cc

Issue 502073: Revert 34954 - Fix issue 11258: Linux: gracefully handle small browser window... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/gtk/tabs/tab_strip_gtk.h" 5 #include "chrome/browser/gtk/tabs/tab_strip_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/gtk_dnd_util.h" 9 #include "app/gtk_dnd_util.h"
10 #include "app/gfx/canvas_paint.h" 10 #include "app/gfx/canvas_paint.h"
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 // Make sure we unhook ourselves as a message loop observer so that we don't 704 // Make sure we unhook ourselves as a message loop observer so that we don't
705 // crash in the case where the user closes the last tab in a window. 705 // crash in the case where the user closes the last tab in a window.
706 RemoveMessageLoopObserver(); 706 RemoveMessageLoopObserver();
707 } 707 }
708 708
709 void TabStripGtk::Init() { 709 void TabStripGtk::Init() {
710 model_->AddObserver(this); 710 model_->AddObserver(this);
711 711
712 tabstrip_.Own(gtk_fixed_new()); 712 tabstrip_.Own(gtk_fixed_new());
713 ViewIDUtil::SetID(tabstrip_.get(), VIEW_ID_TAB_STRIP); 713 ViewIDUtil::SetID(tabstrip_.get(), VIEW_ID_TAB_STRIP);
714 // We want the tab strip to be horizontally shrinkable, so that the Chrome 714 gtk_widget_set_size_request(tabstrip_.get(), -1,
715 // window can be resized freely.
716 gtk_widget_set_size_request(tabstrip_.get(), 0,
717 TabGtk::GetMinimumUnselectedSize().height()); 715 TabGtk::GetMinimumUnselectedSize().height());
718 gtk_widget_set_app_paintable(tabstrip_.get(), TRUE); 716 gtk_widget_set_app_paintable(tabstrip_.get(), TRUE);
719 gtk_drag_dest_set(tabstrip_.get(), GTK_DEST_DEFAULT_ALL, 717 gtk_drag_dest_set(tabstrip_.get(), GTK_DEST_DEFAULT_ALL,
720 NULL, 0, 718 NULL, 0,
721 static_cast<GdkDragAction>( 719 static_cast<GdkDragAction>(
722 GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK)); 720 GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK));
723 static const int targets[] = { GtkDndUtil::TEXT_URI_LIST, -1 }; 721 static const int targets[] = { GtkDndUtil::TEXT_URI_LIST, -1 };
724 GtkDndUtil::SetDestTargetList(tabstrip_.get(), targets); 722 GtkDndUtil::SetDestTargetList(tabstrip_.get(), targets);
725 723
726 g_signal_connect(G_OBJECT(tabstrip_.get()), "expose-event", 724 g_signal_connect(G_OBJECT(tabstrip_.get()), "expose-event",
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 2040
2043 // Let the middle mouse button initiate clicks as well. 2041 // Let the middle mouse button initiate clicks as well.
2044 gtk_util::SetButtonTriggersNavigation(button->widget()); 2042 gtk_util::SetButtonTriggersNavigation(button->widget());
2045 g_signal_connect(G_OBJECT(button->widget()), "clicked", 2043 g_signal_connect(G_OBJECT(button->widget()), "clicked",
2046 G_CALLBACK(OnNewTabClicked), this); 2044 G_CALLBACK(OnNewTabClicked), this);
2047 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS); 2045 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS);
2048 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0); 2046 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0);
2049 2047
2050 return button; 2048 return button;
2051 } 2049 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/tab_contents_container_gtk.cc ('k') | chrome/browser/tab_contents/tab_contents_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698