diff options
author | fluxgen <fluxgen> | 2004-06-10 11:42:35 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-06-10 11:42:35 (GMT) |
commit | d2e0aea0ae29289b44a82e66c44a9545a71b0d67 (patch) | |
tree | b477cf75ddfd74724053bc23964262357f34a439 | |
parent | 80ba32fb2dac1240a0fbcc9895e9ea75e8ccc485 (diff) | |
download | fluxbox-d2e0aea0ae29289b44a82e66c44a9545a71b0d67.zip fluxbox-d2e0aea0ae29289b44a82e66c44a9545a71b0d67.tar.bz2 |
added menu icon
-rw-r--r-- | src/FbMenuParser.cc | 12 | ||||
-rw-r--r-- | src/FbMenuParser.hh | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/FbMenuParser.cc b/src/FbMenuParser.cc index fbb96b1..0f0b301 100644 --- a/src/FbMenuParser.cc +++ b/src/FbMenuParser.cc | |||
@@ -20,7 +20,7 @@ | |||
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: FbMenuParser.cc,v 1.1 2004/05/02 21:02:26 fluxgen Exp $ | 23 | // $Id: FbMenuParser.cc,v 1.2 2004/06/10 11:42:35 fluxgen Exp $ |
24 | 24 | ||
25 | #include "FbMenuParser.hh" | 25 | #include "FbMenuParser.hh" |
26 | 26 | ||
@@ -59,6 +59,10 @@ Parser &FbMenuParser::operator >> (Parser::Item &out) { | |||
59 | first = '{'; | 59 | first = '{'; |
60 | second = '}'; | 60 | second = '}'; |
61 | break; | 61 | break; |
62 | case ICON: | ||
63 | first = '<'; | ||
64 | second = '>'; | ||
65 | break; | ||
62 | case DONE: // get new line and call this again | 66 | case DONE: // get new line and call this again |
63 | if (!nextLine()) { | 67 | if (!nextLine()) { |
64 | out = Parser::s_empty_item; | 68 | out = Parser::s_empty_item; |
@@ -78,6 +82,8 @@ Parser &FbMenuParser::operator >> (Parser::Item &out) { | |||
78 | else if (m_curr_token == NAME) | 82 | else if (m_curr_token == NAME) |
79 | m_curr_token = ARGUMENT; | 83 | m_curr_token = ARGUMENT; |
80 | else if (m_curr_token == ARGUMENT) | 84 | else if (m_curr_token == ARGUMENT) |
85 | m_curr_token = ICON; | ||
86 | else if (m_curr_token == ICON) | ||
81 | m_curr_token = DONE; | 87 | m_curr_token = DONE; |
82 | 88 | ||
83 | out = Parser::s_empty_item; | 89 | out = Parser::s_empty_item; |
@@ -101,6 +107,10 @@ Parser &FbMenuParser::operator >> (Parser::Item &out) { | |||
101 | break; | 107 | break; |
102 | case ARGUMENT: | 108 | case ARGUMENT: |
103 | out.first = "ARGUMENT"; | 109 | out.first = "ARGUMENT"; |
110 | m_curr_token = ICON; | ||
111 | break; | ||
112 | case ICON: | ||
113 | out.first = "ICON"; | ||
104 | m_curr_token = DONE; | 114 | m_curr_token = DONE; |
105 | break; | 115 | break; |
106 | case DONE: | 116 | case DONE: |
diff --git a/src/FbMenuParser.hh b/src/FbMenuParser.hh index e274ed8..a43e3e9 100644 --- a/src/FbMenuParser.hh +++ b/src/FbMenuParser.hh | |||
@@ -20,7 +20,7 @@ | |||
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: FbMenuParser.hh,v 1.1 2004/05/02 21:02:26 fluxgen Exp $ | 23 | // $Id: FbMenuParser.hh,v 1.2 2004/06/10 11:42:35 fluxgen Exp $ |
24 | 24 | ||
25 | #ifndef FBMENUPARSER_HH | 25 | #ifndef FBMENUPARSER_HH |
26 | #define FBMENUPARSER_HH | 26 | #define FBMENUPARSER_HH |
@@ -52,7 +52,7 @@ private: | |||
52 | int m_row; | 52 | int m_row; |
53 | int m_curr_pos; | 53 | int m_curr_pos; |
54 | std::string m_curr_line; | 54 | std::string m_curr_line; |
55 | enum Object {TYPE, NAME, ARGUMENT, DONE} m_curr_token; | 55 | enum Object {TYPE, NAME, ARGUMENT, ICON, DONE} m_curr_token; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | #endif // FBMENUPARSER_HH | 58 | #endif // FBMENUPARSER_HH |