X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe8635a7e78715344f0f4b6abc9d797931429333..fc5d9e38ee002c024be3019e37b63f1a1d88e7c2:/src/gtk/gauge.cpp diff --git a/src/gtk/gauge.cpp b/src/gtk/gauge.cpp index e0b4b49010..2d29922938 100644 --- a/src/gtk/gauge.cpp +++ b/src/gtk/gauge.cpp @@ -31,8 +31,6 @@ bool wxGauge::Create( wxWindow *parent, const wxValidator& validator, const wxString& name ) { - m_needParent = true; - if (!PreCreation( parent, pos, size ) || !CreateBase( parent, id, pos, size, style, validator, name )) { @@ -43,6 +41,7 @@ bool wxGauge::Create( wxWindow *parent, m_rangeMax = range; m_widget = gtk_progress_bar_new(); + g_object_ref(m_widget); if ( style & wxGA_VERTICAL ) { gtk_progress_bar_set_orientation( GTK_PROGRESS_BAR(m_widget), @@ -55,7 +54,7 @@ bool wxGauge::Create( wxWindow *parent, m_parent->DoAddChild( this ); PostCreation(size); - SetBestSize(size); + SetInitialSize(size); return true; }