1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
Index: lib/luma/base/utils/gui/SearchResultView.py
===================================================================
RCS file: /cvsroot/luma/luma/lib/luma/base/utils/gui/SearchResultView.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -U3 -r1.14 -r1.15
--- lib/luma/base/utils/gui/SearchResultView.py 8 Jul 2004 20:39:16 -0000 1.14
+++ lib/luma/base/utils/gui/SearchResultView.py 25 Aug 2004 16:07:16 -0000 1.15
@@ -50,18 +50,14 @@
def show_entry(self, listItem):
while len(self.childsToClean) > 0:
- number = -1
- for x in range(0, len(self.childWidgets)):
- name1 = self.childWidgets[x].name()
- name2 = self.childsToClean[0]
- if name1 == name2:
- number = x
- if not(number == -1):
- del self.childWidgets[number]
- del self.childsToClean[0]
+ childName = self.childsToClean[0]
+ childIndex = self.childWidgets.index(childName)
+ del self.childWidgets[childIndex]
+ del self.childsToClean[0]
- floatingWidget = ChildWindow(None)
+ floatingWidget = ChildWindow(None, unicode(listItem.text(0)).encode('utf-8'))
widget = ObjectWidget(floatingWidget, unicode(listItem.text(0)).encode('utf-8'), 0)
+
floatingWidget.setCentralWidget(widget)
widget.buildToolBar(floatingWidget)
values = [self.RESULT[unicode(listItem.text(0)).encode('utf-8')]]
@@ -127,8 +123,7 @@
def eventFilter(self, object, event):
if (event.type() == QEvent.Close):
- name = object.name()
- self.childsToClean.append(name)
+ self.childsToClean.append(object)
return 0
###############################################################################
@@ -252,8 +247,8 @@
class ChildWindow(QMainWindow):
- def __init__(self, parent = None):
- QMainWindow.__init__(self)
+ def __init__(self, parent = None, name= None):
+ QMainWindow.__init__(self, parent, name)
def closeEvent(self, event):
|