diff options
author | rathnor <rathnor> | 2003-02-18 15:11:12 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-02-18 15:11:12 (GMT) |
commit | b4ffe4fe21699c7123728aeeb99576a540b3694e (patch) | |
tree | f8a133be750f844f3c48f5a631fb8bf088544549 /src/fluxbox.cc | |
parent | aa602770fbbd4e84154028d3181d275b81ea914d (diff) | |
download | fluxbox_pavel-b4ffe4fe21699c7123728aeeb99576a540b3694e.zip fluxbox_pavel-b4ffe4fe21699c7123728aeeb99576a540b3694e.tar.bz2 |
Added layer menus for windows, toolbar, and slit, plus associated
resources. Cleaned up some cruft from the previous layering setup.
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r-- | src/fluxbox.cc | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 19ee556..be41df1 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: fluxbox.cc,v 1.96 2003/02/17 12:31:17 fluxgen Exp $ | 25 | // $Id: fluxbox.cc,v 1.97 2003/02/18 15:11:12 rathnor Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "fluxbox.hh" | 28 | #include "fluxbox.hh" |
@@ -283,6 +283,56 @@ getString() { | |||
283 | return string(tmpstr); | 283 | return string(tmpstr); |
284 | } | 284 | } |
285 | 285 | ||
286 | template<> | ||
287 | void Resource<Fluxbox::Layer>:: | ||
288 | setFromString(const char *strval) { | ||
289 | int tempnum = 0; | ||
290 | if (sscanf(strval, "%d", &tempnum) == 1) | ||
291 | m_value = tempnum; | ||
292 | else if (strcasecmp(strval, "Menu") == 0) | ||
293 | m_value = Fluxbox::instance()->getMenuLayer(); | ||
294 | else if (strcasecmp(strval, "AboveDock") == 0) | ||
295 | m_value = Fluxbox::instance()->getAboveDockLayer(); | ||
296 | else if (strcasecmp(strval, "Dock") == 0) | ||
297 | m_value = Fluxbox::instance()->getDockLayer(); | ||
298 | else if (strcasecmp(strval, "Top") == 0) | ||
299 | m_value = Fluxbox::instance()->getTopLayer(); | ||
300 | else if (strcasecmp(strval, "Normal") == 0) | ||
301 | m_value = Fluxbox::instance()->getNormalLayer(); | ||
302 | else if (strcasecmp(strval, "Bottom") == 0) | ||
303 | m_value = Fluxbox::instance()->getBottomLayer(); | ||
304 | else if (strcasecmp(strval, "Desktop") == 0) | ||
305 | m_value = Fluxbox::instance()->getDesktopLayer(); | ||
306 | else | ||
307 | setDefaultValue(); | ||
308 | } | ||
309 | |||
310 | |||
311 | template<> | ||
312 | string Resource<Fluxbox::Layer>:: | ||
313 | getString() { | ||
314 | |||
315 | if (m_value.getNum() == Fluxbox::instance()->getMenuLayer()) | ||
316 | return string("Menu"); | ||
317 | else if (m_value.getNum() == Fluxbox::instance()->getAboveDockLayer()) | ||
318 | return string("AboveDock"); | ||
319 | else if (m_value.getNum() == Fluxbox::instance()->getDockLayer()) | ||
320 | return string("Dock"); | ||
321 | else if (m_value.getNum() == Fluxbox::instance()->getTopLayer()) | ||
322 | return string("Top"); | ||
323 | else if (m_value.getNum() == Fluxbox::instance()->getNormalLayer()) | ||
324 | return string("Normal"); | ||
325 | else if (m_value.getNum() == Fluxbox::instance()->getBottomLayer()) | ||
326 | return string("Bottom"); | ||
327 | else if (m_value.getNum() == Fluxbox::instance()->getDesktopLayer()) | ||
328 | return string("Desktop"); | ||
329 | else { | ||
330 | char tmpstr[128]; | ||
331 | sprintf(tmpstr, "%d", m_value.getNum()); | ||
332 | return string(tmpstr); | ||
333 | } | ||
334 | } | ||
335 | |||
286 | //static singleton var | 336 | //static singleton var |
287 | Fluxbox *Fluxbox::singleton=0; | 337 | Fluxbox *Fluxbox::singleton=0; |
288 | 338 | ||