/[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 2325 by persson, Sun Mar 4 09:01:40 2012 UTC revision 2507 by persson, Sun Jan 12 19:37:55 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 47  Line 72 
72  #endif  #endif
73    
74    
75    // 2.24
76    
77    #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 24) || GTKMM_MAJOR_VERSION < 2
78    #define get_first_cell() get_first_cell_renderer()
79    #endif
80    
81    
82  // 3.0  // 3.0
83    
84  #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2  #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2

Legend:
Removed from v.2325  
changed lines
  Added in v.2507

  ViewVC Help
Powered by ViewVC