]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/utilsgtk.cpp
check default library directories in WX_PATH_FIND_LIBRARIES; do *not* add default...
[wxWidgets.git] / src / gtk1 / utilsgtk.cpp
index cef8dbe54e4c67a2000bf062b6a8dee8cd199b1a..4d780162b65bcf16c34789b9fbdb8c0adfb60e0d 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
 // ----------------------------------------------------------------------------
@@ -157,7 +194,8 @@ wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
 // subprocess routines
 // ----------------------------------------------------------------------------
 
-extern "C"
+extern "C" {
+static
 void GTK_EndProcessDetector(gpointer data, gint source,
                             GdkInputCondition WXUNUSED(condition) )
 {
@@ -188,6 +226,7 @@ void GTK_EndProcessDetector(gpointer data, gint source,
 
    wxHandleProcessTermination(proc_data);
 }
+}
 
 int wxAddProcessCallback(wxEndProcessData *proc_data, int fd)
 {