]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/control.cpp
Change wxNotebook selection before sending page changed event in wxMSW.
[wxWidgets.git] / src / gtk / control.cpp
index f69a1dddf326115c530353c81973ee9ce9e0debe..5a06a3910f43dfd0af92e470d8ffe58df00eb0ea 100644 (file)
@@ -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