using toggle menu for layer menu, fixed nls support
This commit is contained in:
parent
835501d3ae
commit
2e228593c0
1 changed files with 17 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
||||||
// LayerMenu.hh for Fluxbox - fluxbox toolkit
|
// LayerMenu.hh for Fluxbox - fluxbox toolkit
|
||||||
// Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
|
// Copyright (c) 2003-2004 Henrik Kinnunen (fluxgen at users.sourceforge.net)
|
||||||
// and Simon Bowden (rathnor at users.sourceforge.net)
|
// and Simon Bowden (rathnor at users.sourceforge.net)
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
@ -20,15 +20,16 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: LayerMenu.hh,v 1.8 2004/06/07 21:15:08 fluxgen Exp $
|
// $Id: LayerMenu.hh,v 1.9 2004/06/27 13:43:59 fluxgen Exp $
|
||||||
|
|
||||||
#ifndef LAYERMENU_HH
|
#ifndef LAYERMENU_HH
|
||||||
#define LAYERMENU_HH
|
#define LAYERMENU_HH
|
||||||
|
|
||||||
#include "MenuItem.hh"
|
#include "MenuItem.hh"
|
||||||
#include "FbMenu.hh"
|
#include "ToggleMenu.hh"
|
||||||
#include "RefCount.hh"
|
#include "RefCount.hh"
|
||||||
#include "SimpleCommand.hh"
|
#include "SimpleCommand.hh"
|
||||||
|
#include "I18n.hh"
|
||||||
|
|
||||||
#include "fluxbox.hh"
|
#include "fluxbox.hh"
|
||||||
|
|
||||||
|
@ -58,11 +59,12 @@ private:
|
||||||
|
|
||||||
/// Create a layer menu inside from the given menu
|
/// Create a layer menu inside from the given menu
|
||||||
template <typename ItemType>
|
template <typename ItemType>
|
||||||
class LayerMenu : public FbMenu {
|
class LayerMenu : public ToggleMenu {
|
||||||
public:
|
public:
|
||||||
LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl,
|
LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl,
|
||||||
FbTk::XLayer &layer, ItemType *item, bool save_rc);
|
FbTk::XLayer &layer, ItemType *item, bool save_rc);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ItemType *m_object;
|
ItemType *m_object;
|
||||||
};
|
};
|
||||||
|
@ -71,9 +73,10 @@ private:
|
||||||
template <typename ItemType>
|
template <typename ItemType>
|
||||||
LayerMenu<ItemType>::LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl,
|
LayerMenu<ItemType>::LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl,
|
||||||
FbTk::XLayer &layer, ItemType *item, bool save_rc):
|
FbTk::XLayer &layer, ItemType *item, bool save_rc):
|
||||||
FbMenu(tm, imgctrl, layer),
|
ToggleMenu(tm, imgctrl, layer),
|
||||||
m_object(item)
|
m_object(item)
|
||||||
{
|
{
|
||||||
|
_FB_USES_NLS;
|
||||||
|
|
||||||
Fluxbox *fluxbox = Fluxbox::instance();
|
Fluxbox *fluxbox = Fluxbox::instance();
|
||||||
|
|
||||||
|
@ -84,12 +87,12 @@ LayerMenu<ItemType>::LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl,
|
||||||
int layernum;
|
int layernum;
|
||||||
} layer_menuitems[] = {
|
} layer_menuitems[] = {
|
||||||
//TODO: nls
|
//TODO: nls
|
||||||
{0, 0, "Above Dock", fluxbox->getAboveDockLayer()},
|
{0, 0, _FBTEXT(Layer, AboveDock, "Above Dock", "Layer above dock"), fluxbox->getAboveDockLayer()},
|
||||||
{0, 0, "Dock", fluxbox->getDockLayer()},
|
{0, 0, _FBTEXT(Layer, Dock, "Dock", "Layer dock"), fluxbox->getDockLayer()},
|
||||||
{0, 0, "Top", fluxbox->getTopLayer()},
|
{0, 0, _FBTEXT(Layer, Top, "Top", "Layer top"), fluxbox->getTopLayer()},
|
||||||
{0, 0, "Normal", fluxbox->getNormalLayer()},
|
{0, 0, _FBTEXT(Layer, Normal, "Normal", "Layer normal"), fluxbox->getNormalLayer()},
|
||||||
{0, 0, "Bottom", fluxbox->getBottomLayer()},
|
{0, 0, _FBTEXT(Layer, Bottom, "Bottom", "Layer bottom"), fluxbox->getBottomLayer()},
|
||||||
{0, 0, "Desktop", fluxbox->getDesktopLayer()},
|
{0, 0, _FBTEXT(Layer, Desktop, "Desktop", "Layer desktop"), fluxbox->getDesktopLayer()},
|
||||||
};
|
};
|
||||||
|
|
||||||
FbTk::RefCount<FbTk::Command> saverc_cmd(new FbTk::SimpleCommand<Fluxbox>(
|
FbTk::RefCount<FbTk::Command> saverc_cmd(new FbTk::SimpleCommand<Fluxbox>(
|
||||||
|
|
Loading…
Reference in a new issue