]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
set buffer length after reading the file contents into it successfully (part of ...
[wxWidgets.git] / src / gtk / toplevel.cpp
index 7e5b251646a051d2372ad672ae8bd5431bf6f46c..24f387e3d9fd8ec738d086de39662669c45dab80 100644 (file)
@@ -426,10 +426,6 @@ static gboolean property_notify_event(
 }
 }
 
-BEGIN_EVENT_TABLE(wxTopLevelWindowGTK, wxTopLevelWindowBase)
-    EVT_SYS_COLOUR_CHANGED(wxTopLevelWindowGTK::OnSysColourChanged)
-END_EVENT_TABLE()
-
 // ----------------------------------------------------------------------------
 // wxTopLevelWindowGTK creation
 // ----------------------------------------------------------------------------
@@ -511,6 +507,8 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
             }
         }
 #endif // wxUSE_LIBHILDON/!wxUSE_LIBHILDON
+
+        g_object_ref(m_widget);
     }
 
     wxWindow *topParent = wxGetTopLevelParent(m_parent);
@@ -1100,7 +1098,7 @@ void wxTopLevelWindowGTK::SetIcons( const wxIconBundle &icons )
     // Setting icons before window is realized can cause a GTK assertion if
     // another TLW is realized before this one, and it has this one as it's
     // transient parent. The life demo exibits this problem.
-    //if (GTK_WIDGET_REALIZED(m_widget))
+    if (GTK_WIDGET_REALIZED(m_widget))
     {
         GList* list = NULL;
         for (size_t i = icons.GetIconCount(); i--;)
@@ -1360,16 +1358,3 @@ bool wxTopLevelWindowGTK::CanSetTransparent()
                            "Composite", &opcode, &event, &error);
 #endif
 }
-
-void wxTopLevelWindowGTK::OnSysColourChanged(wxSysColourChangedEvent& event)
-{
-    // We don't know the order in which top-level windows will
-    // be notified, so we need to clear the system objects
-    // for each top-level window.
-    extern void wxClearGtkSystemObjects();
-    wxClearGtkSystemObjects();
-
-    // wxWindowBase::OnSysColourChanged will propagate event
-    // to children
-    event.Skip();
-}