X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/865bb3251ecf83ddac350b734f4fed1d258e250b..6e204d57c44bdaaace6b0a45409c00a2af43d8ab:/src/gtk1/utilsgtk.cpp diff --git a/src/gtk1/utilsgtk.cpp b/src/gtk1/utilsgtk.cpp index 4d780162b6..56fb435d13 100644 --- a/src/gtk1/utilsgtk.cpp +++ b/src/gtk1/utilsgtk.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/gtk/utilsgtk.cpp +// Name: src/gtk1/utilsgtk.cpp // Purpose: // Author: Robert Roebling // Id: $Id$ @@ -11,11 +11,14 @@ #include "wx/wxprec.h" #include "wx/utils.h" -#include "wx/string.h" + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/intl.h" + #include "wx/log.h" +#endif #include "wx/apptrait.h" -#include "wx/intl.h" -#include "wx/log.h" #include "wx/process.h" @@ -31,9 +34,7 @@ #include "glib.h" #include "gdk/gdk.h" #include "gtk/gtk.h" -#ifndef __WXGTK20__ #include "gtk/gtkfeatures.h" -#endif #include "gdk/gdkx.h" #ifdef HAVE_X11_XKBLIB_H @@ -72,52 +73,15 @@ bool wxSetDetectableAutoRepeat( bool flag ) { Bool result; XkbSetDetectableAutoRepeat( GDK_DISPLAY(), flag, &result ); - return result; /* TRUE if keyboard hardware supports this mode */ + return result; /* true if keyboard hardware supports this mode */ } #else bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) ) { - return FALSE; + return false; } #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("&"); - break; - case _T('<'): - out << _T("<"); - break; - case _T('>'): - out << _T(">"); - break; - case _T('\''): - out << _T("'"); - break; - case _T('"'): - out << _T("""); - break; - default: - out << c; - break; - } - } - return out; -} -#endif - - // ---------------------------------------------------------------------------- // display characterstics // ---------------------------------------------------------------------------- @@ -157,7 +121,7 @@ void wxGetMousePosition( int* x, int* y ) bool wxColourDisplay() { - return TRUE; + return true; } int wxDisplayDepth() @@ -168,11 +132,7 @@ int wxDisplayDepth() wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo() { static wxToolkitInfo info; -#ifdef __WXGTK20__ - info.shortName = _T("gtk2"); -#else info.shortName = _T("gtk"); -#endif info.name = _T("wxGTK"); #ifdef __WXUNIVERSAL__ info.shortName << _T("univ"); @@ -237,4 +197,3 @@ int wxAddProcessCallback(wxEndProcessData *proc_data, int fd) return tag; } -