summaryrefslogtreecommitdiffstats
path: root/views/controls/native_control_gtk.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-20 20:56:11 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-20 20:56:11 +0000
commit893160d54cb5b2c1c68d3b69ec8ebc9b25b68b82 (patch)
tree0f29c1776a2f34f06ba60ba53a20691d261b6366 /views/controls/native_control_gtk.cc
parent22332192088e1e897d02a4bc7a2983e3864ab3b6 (diff)
downloadchromium_src-893160d54cb5b2c1c68d3b69ec8ebc9b25b68b82.zip
chromium_src-893160d54cb5b2c1c68d3b69ec8ebc9b25b68b82.tar.gz
chromium_src-893160d54cb5b2c1c68d3b69ec8ebc9b25b68b82.tar.bz2
Minor gtk-views cleanup:
. Makes closing widget work. . Makes clicking button send action. . Fixes ownership of native controls. BUG=none TEST=none Review URL: http://codereview.chromium.org/113657 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/native_control_gtk.cc')
-rw-r--r--views/controls/native_control_gtk.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/views/controls/native_control_gtk.cc b/views/controls/native_control_gtk.cc
index 3cf6438..ad7382f 100644
--- a/views/controls/native_control_gtk.cc
+++ b/views/controls/native_control_gtk.cc
@@ -10,13 +10,12 @@
namespace views {
-static const char* kNativeControlGtkKey = "__NATIVE_CONTROL_GTK__";
-
NativeControlGtk::NativeControlGtk() {
}
NativeControlGtk::~NativeControlGtk() {
- DCHECK(!native_view());
+ if (native_view())
+ gtk_widget_destroy(native_view());
}
////////////////////////////////////////////////////////////////////////////////
@@ -58,9 +57,6 @@ void NativeControlGtk::Focus() {
}
void NativeControlGtk::NativeControlCreated(GtkWidget* native_control) {
- // Adds a mapping between the GtkWidget and us.
- g_object_set_data(G_OBJECT(native_control), kNativeControlGtkKey, this);
-
Attach(native_control);
// Update the newly created GtkWdigetwith any resident enabled state.