From: Dana Jansens Date: Wed, 19 Feb 2003 00:56:06 +0000 (+0000) Subject: use the new desktopNames() X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=cf9773325130da00f12a1c3475b2bc6d7d2bd466;p=chaz%2Fopenbox use the new desktopNames() --- diff --git a/scripts/cycle.py b/scripts/cycle.py index f29bf23e..5a518652 100644 --- a/scripts/cycle.py +++ b/scripts/cycle.py @@ -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