/[svn]/gigedit/trunk/src/gigedit/global.h
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/global.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3150 by schoenebeck, Tue Apr 25 20:45:54 2017 UTC revision 3151 by schoenebeck, Fri May 5 18:44:59 2017 UTC
# Line 24  Line 24 
24  # include <config.h>  # include <config.h>
25  #endif  #endif
26    
27    #include <cstring>
28    
29    #include <glibmmconfig.h>
30    // threads.h must be included first to be able to build with
31    // G_DISABLE_DEPRECATED
32    #if (GLIBMM_MAJOR_VERSION == 2 && GLIBMM_MINOR_VERSION == 31 && GLIBMM_MICRO_VERSION >= 2) || \
33        (GLIBMM_MAJOR_VERSION == 2 && GLIBMM_MINOR_VERSION > 31) || GLIBMM_MAJOR_VERSION > 2
34    #include <glibmm/threads.h>
35    #endif
36    
37  #if !defined(WIN32)  #if !defined(WIN32)
38  # include <unistd.h>  # include <unistd.h>
39  # include <errno.h>  # include <errno.h>
# Line 76  Line 86 
86  # define GDK_KEY_Down 0xff54  # define GDK_KEY_Down 0xff54
87  #endif  #endif
88    
89    #include <glibmm/convert.h>
90    
91    #define GIG_STR_ENCODING "CP1252"
92    
93    static inline
94    Glib::ustring gig_to_utf8(const gig::String& gig_string) {
95        return Glib::convert_with_fallback(gig_string, "UTF-8", GIG_STR_ENCODING, "?");
96    }
97    
98    static inline
99    gig::String gig_from_utf8(const Glib::ustring& utf8_string) {
100        return Glib::convert_with_fallback(utf8_string, GIG_STR_ENCODING, "UTF-8", "?");
101    }
102    
103  template<class T> inline std::string ToString(T o) {  template<class T> inline std::string ToString(T o) {
104      std::stringstream ss;      std::stringstream ss;
105      ss << o;      ss << o;

Legend:
Removed from v.3150  
changed lines
  Added in v.3151

  ViewVC Help
Powered by ViewVC