diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-07-03 12:19:43 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2011-07-03 12:19:43 (GMT) |
commit | 985b61bdce9c90803c2dec5ced58d819f4c8c7a1 (patch) | |
tree | a34b767b0b441826b7a9872a45d4e6f89d624281 /src | |
parent | 03834d34720b1ca9b03c7260980c37e9c67d8144 (diff) | |
download | fluxbox_pavel-985b61bdce9c90803c2dec5ced58d819f4c8c7a1.zip fluxbox_pavel-985b61bdce9c90803c2dec5ced58d819f4c8c7a1.tar.bz2 |
MenuCreator: more removal of leftovers from old menus
Diffstat (limited to 'src')
-rw-r--r-- | src/MenuCreator.cc | 47 |
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 | ||
156 | class ParseItem { | ||
157 | public: | ||
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; } | ||
169 | private: | ||
170 | FbTk::Parser::Item m_key, m_label, m_cmd, m_icon; | ||
171 | FbTk::Menu *m_menu; | ||
172 | }; | ||
173 | |||
174 | class MenuContext: public LayerObject { | 155 | class MenuContext: public LayerObject { |
175 | public: | 156 | public: |
176 | void moveToLayer(int layer_number) { | 157 | void moveToLayer(int layer_number) { |
@@ -186,34 +167,6 @@ public: | |||
186 | 167 | ||
187 | }; | 168 | }; |
188 | 169 | ||
189 | void 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 | |||
201 | bool 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 | |||
217 | string getField(lua::state &l, int pos, const char *field, FbTk::StringConvertor *conv = NULL) { | 170 | string 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); |