]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/control.cpp
No real changes, just fix misspellings in comments in wxGTK code.
[wxWidgets.git] / src / gtk / control.cpp
index 7fcdb2192e06b6e965947c971b228296c6e8dcbf..24570f6afec6ee0e9580e9901b554c39722d3cbc 100644 (file)
@@ -127,12 +127,15 @@ void wxControl::GTKSetLabelForLabel(GtkLabel *w, const wxString& 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
@@ -226,9 +229,6 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget,
         return wxWindow::GetClassDefaultAttributes(wxWINDOW_VARIANT_NORMAL);
     }
 
-    if (state == -1)
-        state = GTK_STATE_NORMAL;
-
     // get the style's colours
     attr.colFg = wxColour(style->fg[state]);
     if (useBase)
@@ -242,8 +242,9 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget,
     if ( style && style->font_desc )
     {
         wxNativeFontInfo info;
-        info.description = pango_font_description_copy(style->font_desc);
+        info.description = style->font_desc;
         attr.font = wxFont(info);
+        info.description = NULL;
     }
     else
     {