diff options
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/Menu.cc | 4 | ||||
-rw-r--r-- | src/FbTk/Menu.hh | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 3674ae1..9dccb6f 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Menu.cc,v 1.29 2003/07/19 03:59:56 rathnor Exp $ | 25 | // $Id: Menu.cc,v 1.30 2003/07/20 08:12:36 rathnor Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -557,6 +557,8 @@ void Menu::update() { | |||
557 | 557 | ||
558 | 558 | ||
559 | void Menu::show() { | 559 | void Menu::show() { |
560 | if (m_need_update) | ||
561 | update(); | ||
560 | menu.window.showSubwindows(); | 562 | menu.window.showSubwindows(); |
561 | menu.window.show(); | 563 | menu.window.show(); |
562 | //!! TODO, this should probably be done explicit if one don't want to raise | 564 | //!! TODO, this should probably be done explicit if one don't want to raise |
diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh index 013c478..2610ad9 100644 --- a/src/FbTk/Menu.hh +++ b/src/FbTk/Menu.hh | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Menu.hh,v 1.19 2003/07/19 03:59:56 rathnor Exp $ | 25 | // $Id: Menu.hh,v 1.20 2003/07/20 08:12:36 rathnor Exp $ |
26 | 26 | ||
27 | #ifndef FBTK_MENU_HH | 27 | #ifndef FBTK_MENU_HH |
28 | #define FBTK_MENU_HH | 28 | #define FBTK_MENU_HH |
@@ -77,7 +77,7 @@ public: | |||
77 | int remove(unsigned int item); | 77 | int remove(unsigned int item); |
78 | /// remove all items | 78 | /// remove all items |
79 | void removeAll(); | 79 | void removeAll(); |
80 | inline void setInternalMenu() { internal_menu = true; } | 80 | inline void setInternalMenu(bool val = true) { internal_menu = val; } |
81 | inline void setAlignment(Alignment a) { m_alignment = a; } | 81 | inline void setAlignment(Alignment a) { m_alignment = a; } |
82 | inline void setTorn() { torn = true; } | 82 | inline void setTorn() { torn = true; } |
83 | inline void removeParent() { if (internal_menu) m_parent = 0; } | 83 | inline void removeParent() { if (internal_menu) m_parent = 0; } |
@@ -160,7 +160,7 @@ public: | |||
160 | 160 | ||
161 | protected: | 161 | protected: |
162 | 162 | ||
163 | inline void setTitleVisibility(bool b) { title_vis = b; } | 163 | inline void setTitleVisibility(bool b) { title_vis = b; m_need_update = true; } |
164 | inline void setMovable(bool b) { movable = b; } | 164 | inline void setMovable(bool b) { movable = b; } |
165 | inline void setHideTree(bool h) { hide_tree = h; } | 165 | inline void setHideTree(bool h) { hide_tree = h; } |
166 | 166 | ||