diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2005-12-17 16:00:50 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2005-12-17 16:00:50 +0000 |
| commit | 7eab308715ea1130166915574e3b691e08eb4482 (patch) | |
| tree | 0068c4e8eb07c80cade3408d2fd2b10baccdf012 /lib | |
| parent | 456ac28d25e861b4e661c88d573e3258a53d67a5 (diff) | |
| download | enigma2-7eab308715ea1130166915574e3b691e08eb4482.tar.gz enigma2-7eab308715ea1130166915574e3b691e08eb4482.zip | |
GUI: child windows will no long be removed on parent destroy. listbox/window now destroy their private parents. python does no longer use thisown = 0.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gui/elistbox.cpp | 3 | ||||
| -rw-r--r-- | lib/gui/ewidget.cpp | 10 | ||||
| -rw-r--r-- | lib/gui/ewidget.h | 2 | ||||
| -rw-r--r-- | lib/gui/ewindow.cpp | 1 | ||||
| -rw-r--r-- | lib/python/Components/GUISkin.py | 2 |
5 files changed, 14 insertions, 4 deletions
diff --git a/lib/gui/elistbox.cpp b/lib/gui/elistbox.cpp index 013a3103..21394de5 100644 --- a/lib/gui/elistbox.cpp +++ b/lib/gui/elistbox.cpp @@ -20,6 +20,9 @@ eListbox::eListbox(eWidget *parent) eListbox::~eListbox() { + if (m_scrollbar) + delete m_scrollbar; + ePtr<eActionMap> ptr; eActionMap::getInstance(ptr); ptr->unbindAction(this, 0); diff --git a/lib/gui/ewidget.cpp b/lib/gui/ewidget.cpp index 023caa6a..6f7fa91b 100644 --- a/lib/gui/ewidget.cpp +++ b/lib/gui/ewidget.cpp @@ -205,12 +205,11 @@ eWidget::~eWidget() m_parent = 0; - /* destroy all childs */ + /* tell all childs that the parent is not anymore existing */ ePtrList<eWidget>::iterator i(m_childs.begin()); while (i != m_childs.end()) { - (*i)->m_parent = 0; - delete *i; + (*i)->parentRemoved(); i = m_childs.erase(i); } } @@ -275,6 +274,11 @@ void eWidget::recalcClipRegionsWhenVisible() } while(1); } +void eWidget::parentRemoved() +{ + m_parent = 0; +} + int eWidget::event(int event, void *data, void *data2) { switch (event) diff --git a/lib/gui/ewidget.h b/lib/gui/ewidget.h index db86fd10..6739f25e 100644 --- a/lib/gui/ewidget.h +++ b/lib/gui/ewidget.h @@ -72,6 +72,8 @@ private: void doPaint(gPainter &painter, const gRegion ®ion); void recalcClipRegionsWhenVisible(); + void parentRemoved(); + gRGB m_background_color; int m_have_background_color; diff --git a/lib/gui/ewindow.cpp b/lib/gui/ewindow.cpp index 54a35958..06827a9e 100644 --- a/lib/gui/ewindow.cpp +++ b/lib/gui/ewindow.cpp @@ -33,6 +33,7 @@ eWindow::eWindow(eWidgetDesktop *desktop): eWidget(0) eWindow::~eWindow() { getDesktop()->removeRootWidget(this); + m_child->destruct(); } void eWindow::setTitle(const std::string &string) diff --git a/lib/python/Components/GUISkin.py b/lib/python/Components/GUISkin.py index c953aaec..cf8e1894 100644 --- a/lib/python/Components/GUISkin.py +++ b/lib/python/Components/GUISkin.py @@ -16,7 +16,7 @@ class GUISkin: for w in self.additionalWidgets: w.instance = w.widget(parent) - w.instance.thisown = 0 + # w.instance.thisown = 0 applyAllAttributes(w.instance, desktop, w.skinAttributes) for f in self.onLayoutFinish: |
