use the new desktopNames()
This commit is contained in:
parent
0a93178b75
commit
cf97733251
1 changed files with 6 additions and 5 deletions
|
@ -327,7 +327,7 @@ class _CycleWindows(_Cycle):
|
||||||
if self.INCLUDE_ALL_DESKTOPS:
|
if self.INCLUDE_ALL_DESKTOPS:
|
||||||
d = client.desktop()
|
d = client.desktop()
|
||||||
if d == 0xffffffff: d = self.screen.desktop()
|
if d == 0xffffffff: d = self.screen.desktop()
|
||||||
t = self.screen.desktopName(d) + " - " + t
|
t = self.screen.desktopNames()[d] + " - " + t
|
||||||
|
|
||||||
return t
|
return t
|
||||||
|
|
||||||
|
@ -420,7 +420,7 @@ class _CycleWindowsLinear(_CycleWindows):
|
||||||
if self.INCLUDE_ALL_DESKTOPS:
|
if self.INCLUDE_ALL_DESKTOPS:
|
||||||
d = client.desktop()
|
d = client.desktop()
|
||||||
if d == 0xffffffff: d = self.screen.desktop()
|
if d == 0xffffffff: d = self.screen.desktop()
|
||||||
t = self.screen.desktopName(d) + " - " + t
|
t = self.screen.desktopNames()[d] + " - " + t
|
||||||
|
|
||||||
return t
|
return t
|
||||||
|
|
||||||
|
@ -447,9 +447,10 @@ class _CycleDesktops(_Cycle):
|
||||||
_Cycle.__init__(self)
|
_Cycle.__init__(self)
|
||||||
|
|
||||||
def populateItems(self):
|
def populateItems(self):
|
||||||
for i in range(self.screen.numDesktops()):
|
names = self.screen.desktopNames()
|
||||||
self.items.append(
|
num = self.screen.numDesktops()
|
||||||
_CycleDesktops.Desktop(self.screen.desktopName(i), i))
|
for n, i in zip(names[:num], range(num)):
|
||||||
|
self.items.append(_CycleDesktops.Desktop(n, i))
|
||||||
|
|
||||||
def menuLabel(self, desktop):
|
def menuLabel(self, desktop):
|
||||||
return desktop.name
|
return desktop.name
|
||||||
|
|
Loading…
Reference in a new issue