summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-02-08 08:59:24 +0000
committerDana Jansens <danakj@orodu.net>2003-02-08 08:59:24 +0000
commitef231de58a738c83bf505e184fbafa9077f7452e (patch)
treeffdfa60aea48424d925393efea433b1313b6e9a7 /scripts
parentee9eaed6cd48db249711912133758679a029b5b1 (diff)
mad optimizations
Diffstat (limited to 'scripts')
-rw-r--r--scripts/motion.py12
-rw-r--r--scripts/stackedcycle.py10
2 files changed, 9 insertions, 13 deletions
diff --git a/scripts/motion.py b/scripts/motion.py
index 649f07ba..2ed07863 100644
--- a/scripts/motion.py
+++ b/scripts/motion.py
@@ -149,9 +149,9 @@ def _do_move():
_poplabel.setText(text)
scsize = otk.display.screenInfo(_screen).size()
size = _poplabel.minSize()
- _popwidget.resize(_poplabel.minSize())
- _popwidget.move(otk.Point((scsize.width() - size.width()) / 2,
- (scsize.height() - size.height()) / 2))
+ _popwidget.moveresize(otk.Rect((scsize.width() - size.width()) / 2,
+ (scsize.height() - size.height()) / 2,
+ size.width(), size.height()))
_popwidget.show(1)
def _move(data):
@@ -235,9 +235,9 @@ def _do_resize():
_poplabel.setText(text)
scsize = otk.display.screenInfo(_screen).size()
size = _poplabel.minSize()
- _popwidget.resize(_poplabel.minSize())
- _popwidget.move(otk.Point((scsize.width() - size.width()) / 2,
- (scsize.height() - size.height()) / 2))
+ _popwidget.moveresize(otk.Rect((scsize.width() - size.width()) / 2,
+ (scsize.height() - size.height()) / 2,
+ size.width(), size.height()))
_popwidget.show(1)
def _resize(data):
diff --git a/scripts/stackedcycle.py b/scripts/stackedcycle.py
index 43507de3..59dbc98e 100644
--- a/scripts/stackedcycle.py
+++ b/scripts/stackedcycle.py
@@ -113,10 +113,6 @@ class _cycledata:
if current and c.window() == current.window():
self.menupos = i
w.setHighlighted(1)
- pass
- else:
- w.setHighlighted(0)
- pass
self.menuwidgets.append(w)
if c.iconic(): t = c.iconTitle()
@@ -147,9 +143,9 @@ class _cycledata:
# show or hide the list and its child widgets
if len(self.clients) > 1:
size = self.screeninfo.size()
- self.widget.resize(otk.Size(width, height))
- self.widget.move(otk.Point((size.width() - width) / 2,
- (size.height() - height) / 2))
+ self.widget.moveresize(otk.Rect((size.width() - width) / 2,
+ (size.height() - height) / 2,
+ width, height))
self.widget.show(1)
def activatetarget(self, final):