From 39684dea75c0a79e66918553359d881c82588b25 Mon Sep 17 00:00:00 2001 From: chrys Date: Tue, 22 Jan 2019 00:37:07 +0100 Subject: [PATCH] cleanup --- .gitignore | 2 + .../core/.vmenuManager.py.kate-swp | Bin 6220 -> 0 bytes src/fenrirscreenreader/core/vmenuManager.py | 76 +++++++----------- 3 files changed, 32 insertions(+), 46 deletions(-) delete mode 100644 src/fenrirscreenreader/core/.vmenuManager.py.kate-swp diff --git a/.gitignore b/.gitignore index 44dcf257..eff77b75 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ fenrir.egg-info/ fenrir_screenreader.egg-info/ dist/ build/ +*.kate-swp +.directory diff --git a/src/fenrirscreenreader/core/.vmenuManager.py.kate-swp b/src/fenrirscreenreader/core/.vmenuManager.py.kate-swp deleted file mode 100644 index ba64aada704668f8d841f72420223042154c6c63..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6220 zcmbW5TW?iG6vxj_06EI_&hg+bOmQwB|RT?RXT#Qu1gE6Kl2WV0X=>;|Fvv0oo z4g3^7`0A61`skP78@PV|z1Eq%J*t9i%nU3TxD>*G#}3hpr6 zS#Z1Ij=A|;_J_7$^|Ub7Rj)A4s+Gd@Rc+Mnw%Pk}yU)zcKd?W-+7ho^Tf2Uh;;mL( ztrc#=-XYE2hL=k{gRCAErk84>uqN=LuqNOWqD~V?{xt!g5cRw9XA?pYxC7rUya(jh7Q}p@SgW;Jhj+DpSa=X`X>>#IOmPPf7o@|X@C8&0#g}HjSXeW+k&`Ca zdR|0xRj(Iw3A0pK!X#lOOd9GNg|VTBe@!h3r>Wg2^}~(f?}by~_rWPq_QTdc(_w5R zLZ{9=VeOewa&02e*tir1sEJuh1rYh1O$3y<+FFffc(n9mVb>k)W2l8ZEtvU0L20$<$g&>XD#c zkxb$!a?`c+)bFib=zVeZ&uc$Xr+)L<#%@q(4x7O(sE9`?h?AFyR%aee89X?@RE7|sI1SwJ`o2unauL0AHMz~B%t`d5Pc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tutorialListIndex = 0 + self.menuDict = {} + #for command in sorted(self.env['commands'][section].keys()): + # self.menuDict[len(self.menuDict)] = self.getCommandHelpText(command, section) + if len(self.menuDict) > 0: + self.currIndex = 0 else: - self.tutorialListIndex = None + self.currIndex = None def getHelpForCurrentIndex(self): - if self.tutorialListIndex == None: + if self.currIndex == None: return '' - return self.helpDict[self.tutorialListIndex] + return self.menuDict[self.currIndex] def nextIndex(self): - if self.tutorialListIndex == None: + if self.currIndex == None: return - self.tutorialListIndex += 1 - if self.tutorialListIndex >= len(self.helpDict): - self.tutorialListIndex = 0 + self.currIndex += 1 + if self.currIndex >= len(self.menuDict): + self.currIndex = 0 def prevIndex(self): - if self.tutorialListIndex == None: + if self.currIndex == None: return - self.tutorialListIndex -= 1 - if self.tutorialListIndex < 0: - self.tutorialListIndex = len(self.helpDict) - 1 + self.currIndex -= 1 + if self.currIndex < 0: + self.currIndex = len(self.menuDict) - 1