diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2011-03-23 11:02:15 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2011-03-23 11:02:15 (GMT) |
commit | e850b0191977da47eb7233e248dbab7ebd1d21f0 (patch) | |
tree | d3a3e33f1d4524147ddaa2b6b21e05bd142fc367 /src/Layer.hh | |
parent | 7ece90ad4f360b3cf11e46a00d4c1ec5b60213e9 (diff) | |
download | fluxbox-e850b0191977da47eb7233e248dbab7ebd1d21f0.zip fluxbox-e850b0191977da47eb7233e248dbab7ebd1d21f0.tar.bz2 |
compile fix: sunCC 5.11 (sunstudio 12) compiles and links again
biggest change: renaming of 'class Layer' to 'class ResourceLayer' in
Layer.hh to handle complaints about 'ambiguous Layer: Layer or FbTk::Layer'.
'ResourceLayer' sounds crappy, but that was the best I could come
up with right now.
Diffstat (limited to 'src/Layer.hh')
-rw-r--r-- | src/Layer.hh | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/Layer.hh b/src/Layer.hh index 9aaca0a..ac4102b 100644 --- a/src/Layer.hh +++ b/src/Layer.hh | |||
@@ -19,8 +19,8 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | #ifndef LAYER_HH | 22 | #ifndef RESOURCE_LAYER_HH |
23 | #define LAYER_HH | 23 | #define RESOURCE_LAYER_HH |
24 | 24 | ||
25 | #include "FbTk/StringUtil.hh" | 25 | #include "FbTk/StringUtil.hh" |
26 | 26 | ||
@@ -30,7 +30,7 @@ | |||
30 | * we have a special resource type because we need to be able to name certain layers | 30 | * we have a special resource type because we need to be able to name certain layers |
31 | * a Resource<int> wouldn't allow this | 31 | * a Resource<int> wouldn't allow this |
32 | */ | 32 | */ |
33 | class Layer { | 33 | class ResourceLayer { |
34 | public: | 34 | public: |
35 | enum { | 35 | enum { |
36 | MENU = 0, | 36 | MENU = 0, |
@@ -43,7 +43,7 @@ public: | |||
43 | NUM_LAYERS = 13 | 43 | NUM_LAYERS = 13 |
44 | }; | 44 | }; |
45 | 45 | ||
46 | explicit Layer(int i) : m_num(i) {}; | 46 | explicit ResourceLayer(int i) : m_num(i) {}; |
47 | 47 | ||
48 | static int getNumFromString(const std::string &str) { | 48 | static int getNumFromString(const std::string &str) { |
49 | int tempnum = 0; | 49 | int tempnum = 0; |
@@ -51,37 +51,37 @@ public: | |||
51 | if (FbTk::StringUtil::extractNumber(str, tempnum)) | 51 | if (FbTk::StringUtil::extractNumber(str, tempnum)) |
52 | return tempnum; | 52 | return tempnum; |
53 | if (v == "menu") | 53 | if (v == "menu") |
54 | return ::Layer::MENU; | 54 | return ::ResourceLayer::MENU; |
55 | if (v == "abovedock") | 55 | if (v == "abovedock") |
56 | return ::Layer::ABOVE_DOCK; | 56 | return ::ResourceLayer::ABOVE_DOCK; |
57 | if (v == "dock") | 57 | if (v == "dock") |
58 | return ::Layer::DOCK; | 58 | return ::ResourceLayer::DOCK; |
59 | if (v == "top") | 59 | if (v == "top") |
60 | return ::Layer::TOP; | 60 | return ::ResourceLayer::TOP; |
61 | if (v == "normal") | 61 | if (v == "normal") |
62 | return ::Layer::NORMAL; | 62 | return ::ResourceLayer::NORMAL; |
63 | if (v == "bottom") | 63 | if (v == "bottom") |
64 | return ::Layer::BOTTOM; | 64 | return ::ResourceLayer::BOTTOM; |
65 | if (v == "desktop") | 65 | if (v == "desktop") |
66 | return ::Layer::DESKTOP; | 66 | return ::ResourceLayer::DESKTOP; |
67 | return -1; | 67 | return -1; |
68 | } | 68 | } |
69 | 69 | ||
70 | static std::string getString(int num) { | 70 | static std::string getString(int num) { |
71 | switch (num) { | 71 | switch (num) { |
72 | case ::Layer::MENU: | 72 | case ::ResourceLayer::MENU: |
73 | return std::string("Menu"); | 73 | return std::string("Menu"); |
74 | case ::Layer::ABOVE_DOCK: | 74 | case ::ResourceLayer::ABOVE_DOCK: |
75 | return std::string("AboveDock"); | 75 | return std::string("AboveDock"); |
76 | case ::Layer::DOCK: | 76 | case ::ResourceLayer::DOCK: |
77 | return std::string("Dock"); | 77 | return std::string("Dock"); |
78 | case ::Layer::TOP: | 78 | case ::ResourceLayer::TOP: |
79 | return std::string("Top"); | 79 | return std::string("Top"); |
80 | case ::Layer::NORMAL: | 80 | case ::ResourceLayer::NORMAL: |
81 | return std::string("Normal"); | 81 | return std::string("Normal"); |
82 | case ::Layer::BOTTOM: | 82 | case ::ResourceLayer::BOTTOM: |
83 | return std::string("Bottom"); | 83 | return std::string("Bottom"); |
84 | case ::Layer::DESKTOP: | 84 | case ::ResourceLayer::DESKTOP: |
85 | return std::string("Desktop"); | 85 | return std::string("Desktop"); |
86 | default: | 86 | default: |
87 | return FbTk::StringUtil::number2String(num); | 87 | return FbTk::StringUtil::number2String(num); |
@@ -91,10 +91,10 @@ public: | |||
91 | int getNum() const { return m_num; } | 91 | int getNum() const { return m_num; } |
92 | std::string getString() const { return getString(m_num); } | 92 | std::string getString() const { return getString(m_num); } |
93 | 93 | ||
94 | Layer &operator=(int num) { m_num = num; return *this; } | 94 | ResourceLayer &operator=(int num) { m_num = num; return *this; } |
95 | 95 | ||
96 | private: | 96 | private: |
97 | int m_num; | 97 | int m_num; |
98 | }; | 98 | }; |
99 | 99 | ||
100 | #endif // LAYER_HH | 100 | #endif // RESOURCE_LAYER_HH |