]> Dogcows Code - chaz/openbox/commitdiff
use the new desktopNames()
authorDana Jansens <danakj@orodu.net>
Wed, 19 Feb 2003 00:56:06 +0000 (00:56 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 19 Feb 2003 00:56:06 +0000 (00:56 +0000)
scripts/cycle.py

index f29bf23ebb1832a7b1e1a59139d6297aaabff7d5..5a518652c5f7e137aec54b9c95252eb414c58a6e 100644 (file)
@@ -327,7 +327,7 @@ class _CycleWindows(_Cycle):
         if self.INCLUDE_ALL_DESKTOPS:
             d = client.desktop()
             if d == 0xffffffff: d = self.screen.desktop()
-            t = self.screen.desktopName(d) + " - " + t
+            t = self.screen.desktopNames()[d] + " - " + t
 
         return t
     
@@ -420,7 +420,7 @@ class _CycleWindowsLinear(_CycleWindows):
         if self.INCLUDE_ALL_DESKTOPS:
             d = client.desktop()
             if d == 0xffffffff: d = self.screen.desktop()
-            t = self.screen.desktopName(d) + " - " + t
+            t = self.screen.desktopNames()[d] + " - " + t
 
         return t
     
@@ -447,9 +447,10 @@ class _CycleDesktops(_Cycle):
         _Cycle.__init__(self)
 
     def populateItems(self):
-        for i in range(self.screen.numDesktops()):
-            self.items.append(
-                _CycleDesktops.Desktop(self.screen.desktopName(i), i))
+        names = self.screen.desktopNames()
+        num = self.screen.numDesktops()
+        for n, i in zip(names[:num], range(num)):
+            self.items.append(_CycleDesktops.Desktop(n, i))
 
     def menuLabel(self, desktop):
         return desktop.name
This page took 0.030296 seconds and 4 git commands to generate.