summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tab_contents_container_gtk.cc
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 02:26:07 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 02:26:07 +0000
commitf3f2017007c1424a21b6cf5586c59a1fe2cf456a (patch)
tree6338100c482373f59d30aa84be517bb3cd54a58c /chrome/browser/gtk/tab_contents_container_gtk.cc
parente5380f532572a127962f40d242650d136a51d896 (diff)
downloadchromium_src-f3f2017007c1424a21b6cf5586c59a1fe2cf456a.zip
chromium_src-f3f2017007c1424a21b6cf5586c59a1fe2cf456a.tar.gz
chromium_src-f3f2017007c1424a21b6cf5586c59a1fe2cf456a.tar.bz2
Linux: fixes for tab contents switching
Previously, removing a view_ from its container destroyed it. We fix this by disabling GTK's auto reference stealing. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10440 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tab_contents_container_gtk.cc')
-rw-r--r--chrome/browser/gtk/tab_contents_container_gtk.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/gtk/tab_contents_container_gtk.cc b/chrome/browser/gtk/tab_contents_container_gtk.cc
index 46a8d42..78eeb0d 100644
--- a/chrome/browser/gtk/tab_contents_container_gtk.cc
+++ b/chrome/browser/gtk/tab_contents_container_gtk.cc
@@ -27,9 +27,8 @@ void TabContentsContainerGtk::AddContainerToBox(GtkWidget* box) {
void TabContentsContainerGtk::SetTabContents(TabContents* tab_contents) {
if (tab_contents_) {
gfx::NativeView widget = tab_contents_->GetNativeView();
- if (widget) {
+ if (widget)
gtk_container_remove(GTK_CONTAINER(vbox_), widget);
- }
tab_contents_->WasHidden();
@@ -46,6 +45,7 @@ void TabContentsContainerGtk::SetTabContents(TabContents* tab_contents) {
gfx::NativeView widget = tab_contents_->GetNativeView();
if (widget) {
gtk_box_pack_start(GTK_BOX(vbox_), widget, TRUE, TRUE, 0);
+ gtk_widget_show_all(widget);
}
}
}