X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c85a79963da3c3c9b58c306b3408bf4ac86eec7d..2bc4cc1ead29f6de1f0576a416025edadb13d7cc:/src/gtk/spinctrl.cpp diff --git a/src/gtk/spinctrl.cpp b/src/gtk/spinctrl.cpp index d84c02d39d..f35eca8445 100644 --- a/src/gtk/spinctrl.cpp +++ b/src/gtk/spinctrl.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/gtk/spinbutt.cpp +// Name: src/gtk/spinctrl.cpp // Purpose: wxSpinCtrl // Author: Robert // Modified by: @@ -152,12 +152,14 @@ double wxSpinCtrlGTKBase::DoGetValue() const g_signal_emit(m_widget, sig_id, 0, &value, &handled); if (!handled) value = g_strtod(gtk_entry_get_text(GTK_ENTRY(m_widget)), NULL); - const GtkAdjustment* adj = + GtkAdjustment* adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(m_widget)); - if (value < adj->lower) - value = adj->lower; - else if (value > adj->upper) - value = adj->upper; + const double lower = gtk_adjustment_get_lower(adj); + const double upper = gtk_adjustment_get_upper(adj); + if (value < lower) + value = lower; + else if (value > upper) + value = upper; return value; } @@ -297,7 +299,7 @@ void wxSpinCtrlGTKBase::OnChar( wxKeyEvent &event ) GtkWindow *window = GTK_WINDOW(top_frame->m_widget); if ( window ) { - GtkWidget *widgetDef = window->default_widget; + GtkWidget* widgetDef = gtk_window_get_default_widget(window); if ( widgetDef ) { @@ -352,8 +354,6 @@ wxSpinCtrlGTKBase::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) // wxSpinCtrl //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxSpinCtrlGTKBase) - //----------------------------------------------------------------------------- // wxSpinCtrlDouble //-----------------------------------------------------------------------------