]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/colordlg.cpp
fix the definition of many static functions marked as 'const' or functions which...
[wxWidgets.git] / src / gtk / colordlg.cpp
index 07623444a34f1fef6e45c1dd5c03516f4be83ebf..8eaca8bc7878320311e3de9064ce478d4b9846e0 100644 (file)
@@ -53,6 +53,8 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
     m_widget = gtk_color_selection_dialog_new(wxGTK_CONV(title));
 #endif // wxUSE_LIBHILDON/!wxUSE_LIBHILDON
 
+    g_object_ref(m_widget);
+
     if ( parentGTK )
     {
         gtk_window_set_transient_for(GTK_WINDOW(m_widget), parentGTK);
@@ -97,7 +99,7 @@ void wxColourDialog::ColourDataToDialog()
 
 #if wxUSE_LIBHILDON
     HildonColorSelector * const sel = HILDON_COLOR_SELECTOR(m_widget);
-    hildon_color_selector_set_color(sel, wx_const_cast(GdkColor *, col));
+    hildon_color_selector_set_color(sel, const_cast<GdkColor *>(col));
 #else // !wxUSE_LIBHILDON
     GtkColorSelection *sel =
         GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel);