summaryrefslogtreecommitdiff
path: root/src/FbTk/Menu.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Menu.cc')
-rw-r--r--src/FbTk/Menu.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index cc56266..199a3eb 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.19 2003/05/01 14:33:36 rathnor Exp $ 25// $Id: Menu.cc,v 1.20 2003/05/04 10:34:09 fluxgen Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -427,8 +427,12 @@ void Menu::update() {
427 menu.frame.width(), menu.frame.height(), 427 menu.frame.width(), menu.frame.height(),
428 attr.depth); 428 attr.depth);
429 429
430 if (m_frame_pm.drawable() == 0) 430 if (m_frame_pm.drawable() == 0) {
431 cerr<<"Can't create pixmap!"<<endl; 431 cerr<<"FbTk::Menu: Warning: Failed to create pixmap ("<<
432 menu.frame.window()<<", "<<menu.frame.width()<<", "<<
433 menu.frame.height()<<
434 ", "<<attr.depth<<") !"<<endl;
435 }
432 436
433 437
434 } 438 }
@@ -660,8 +664,7 @@ bool Menu::hasSubmenu(unsigned int index) const {
660 664
661 665
662void Menu::drawItem(unsigned int index, bool highlight, bool clear, bool render_trans, 666void Menu::drawItem(unsigned int index, bool highlight, bool clear, bool render_trans,
663 int x, int y, unsigned int w, unsigned int h) 667 int x, int y, unsigned int w, unsigned int h) {
664{
665 if (index >= menuitems.size() || menuitems.size() == 0 || 668 if (index >= menuitems.size() || menuitems.size() == 0 ||
666 menu.persub == 0) 669 menu.persub == 0)
667 return; 670 return;
@@ -939,7 +942,7 @@ void Menu::buttonPressEvent(XButtonEvent &be) {
939 if (item->submenu()) 942 if (item->submenu())
940 drawSubmenu(w); 943 drawSubmenu(w);
941 else 944 else
942 drawItem(w, (item->isEnabled()), true, true); 945 drawItem(w, item->isEnabled(), true, true);
943 } 946 }
944 } else { 947 } else {
945 menu.x_move = be.x_root - menu.x; 948 menu.x_move = be.x_root - menu.x;
@@ -1045,7 +1048,7 @@ void Menu::motionNotifyEvent(XMotionEvent &me) {
1045 if (itmp->submenu()) 1048 if (itmp->submenu())
1046 drawSubmenu(w); 1049 drawSubmenu(w);
1047 else 1050 else
1048 drawItem(w, (itmp->isEnabled()), true, true); 1051 drawItem(w, itmp->isEnabled(), true, true);
1049 } 1052 }
1050 } 1053 }
1051} 1054}