diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-06 23:33:08 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-06 23:33:08 +0000 |
commit | 3dda0dcf7d4856d598a2a0e7553e71dbd59134eb (patch) | |
tree | a9f2f93ce239ff603b05f900e34fa6a2a460227b /base | |
parent | ae0f44dd31b81be0d9e0ef5d4478e0ef5ca2805d (diff) | |
download | chromium_src-3dda0dcf7d4856d598a2a0e7553e71dbd59134eb.zip chromium_src-3dda0dcf7d4856d598a2a0e7553e71dbd59134eb.tar.gz chromium_src-3dda0dcf7d4856d598a2a0e7553e71dbd59134eb.tar.bz2 |
Basic infobars on linux.
All infobars consist of nothing but a non-functioning close button.
Review URL: http://codereview.chromium.org/62070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13206 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rwxr-xr-x | base/gfx/gtk_util.cc | 13 | ||||
-rwxr-xr-x | base/gfx/gtk_util.h | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/base/gfx/gtk_util.cc b/base/gfx/gtk_util.cc index 1b0fc31..ba93c34 100755 --- a/base/gfx/gtk_util.cc +++ b/base/gfx/gtk_util.cc @@ -10,6 +10,15 @@ #include "base/gfx/rect.h" #include "skia/include/SkBitmap.h" +namespace { + +// Callback used in RemoveAllChildren. +void RemoveWidget(GtkWidget* widget, gpointer container) { + gtk_container_remove(GTK_CONTAINER(container), widget); +} + +} // namespace + namespace gfx { const GdkColor kGdkWhite = GDK_COLOR_RGB(0xff, 0xff, 0xff); @@ -79,4 +88,8 @@ GtkWidget* CreateGtkBorderBin(GtkWidget* child, const GdkColor* color, return ebox; } +void RemoveAllChildren(GtkWidget* container) { + gtk_container_foreach(GTK_CONTAINER(container), RemoveWidget, container); +} + } // namespace gfx diff --git a/base/gfx/gtk_util.h b/base/gfx/gtk_util.h index 6407554..6a6cdd6 100755 --- a/base/gfx/gtk_util.h +++ b/base/gfx/gtk_util.h @@ -39,6 +39,9 @@ GdkPixbuf* GdkPixbufFromSkBitmap(const SkBitmap* bitmap); GtkWidget* CreateGtkBorderBin(GtkWidget* child, const GdkColor* color, int top, int bottom, int left, int right); +// Remove all children from this container. +void RemoveAllChildren(GtkWidget* container); + } // namespace gfx #endif // BASE_GFX_GTK_UTIL_H_ |