]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/utilsgtk.cpp
add a outside area for borders and focus rects of 3 pixels to a wxWindowDC's clip...
[wxWidgets.git] / src / gtk1 / utilsgtk.cpp
index 39bd7eaa5718cee6b37914b715b0d021c8552c6f..e76e3187f3a7eaa9abbad1e279097c06f6a2db73 100644 (file)
@@ -81,6 +81,43 @@ bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) )
 }
 #endif
 
+#ifdef __WXGTK20__
+// Escapes string so that it is valid Pango markup XML string:
+wxString wxEscapeStringForPangoMarkup(const wxString& str)
+{
+    size_t len = str.length();
+    wxString out;
+    out.Alloc(len);
+    for (size_t i = 0; i < len; i++)
+    {
+        wxChar c = str[i];
+        switch (c)
+        {
+            case _T('&'):
+                out << _T("&amp;");
+                break;
+            case _T('<'):
+                out << _T("&lt;");
+                break;
+            case _T('>'):
+                out << _T("&gt;");
+                break;
+            case _T('\''):
+                out << _T("&apos;");
+                break;
+            case _T('"'):
+                out << _T("&quot;");
+                break;
+            default:
+                out << c;
+                break;
+        }
+    }
+    return out;
+}
+#endif
+
+
 // ----------------------------------------------------------------------------
 // display characterstics
 // ----------------------------------------------------------------------------
@@ -141,8 +178,8 @@ wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo()
     info.shortName << _T("univ");
     info.name << _T("/wxUniversal");
 #endif
-    info.versionMajor = GTK_MAJOR_VERSION;
-    info.versionMinor = GTK_MINOR_VERSION;
+    info.versionMajor = gtk_major_version;
+    info.versionMinor = gtk_minor_version;
     info.os = wxGTK;
     return info;
 }