X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad60f9e7b66d326505592cc6dae034cab5826f3b..74a8f67d96591cec101def2a7d47c64072aff7fd:/src/gtk/control.cpp?ds=sidebyside diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp index 4b163a3d9c..5a06a3910f 100644 --- a/src/gtk/control.cpp +++ b/src/gtk/control.cpp @@ -89,7 +89,7 @@ void wxControl::PostCreation(const wxSize& size) // GetBestSize is called. gtk_widget_ensure_style(m_widget); - ApplyWidgetStyle(); + GTKApplyWidgetStyle(); SetInitialSize(size); } @@ -123,19 +123,19 @@ void wxControl::GTKFixSensitivity(bool onlyIfUnderMouse) void wxControl::GTKSetLabelForLabel(GtkLabel *w, const wxString& label) { - // save the original label - wxControlBase::SetLabel(label); - const wxString labelGTK = GTKConvertMnemonics(label); gtk_label_set_text_with_mnemonic(w, wxGTK_CONV(labelGTK)); } +#if wxUSE_MARKUP + void wxControl::GTKSetLabelWithMarkupForLabel(GtkLabel *w, const wxString& label) { const wxString labelGTK = GTKConvertMnemonicsWithMarkup(label); gtk_label_set_markup_with_mnemonic(w, wxGTK_CONV(labelGTK)); } +#endif // wxUSE_MARKUP // ---------------------------------------------------------------------------- // GtkFrame helpers @@ -160,6 +160,8 @@ GtkWidget* wxControl::GTKCreateFrame(const wxString& label) void wxControl::GTKSetLabelForFrame(GtkFrame *w, const wxString& label) { + wxControlBase::SetLabel(label); + GtkLabel* labelwidget = GTK_LABEL(gtk_frame_get_label_widget(w)); GTKSetLabelForLabel(labelwidget, label); } @@ -314,22 +316,4 @@ wxControl::GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t widget_new, return attr; } -// ---------------------------------------------------------------------------- -// idle handling -// ---------------------------------------------------------------------------- - -void wxControl::OnInternalIdle() -{ - if ( GtkShowFromOnIdle() ) - return; - - if ( GTK_WIDGET_REALIZED(m_widget) ) - { - GTKUpdateCursor(); - } - - if ( wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen() ) - UpdateWindowUI(wxUPDATE_UI_FROMIDLE); -} - #endif // wxUSE_CONTROLS