- added hack for disabling actions on hidden windows. FIX ME
authorFelix Domke <tmbinc@elitedvb.net>
Tue, 22 Mar 2005 02:58:52 +0000 (02:58 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Tue, 22 Mar 2005 02:58:52 +0000 (02:58 +0000)
lib/gui/elistbox.cpp
lib/gui/ewidget.h

index a6fe45f..7764e6b 100644 (file)
@@ -130,8 +130,12 @@ int eListbox::event(int event, void *data, void *data2)
                return 0;
        }
        case evtAction:
                return 0;
        }
        case evtAction:
-               moveSelection((int)data2);
-               return 1;
+               if (isVisible())
+               {
+                       moveSelection((int)data2);
+                       return 1;
+               }
+               break;
        default:
                return eWidget::event(event, data, data2);
        }
        default:
                return eWidget::event(event, data, data2);
        }
index 97eb143..fbe5a92 100644 (file)
@@ -33,6 +33,10 @@ public:
        int getStyle(ePtr<eWindowStyle> &style) { if (!m_style) return 1; style = m_style; return 0; }
        void setStyle(eWindowStyle *style) { m_style = style; }
        
        int getStyle(ePtr<eWindowStyle> &style) { if (!m_style) return 1; style = m_style; return 0; }
        void setStyle(eWindowStyle *style) { m_style = style; }
        
+               /* untested code */
+       int isVisible() { return (m_vis & wVisShow) && ((!m_parent) || m_parent->isVisible()); }
+               /* ... */
+       
 private:
        eWidgetDesktop *m_desktop;
 
 private:
        eWidgetDesktop *m_desktop;