aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-07-03 12:19:43 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-07-03 12:19:43 (GMT)
commit985b61bdce9c90803c2dec5ced58d819f4c8c7a1 (patch)
treea34b767b0b441826b7a9872a45d4e6f89d624281
parent03834d34720b1ca9b03c7260980c37e9c67d8144 (diff)
downloadfluxbox_pavel-985b61bdce9c90803c2dec5ced58d819f4c8c7a1.zip
fluxbox_pavel-985b61bdce9c90803c2dec5ced58d819f4c8c7a1.tar.bz2
MenuCreator: more removal of leftovers from old menus
-rw-r--r--src/MenuCreator.cc47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc
index c1eeca4..467f643 100644
--- a/src/MenuCreator.cc
+++ b/src/MenuCreator.cc
@@ -39,7 +39,6 @@
39#include "AlphaMenu.hh" 39#include "AlphaMenu.hh"
40#include "Layer.hh" 40#include "Layer.hh"
41 41
42#include "FbMenuParser.hh"
43#include "StyleMenuItem.hh" 42#include "StyleMenuItem.hh"
44#include "RootCmdMenuItem.hh" 43#include "RootCmdMenuItem.hh"
45 44
@@ -153,24 +152,6 @@ RefMenu createRootCmdMenu(int screen_number, const string &label,
153} 152}
154 153
155 154
156class ParseItem {
157public:
158 explicit ParseItem(FbTk::Menu *menu):m_menu(menu) {}
159
160 void load(FbTk::Parser &p, FbTk::StringConvertor &m_labelconvertor) {
161 p>>m_key>>m_label>>m_cmd>>m_icon;
162 m_label.second = m_labelconvertor.recode(m_label.second);
163 }
164 const string &icon() const { return m_icon.second; }
165 const string &command() const { return m_cmd.second; }
166 const string &label() const { return m_label.second; }
167 const string &key() const { return m_key.second; }
168 FbTk::Menu *menu() { return m_menu; }
169private:
170 FbTk::Parser::Item m_key, m_label, m_cmd, m_icon;
171 FbTk::Menu *m_menu;
172};
173
174class MenuContext: public LayerObject { 155class MenuContext: public LayerObject {
175public: 156public:
176 void moveToLayer(int layer_number) { 157 void moveToLayer(int layer_number) {
@@ -186,34 +167,6 @@ public:
186 167
187}; 168};
188 169
189void parseMenu(FbTk::Parser &pars, FbTk::Menu &menu,
190 FbTk::StringConvertor &label_convertor,
191 AutoReloadHelper *reloader) {
192 ParseItem pitem(&menu);
193 while (!pars.eof()) {
194 pitem.load(pars, label_convertor);
195 if (pitem.key() == "end")
196 return;
197// translateMenuItem(pars, pitem, label_convertor, reloader);
198 }
199}
200
201bool getStart(FbMenuParser &parser, string &label, FbTk::StringConvertor &labelconvertor) {
202 ParseItem pitem(0);
203 while (!parser.eof()) {
204 // get first begin line
205 pitem.load(parser, labelconvertor);
206 if (pitem.key() == "begin") {
207 break;
208 }
209 }
210 if (parser.eof())
211 return false;
212
213 label = pitem.label();
214 return true;
215}
216
217string getField(lua::state &l, int pos, const char *field, FbTk::StringConvertor *conv = NULL) { 170string getField(lua::state &l, int pos, const char *field, FbTk::StringConvertor *conv = NULL) {
218 lua::stack_sentry s(l); 171 lua::stack_sentry s(l);
219 l.checkstack(1); 172 l.checkstack(1);