aboutsummaryrefslogtreecommitdiff
path: root/src/ScreenResources.cc
diff options
context:
space:
mode:
authorakir <akir>2004-10-16 22:18:56 (GMT)
committerakir <akir>2004-10-16 22:18:56 (GMT)
commita6d4a3563c524e5fd6ee9ca18c0f5126a493108d (patch)
tree59043dd9b8cab59c427a92d070f1e82eeda5b55c /src/ScreenResources.cc
parent9fbf1ab395ec8253cf942e04145501b11a6e35f5 (diff)
downloadfluxbox_pavel-a6d4a3563c524e5fd6ee9ca18c0f5126a493108d.zip
fluxbox_pavel-a6d4a3563c524e5fd6ee9ca18c0f5126a493108d.tar.bz2
added followModel Ressources, dunno if the name is so clever, i am open for other suggestions
Diffstat (limited to 'src/ScreenResources.cc')
-rw-r--r--src/ScreenResources.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/ScreenResources.cc b/src/ScreenResources.cc
index cd5bb8d..70179b6 100644
--- a/src/ScreenResources.cc
+++ b/src/ScreenResources.cc
@@ -157,6 +157,34 @@ setFromString(char const *strval) {
157} 157}
158 158
159template<> 159template<>
160std::string FbTk::Resource<BScreen::FollowModel>::
161getString() {
162 switch (m_value) {
163 case BScreen::FOLLOW_ACTIVE_WINDOW:
164 return std::string("Follow");
165 break;
166 case BScreen::FETCH_ACTIVE_WINDOW:
167 return std::string("Current");
168 break;
169 };
170
171 return std::string("Ignore");
172}
173
174template<>
175void FbTk::Resource<BScreen::FollowModel>::
176setFromString(char const *strval) {
177 if (strcasecmp(strval, "Follow") == 0)
178 m_value = BScreen::FOLLOW_ACTIVE_WINDOW;
179 else if (strcasecmp(strval, "Current") == 0 ||
180 strcasecmp(strval, "CurrentWorkspace") == 0 ||
181 strcasecmp(strval, "Fetch") == 0)
182 m_value = BScreen::FETCH_ACTIVE_WINDOW;
183 else
184 setDefaultValue();
185}
186
187template<>
160void FbTk::Resource<FbTk::GContext::LineStyle>::setDefaultValue() { 188void FbTk::Resource<FbTk::GContext::LineStyle>::setDefaultValue() {
161 *(*this) = FbTk::GContext::LINESOLID; 189 *(*this) = FbTk::GContext::LINESOLID;
162} 190}