X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b0ae510a86987787c7695026ffb49a69cc7e2c8b..8ca1a013e4e699724040ff1f514dab3b4a11d3c9:/src/gtk/settings.cpp diff --git a/src/gtk/settings.cpp b/src/gtk/settings.cpp index cf6f7960e5..6aefef6e3b 100644 --- a/src/gtk/settings.cpp +++ b/src/gtk/settings.cpp @@ -126,7 +126,7 @@ static bool GetColourFromGTKWidget(GdkColor& gdkColor, } } - gtk_widget_destroy( widget ); + gtk_object_sink((GtkObject*)widget); return ok; } @@ -140,14 +140,7 @@ static void GetTooltipColors() gs_objects.m_colTooltip = wxColor(c); c = tooltips->tip_window->style->fg[GTK_STATE_NORMAL]; gs_objects.m_colTooltipText = wxColor(c); -#if GTK_CHECK_VERSION(2, 9, 0) - if (gtk_check_version(2, 9, 0) == NULL) - g_object_ref_sink(tooltips); - else -#endif - { - gtk_object_sink((GtkObject*)tooltips); - } + gtk_object_sink((GtkObject*)tooltips); } wxColour wxSystemSettingsNative::GetColour( wxSystemColour index ) @@ -355,7 +348,7 @@ wxFont wxSystemSettingsNative::GetFont( wxSystemFont index ) gs_objects.m_fontSystem = wxFont(wxString::FromAscii(font_name)); g_free (font_name); } - gtk_widget_destroy( widget ); + gtk_object_sink((GtkObject*)widget); } font = gs_objects.m_fontSystem; break; @@ -516,7 +509,7 @@ int wxSystemSettingsNative::GetMetric( wxSystemMetric index, wxWindow* win ) // since that is what the API wants. But the values // are much bigger under GNOME than under Windows and // just seem to much in many cases to be useful. - // drag_threshold *= 2; + // drag_threshold *= 2; return drag_threshold;