aboutsummaryrefslogtreecommitdiff
path: root/src/FbCommands.hh
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-05-11 17:17:21 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-05-11 17:17:21 (GMT)
commit72a45fae3c39323206e7d19913bb3ab17a691691 (patch)
treef920a884d39c8d5d161e0fa7a3c8a6296f7a3d71 /src/FbCommands.hh
parent85d8ac754974aae0a513b585e4f1810007cb157c (diff)
downloadfluxbox-72a45fae3c39323206e7d19913bb3ab17a691691.zip
fluxbox-72a45fae3c39323206e7d19913bb3ab17a691691.tar.bz2
reuse some menu pointers instead of using delete/new
Diffstat (limited to 'src/FbCommands.hh')
-rw-r--r--src/FbCommands.hh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/FbCommands.hh b/src/FbCommands.hh
index f9c33af..3ad45c4 100644
--- a/src/FbCommands.hh
+++ b/src/FbCommands.hh
@@ -25,7 +25,8 @@
25#define FBCOMMANDS_HH 25#define FBCOMMANDS_HH
26 26
27#include "FbTk/Command.hh" 27#include "FbTk/Command.hh"
28#include "FbTk/RefCount.hh" 28
29#include <memory>
29 30
30#include "ClientMenu.hh" 31#include "ClientMenu.hh"
31#include "ClientPattern.hh" 32#include "ClientPattern.hh"
@@ -124,7 +125,7 @@ private:
124 const int m_option; 125 const int m_option;
125 const ClientPattern m_pat; 126 const ClientPattern m_pat;
126 std::list<FluxboxWindow *> m_list; 127 std::list<FluxboxWindow *> m_list;
127 FbTk::RefCount<ClientMenu> m_menu; 128 std::auto_ptr<ClientMenu> m_menu;
128}; 129};
129 130
130class ShowCustomMenuCmd: public FbTk::Command<void> { 131class ShowCustomMenuCmd: public FbTk::Command<void> {
@@ -133,7 +134,7 @@ public:
133 void execute(); 134 void execute();
134private: 135private:
135 std::string custom_menu_file; 136 std::string custom_menu_file;
136 FbTk::RefCount<FbTk::Menu> m_menu; 137 std::auto_ptr<FbTk::Menu> m_menu;
137}; 138};
138 139
139class ShowRootMenuCmd: public FbTk::Command<void> { 140class ShowRootMenuCmd: public FbTk::Command<void> {