aboutsummaryrefslogtreecommitdiff
path: root/src/LayerMenu.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-06-27 13:43:59 (GMT)
committerfluxgen <fluxgen>2004-06-27 13:43:59 (GMT)
commit2e228593c0cc71ddd847625b1d9add4cd1f3289f (patch)
tree01d3bcfb91317c9a491c8f7d44603df873de6187 /src/LayerMenu.hh
parent835501d3ae990bba55aecdc9e218d68745763ebb (diff)
downloadfluxbox-2e228593c0cc71ddd847625b1d9add4cd1f3289f.zip
fluxbox-2e228593c0cc71ddd847625b1d9add4cd1f3289f.tar.bz2
using toggle menu for layer menu, fixed nls support
Diffstat (limited to 'src/LayerMenu.hh')
-rw-r--r--src/LayerMenu.hh31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/LayerMenu.hh b/src/LayerMenu.hh
index f3ad771..45c3b2b 100644
--- a/src/LayerMenu.hh
+++ b/src/LayerMenu.hh
@@ -1,6 +1,6 @@
1// LayerMenu.hh for Fluxbox - fluxbox toolkit 1// LayerMenu.hh for Fluxbox - fluxbox toolkit
2// Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net) 2// Copyright (c) 2003-2004 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3// and Simon Bowden (rathnor at users.sourceforge.net) 3// and Simon Bowden (rathnor at users.sourceforge.net)
4// 4//
5// Permission is hereby granted, free of charge, to any person obtaining a 5// Permission is hereby granted, free of charge, to any person obtaining a
6// copy of this software and associated documentation files (the "Software"), 6// copy of this software and associated documentation files (the "Software"),
@@ -20,15 +20,16 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: LayerMenu.hh,v 1.8 2004/06/07 21:15:08 fluxgen Exp $ 23// $Id: LayerMenu.hh,v 1.9 2004/06/27 13:43:59 fluxgen Exp $
24 24
25#ifndef LAYERMENU_HH 25#ifndef LAYERMENU_HH
26#define LAYERMENU_HH 26#define LAYERMENU_HH
27 27
28#include "MenuItem.hh" 28#include "MenuItem.hh"
29#include "FbMenu.hh" 29#include "ToggleMenu.hh"
30#include "RefCount.hh" 30#include "RefCount.hh"
31#include "SimpleCommand.hh" 31#include "SimpleCommand.hh"
32#include "I18n.hh"
32 33
33#include "fluxbox.hh" 34#include "fluxbox.hh"
34 35
@@ -58,11 +59,12 @@ private:
58 59
59/// Create a layer menu inside from the given menu 60/// Create a layer menu inside from the given menu
60template <typename ItemType> 61template <typename ItemType>
61class LayerMenu : public FbMenu { 62class LayerMenu : public ToggleMenu {
62public: 63public:
63 LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, 64 LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl,
64 FbTk::XLayer &layer, ItemType *item, bool save_rc); 65 FbTk::XLayer &layer, ItemType *item, bool save_rc);
65 66
67
66private: 68private:
67 ItemType *m_object; 69 ItemType *m_object;
68}; 70};
@@ -71,25 +73,26 @@ private:
71template <typename ItemType> 73template <typename ItemType>
72LayerMenu<ItemType>::LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, 74LayerMenu<ItemType>::LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl,
73 FbTk::XLayer &layer, ItemType *item, bool save_rc): 75 FbTk::XLayer &layer, ItemType *item, bool save_rc):
74 FbMenu(tm, imgctrl, layer), 76 ToggleMenu(tm, imgctrl, layer),
75 m_object(item) 77 m_object(item)
76{ 78{
77 79 _FB_USES_NLS;
80
78 Fluxbox *fluxbox = Fluxbox::instance(); 81 Fluxbox *fluxbox = Fluxbox::instance();
79 82
80 struct { 83 struct {
81 int set; 84 int set;
82 int base; 85 int base;
83 const char *default_str; 86 const char *default_str;
84 int layernum; 87 int layernum;
85 } layer_menuitems[] = { 88 } layer_menuitems[] = {
86 //TODO: nls 89 //TODO: nls
87 {0, 0, "Above Dock", fluxbox->getAboveDockLayer()}, 90 {0, 0, _FBTEXT(Layer, AboveDock, "Above Dock", "Layer above dock"), fluxbox->getAboveDockLayer()},
88 {0, 0, "Dock", fluxbox->getDockLayer()}, 91 {0, 0, _FBTEXT(Layer, Dock, "Dock", "Layer dock"), fluxbox->getDockLayer()},
89 {0, 0, "Top", fluxbox->getTopLayer()}, 92 {0, 0, _FBTEXT(Layer, Top, "Top", "Layer top"), fluxbox->getTopLayer()},
90 {0, 0, "Normal", fluxbox->getNormalLayer()}, 93 {0, 0, _FBTEXT(Layer, Normal, "Normal", "Layer normal"), fluxbox->getNormalLayer()},
91 {0, 0, "Bottom", fluxbox->getBottomLayer()}, 94 {0, 0, _FBTEXT(Layer, Bottom, "Bottom", "Layer bottom"), fluxbox->getBottomLayer()},
92 {0, 0, "Desktop", fluxbox->getDesktopLayer()}, 95 {0, 0, _FBTEXT(Layer, Desktop, "Desktop", "Layer desktop"), fluxbox->getDesktopLayer()},
93 }; 96 };
94 97
95 FbTk::RefCount<FbTk::Command> saverc_cmd(new FbTk::SimpleCommand<Fluxbox>( 98 FbTk::RefCount<FbTk::Command> saverc_cmd(new FbTk::SimpleCommand<Fluxbox>(