aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-02-18 15:11:12 (GMT)
committerrathnor <rathnor>2003-02-18 15:11:12 (GMT)
commitb4ffe4fe21699c7123728aeeb99576a540b3694e (patch)
treef8a133be750f844f3c48f5a631fb8bf088544549 /src/fluxbox.cc
parentaa602770fbbd4e84154028d3181d275b81ea914d (diff)
downloadfluxbox_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.cc52
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
286template<>
287void Resource<Fluxbox::Layer>::
288setFromString(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
311template<>
312string Resource<Fluxbox::Layer>::
313getString() {
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
287Fluxbox *Fluxbox::singleton=0; 337Fluxbox *Fluxbox::singleton=0;
288 338