]> git.saurik.com Git - wxWidgets.git/commitdiff
remove extra g_object_ref() on web view widget
authorPaul Cornett <paulcor@bullseye.com>
Thu, 1 Mar 2012 16:14:27 +0000 (16:14 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Thu, 1 Mar 2012 16:14:27 +0000 (16:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/webview_webkit.cpp

index be2acc7fd8faa30525e81dadac7cfe3de25c3e50..02117610b2f0ab6a82d581da38f9c0ecdb9c74f5 100644 (file)
@@ -406,15 +406,12 @@ bool wxWebViewWebKit::Create(wxWindow *parent,
         return false;
     }
 
-    GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+    m_widget = gtk_scrolled_window_new(NULL, NULL);
+    g_object_ref(m_widget);
     web_view = webkit_web_view_new ();
-    g_object_ref(web_view); // TODO: check memory management
-
-    m_widget = scrolled_window;
-    g_object_ref(m_widget); // TODO: check memory management
 
     /* Place the WebKitWebView in the GtkScrolledWindow */
-    gtk_container_add (GTK_CONTAINER (scrolled_window), web_view);
+    gtk_container_add(GTK_CONTAINER(m_widget), web_view);
     gtk_widget_show(web_view);
 
     g_signal_connect_after(web_view, "notify::load-status",