]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/textctrl.cpp
Use generic collapsible pane for wxUniv based builds.
[wxWidgets.git] / src / gtk / textctrl.cpp
index 182d64038a18776ddc6f418ebdd6529a705227ff..926d11283fc8ec64183422b568afe0a7167b575a 100644 (file)
@@ -16,7 +16,6 @@
     #include "wx/intl.h"
     #include "wx/log.h"
     #include "wx/utils.h"
-    #include "wx/panel.h"
     #include "wx/settings.h"
     #include "wx/math.h"
 #endif
@@ -29,7 +28,6 @@
 #include <ctype.h>
 
 #include "wx/gtk/private.h"
-#include <gdk/gdkkeysyms.h>
 
 // ----------------------------------------------------------------------------
 // helpers
@@ -1846,7 +1844,10 @@ void wxTextCtrl::Freeze()
                               G_CALLBACK (gtk_text_exposed_callback), this);
             gtk_widget_set_sensitive(m_widget, false);
             g_object_ref(m_buffer);
-            gtk_text_view_set_buffer(GTK_TEXT_VIEW(m_text), gtk_text_buffer_new(NULL));
+            GtkTextBuffer* buf_new = gtk_text_buffer_new(NULL);
+            gtk_text_view_set_buffer(GTK_TEXT_VIEW(m_text), buf_new);
+            // gtk_text_view_set_buffer adds its own reference
+            g_object_unref(buf_new);
         }
     }
 }