Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Dengler <martin@martindengler.com>2008-10-26 15:24:02 (GMT)
committer Martin Dengler <martin@martindengler.com>2008-10-31 09:56:44 (GMT)
commit224b117923ac510c676361a0cd9a5391a8591ac1 (patch)
treee76435e4e851cc205ac2214cc9a395e2e7817a35 /src
parentcad1dfb77a3203fbafeff77192153b1c06084ad0 (diff)
Fix frame device ordering logic
Diffstat (limited to 'src')
-rw-r--r--src/jarabe/frame/devicestray.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jarabe/frame/devicestray.py b/src/jarabe/frame/devicestray.py
index 8514efb..47a7bf5 100644
--- a/src/jarabe/frame/devicestray.py
+++ b/src/jarabe/frame/devicestray.py
@@ -40,12 +40,12 @@ class DevicesTray(tray.HTray):
def add_device(self, view):
index = 0
+ relative_index = getattr(view, "FRAME_POSITION_RELATIVE", -1)
for item in self.get_children():
- index = self.get_item_index(item)
- view_pos = getattr(view, "FRAME_POSITION_RELATIVE", -1)
- item_pos = getattr(item, "FRAME_POSITION_RELATIVE", 0)
- if view_pos < item_pos:
+ current_relative_index = getattr(item, "FRAME_POSITION_RELATIVE", 0)
+ if current_relative_index >= relative_index:
break
+ index += 1
self.add_item(view, index=index)
view.show()