diff options
author | akir <akir> | 2004-10-16 22:18:56 (GMT) |
---|---|---|
committer | akir <akir> | 2004-10-16 22:18:56 (GMT) |
commit | a6d4a3563c524e5fd6ee9ca18c0f5126a493108d (patch) | |
tree | 59043dd9b8cab59c427a92d070f1e82eeda5b55c /src/ScreenResources.cc | |
parent | 9fbf1ab395ec8253cf942e04145501b11a6e35f5 (diff) | |
download | fluxbox_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.cc | 28 |
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 | ||
159 | template<> | 159 | template<> |
160 | std::string FbTk::Resource<BScreen::FollowModel>:: | ||
161 | getString() { | ||
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 | |||
174 | template<> | ||
175 | void FbTk::Resource<BScreen::FollowModel>:: | ||
176 | setFromString(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 | |||
187 | template<> | ||
160 | void FbTk::Resource<FbTk::GContext::LineStyle>::setDefaultValue() { | 188 | void FbTk::Resource<FbTk::GContext::LineStyle>::setDefaultValue() { |
161 | *(*this) = FbTk::GContext::LINESOLID; | 189 | *(*this) = FbTk::GContext::LINESOLID; |
162 | } | 190 | } |