use the new desktopNames()
Dana Jansens danakj@orodu.net
1 files changed,
6 insertions(+),
5 deletions(-)
jump to
M
scripts/cycle.py
→
scripts/cycle.py
@@ -327,7 +327,7 @@
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 @@
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 @@ def __init__(self):
_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