]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/stattext.cpp
Compile wxUIActionSimulator in wxUniv builds.
[wxWidgets.git] / src / gtk / stattext.cpp
index 7e3d81d77049e6e343a578628fc1b31f933fe491..330253262aa8bbd144947d08cbeb68a5ef829028 100644 (file)
@@ -19,8 +19,6 @@
 // wxStaticText
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxStaticText,wxControl)
-
 wxStaticText::wxStaticText()
 {
 }
@@ -72,12 +70,6 @@ bool wxStaticText::Create(wxWindow *parent,
 
     gtk_label_set_justify(GTK_LABEL(m_widget), justify);
 
-    // GTK_JUSTIFY_LEFT is 0, RIGHT 1 and CENTER 2
-    static const float labelAlignments[] = { 0.0, 1.0, 0.5 };
-    gtk_misc_set_alignment(GTK_MISC(m_widget), labelAlignments[justify], 0.0);
-
-    gtk_label_set_line_wrap( GTK_LABEL(m_widget), TRUE );
-
 #ifdef __WXGTK26__
     if (!gtk_check_version(2,6,0))
     {
@@ -94,6 +86,12 @@ bool wxStaticText::Create(wxWindow *parent,
     }
 #endif // __WXGTK26__
 
+    // GTK_JUSTIFY_LEFT is 0, RIGHT 1 and CENTER 2
+    static const float labelAlignments[] = { 0.0, 1.0, 0.5 };
+    gtk_misc_set_alignment(GTK_MISC(m_widget), labelAlignments[justify], 0.0);
+
+    gtk_label_set_line_wrap( GTK_LABEL(m_widget), TRUE );
+
     SetLabel(label);
 
     m_parent->DoAddChild( this );
@@ -232,7 +230,7 @@ void wxStaticText::DoSetLabel(const wxString& str)
 {
     // this function looks like GTKSetLabelForLabel() but here we just want to modify
     // the GTK control without altering any internal wxStaticText variable
-    
+
     const wxString labelGTK = GTKConvertMnemonics(str);
     gtk_label_set_text_with_mnemonic(GTK_LABEL(m_widget), wxGTK_CONV(labelGTK));
 }