diff options
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/ImageControl.cc | 2 | ||||
-rw-r--r-- | src/FbTk/Layer.hh | 2 | ||||
-rw-r--r-- | src/FbTk/MacroCommand.cc | 2 | ||||
-rw-r--r-- | src/FbTk/MacroCommand.hh | 2 | ||||
-rw-r--r-- | src/FbTk/Menu.cc | 7 | ||||
-rw-r--r-- | src/FbTk/Menu.hh | 2 | ||||
-rw-r--r-- | src/FbTk/MenuItem.cc | 4 | ||||
-rw-r--r-- | src/FbTk/MultLayers.cc | 4 | ||||
-rw-r--r-- | src/FbTk/StringUtil.cc | 2 | ||||
-rw-r--r-- | src/FbTk/TextButton.cc | 2 |
10 files changed, 15 insertions, 14 deletions
diff --git a/src/FbTk/ImageControl.cc b/src/FbTk/ImageControl.cc index 902bd55..7fe9154 100644 --- a/src/FbTk/ImageControl.cc +++ b/src/FbTk/ImageControl.cc | |||
@@ -258,7 +258,7 @@ Pixmap ImageControl::renderImage(unsigned int width, unsigned int height, | |||
258 | 258 | ||
259 | cache.push_back(tmp); | 259 | cache.push_back(tmp); |
260 | 260 | ||
261 | if ((unsigned) cache.size() > cache_max) | 261 | if (cache.size() > cache_max) |
262 | cleanCache(); | 262 | cleanCache(); |
263 | 263 | ||
264 | return pixmap; | 264 | return pixmap; |
diff --git a/src/FbTk/Layer.hh b/src/FbTk/Layer.hh index 3e206b2..5c0c566 100644 --- a/src/FbTk/Layer.hh +++ b/src/FbTk/Layer.hh | |||
@@ -59,7 +59,7 @@ public: | |||
59 | /// @return layer item on specific position, on failure 0 | 59 | /// @return layer item on specific position, on failure 0 |
60 | ItemType *getItem(unsigned int position); | 60 | ItemType *getItem(unsigned int position); |
61 | /// @return number of elements in layer | 61 | /// @return number of elements in layer |
62 | unsigned int size() const { return m_list.size(); } | 62 | size_t size() const { return m_list.size(); } |
63 | /// @return layer list | 63 | /// @return layer list |
64 | const ListType &itemList() const { return m_list; } | 64 | const ListType &itemList() const { return m_list; } |
65 | /// @return layer list | 65 | /// @return layer list |
diff --git a/src/FbTk/MacroCommand.cc b/src/FbTk/MacroCommand.cc index 84794e1..adee9cb 100644 --- a/src/FbTk/MacroCommand.cc +++ b/src/FbTk/MacroCommand.cc | |||
@@ -29,7 +29,7 @@ void MacroCommand::add(RefCount<Command> &com) { | |||
29 | m_commandlist.push_back(com); | 29 | m_commandlist.push_back(com); |
30 | } | 30 | } |
31 | 31 | ||
32 | unsigned int MacroCommand::size() const { | 32 | size_t MacroCommand::size() const { |
33 | return m_commandlist.size(); | 33 | return m_commandlist.size(); |
34 | } | 34 | } |
35 | 35 | ||
diff --git a/src/FbTk/MacroCommand.hh b/src/FbTk/MacroCommand.hh index 97cc5d5..f29e05c 100644 --- a/src/FbTk/MacroCommand.hh +++ b/src/FbTk/MacroCommand.hh | |||
@@ -35,7 +35,7 @@ namespace FbTk { | |||
35 | class MacroCommand:public Command { | 35 | class MacroCommand:public Command { |
36 | public: | 36 | public: |
37 | void add(RefCount<Command> &com); | 37 | void add(RefCount<Command> &com); |
38 | unsigned int size() const; | 38 | size_t size() const; |
39 | virtual void execute(); | 39 | virtual void execute(); |
40 | 40 | ||
41 | private: | 41 | private: |
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 5687be1..0616906 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -577,13 +577,13 @@ void Menu::clearWindow() { | |||
577 | menu.frame.clear(); | 577 | menu.frame.clear(); |
578 | 578 | ||
579 | // clear foreground bits of frame items | 579 | // clear foreground bits of frame items |
580 | for (unsigned int i = 0; i < menuitems.size(); i++) { | 580 | for (size_t i = 0; i < menuitems.size(); i++) { |
581 | clearItem(i, false); // no clear | 581 | clearItem(i, false); // no clear |
582 | } | 582 | } |
583 | } | 583 | } |
584 | 584 | ||
585 | void Menu::redrawFrame(FbDrawable &drawable) { | 585 | void Menu::redrawFrame(FbDrawable &drawable) { |
586 | for (unsigned int i = 0; i < menuitems.size(); i++) { | 586 | for (size_t i = 0; i < menuitems.size(); i++) { |
587 | drawItem(drawable, i); | 587 | drawItem(drawable, i); |
588 | } | 588 | } |
589 | 589 | ||
@@ -636,7 +636,8 @@ void Menu::redrawTitle(FbDrawable &drawable) { | |||
636 | const char *text = menu.label.c_str(); | 636 | const char *text = menu.label.c_str(); |
637 | 637 | ||
638 | const FbTk::Font &font = theme().titleFont(); | 638 | const FbTk::Font &font = theme().titleFont(); |
639 | int dx = theme().bevelWidth(), len = menu.label.size(); | 639 | int dx = theme().bevelWidth(); |
640 | size_t len = menu.label.size(); | ||
640 | unsigned int l = font.textWidth(text, len) + theme().bevelWidth()*2; | 641 | unsigned int l = font.textWidth(text, len) + theme().bevelWidth()*2; |
641 | 642 | ||
642 | switch (theme().titleFontJustify()) { | 643 | switch (theme().titleFontJustify()) { |
diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh index bec76ac..fceec67 100644 --- a/src/FbTk/Menu.hh +++ b/src/FbTk/Menu.hh | |||
@@ -147,7 +147,7 @@ public: | |||
147 | inline int y() const { return menu.window.y(); } | 147 | inline int y() const { return menu.window.y(); } |
148 | inline unsigned int width() const { return menu.window.width(); } | 148 | inline unsigned int width() const { return menu.window.width(); } |
149 | inline unsigned int height() const { return menu.window.height(); } | 149 | inline unsigned int height() const { return menu.window.height(); } |
150 | inline unsigned int numberOfItems() const { return menuitems.size(); } | 150 | inline size_t numberOfItems() const { return menuitems.size(); } |
151 | inline int currentSubmenu() const { return m_which_sub; } | 151 | inline int currentSubmenu() const { return m_which_sub; } |
152 | bool hasSubmenu(unsigned int index) const; | 152 | bool hasSubmenu(unsigned int index) const; |
153 | bool isItemSelected(unsigned int index) const; | 153 | bool isItemSelected(unsigned int index) const; |
diff --git a/src/FbTk/MenuItem.cc b/src/FbTk/MenuItem.cc index 93adc44..f39d03c 100644 --- a/src/FbTk/MenuItem.cc +++ b/src/FbTk/MenuItem.cc | |||
@@ -168,8 +168,8 @@ void MenuItem::draw(FbDrawable &draw, | |||
168 | // disable clip mask | 168 | // disable clip mask |
169 | XSetClipMask(disp, gc, None); | 169 | XSetClipMask(disp, gc, None); |
170 | } else if (isSelected()) { | 170 | } else if (isSelected()) { |
171 | draw.fillRectangle(theme.hiliteGC().gc(), | 171 | draw.fillRectangle(theme.hiliteGC().gc(), |
172 | sel_x+item_pm_height/4, sel_y+item_pm_height/4, item_pm_height/2, item_pm_height/2); | 172 | sel_x+item_pm_height/4, sel_y+item_pm_height/4, item_pm_height/2, item_pm_height/2); |
173 | } | 173 | } |
174 | } | 174 | } |
175 | 175 | ||
diff --git a/src/FbTk/MultLayers.cc b/src/FbTk/MultLayers.cc index 6a6dc18..439201a 100644 --- a/src/FbTk/MultLayers.cc +++ b/src/FbTk/MultLayers.cc | |||
@@ -180,8 +180,8 @@ void MultLayers::restack() { | |||
180 | } | 180 | } |
181 | 181 | ||
182 | int MultLayers::size() { | 182 | int MultLayers::size() { |
183 | int i = 0, num = 0; | 183 | int num = 0; |
184 | for (; i < static_cast<signed>(m_layers.size()); i++) { | 184 | for (size_t i = 0; i < m_layers.size(); i++) { |
185 | num += m_layers[i]->countWindows(); | 185 | num += m_layers[i]->countWindows(); |
186 | } | 186 | } |
187 | return num; | 187 | return num; |
diff --git a/src/FbTk/StringUtil.cc b/src/FbTk/StringUtil.cc index d8b64c9..1a6814c 100644 --- a/src/FbTk/StringUtil.cc +++ b/src/FbTk/StringUtil.cc | |||
@@ -123,7 +123,7 @@ string findExtension(const string &filename) { | |||
123 | string replaceString(const string &original, | 123 | string replaceString(const string &original, |
124 | const char *findthis, | 124 | const char *findthis, |
125 | const char *replace) { | 125 | const char *replace) { |
126 | int i=0; | 126 | size_t i = 0; |
127 | const int size_of_replace = strlen(replace); | 127 | const int size_of_replace = strlen(replace); |
128 | const int size_of_find = strlen(findthis); | 128 | const int size_of_find = strlen(findthis); |
129 | string ret_str(original); | 129 | string ret_str(original); |
diff --git a/src/FbTk/TextButton.cc b/src/FbTk/TextButton.cc index 1d5936c..ad9de09 100644 --- a/src/FbTk/TextButton.cc +++ b/src/FbTk/TextButton.cc | |||
@@ -144,7 +144,7 @@ void TextButton::renderForeground(FbWindow &win, FbDrawable &drawable) { | |||
144 | } | 144 | } |
145 | 145 | ||
146 | void TextButton::drawText(int x_offset, int y_offset, FbDrawable *drawable) { | 146 | void TextButton::drawText(int x_offset, int y_offset, FbDrawable *drawable) { |
147 | unsigned int textlen = text().size(); | 147 | size_t textlen = text().size(); |
148 | // do text alignment | 148 | // do text alignment |
149 | 149 | ||
150 | unsigned int textw = width(), texth = height(); | 150 | unsigned int textw = width(), texth = height(); |