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

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

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

revision 2170 by persson, Sun Mar 6 07:52:43 2011 UTC revision 2579 by persson, Sat May 24 06:44:39 2014 UTC
# Line 1  Line 1 
1  /*                                                         -*- c++ -*-  /*                                                         -*- c++ -*-
2   * Copyright (C) 2011 Andreas Persson   * Copyright (C) 2011-2014 Andreas Persson
3   *   *
4   * This program is free software; you can redistribute it and/or   * This program is free software; you can redistribute it and/or
5   * modify it under the terms of the GNU General Public License as   * modify it under the terms of the GNU General Public License as
# Line 31  Line 31 
31  #endif  #endif
32    
33    
34    // 2.12
35    
36    #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 12) || GTKMM_MAJOR_VERSION < 2
37    #include <gtkmm/cellrenderertext.h>
38    namespace Gtk {
39        // this is not a real spin cell renderer, instead it's just text,
40        // extended with a property for storing an adjustment
41        class CellRendererSpin : public CellRendererText {
42        private:
43            Adjustment* adj;
44            struct Proxy {
45                Adjustment*& adj;
46                Proxy(Adjustment*& adj) : adj(adj) { }
47                const Adjustment* get_value() const { return adj; }
48                void operator=(Adjustment* x) { adj = x; }
49            };
50        public:
51            Proxy property_adjustment() const {
52                return const_cast<Adjustment*&>(adj);
53            }
54        };
55    }
56    #endif
57    
58    
59  // 2.18  // 2.18
60    
61  #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 18) || GTKMM_MAJOR_VERSION < 2  #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 18) || GTKMM_MAJOR_VERSION < 2
# Line 44  Line 69 
69  #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION == 21 && GTKMM_MICRO_VERSION < 9) || \  #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION == 21 && GTKMM_MICRO_VERSION < 9) || \
70      (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 21) || GTKMM_MAJOR_VERSION < 2      (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 21) || GTKMM_MAJOR_VERSION < 2
71  #define ALIGN_START ALIGN_LEFT  #define ALIGN_START ALIGN_LEFT
72    #define ALIGN_END ALIGN_RIGHT
73    #endif
74    
75    
76    // 2.24
77    
78    #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 24) || GTKMM_MAJOR_VERSION < 2
79    #define get_first_cell() get_first_cell_renderer()
80  #endif  #endif
81    
82    
# Line 63  namespace Gdk { Line 96  namespace Gdk {
96  }  }
97  #endif  #endif
98    
99    
100    // glibmm 2.31.2
101    
102    #if (GLIBMM_MAJOR_VERSION == 2 && GLIBMM_MINOR_VERSION == 31 && GLIBMM_MICRO_VERSION < 2) || \
103        (GLIBMM_MAJOR_VERSION == 2 && GLIBMM_MINOR_VERSION < 31) || GLIBMM_MAJOR_VERSION < 2
104    
105    namespace Glib {
106        namespace Threads {
107            using Glib::Thread;
108            using Glib::Mutex;
109            using Glib::Cond;
110        }
111    }
112    
113    #define OLD_THREADS
114    
115    #endif
116    
117  #endif  #endif

Legend:
Removed from v.2170  
changed lines
  Added in v.2579

  ViewVC Help
Powered by ViewVC