Plugins/PluginVcsPySvn.py

changeset 7
c679fb30c8f3
parent 0
de9c2efb9d02
child 13
1af94a91f439
equal deleted inserted replaced
6:52e8c820d0dd 7:c679fb30c8f3
8 """ 8 """
9 9
10 import os 10 import os
11 import sys 11 import sys
12 12
13 from PyQt4.QtCore import QVariant
14 from PyQt4.QtGui import QApplication 13 from PyQt4.QtGui import QApplication
15 14
16 from E4Gui.E4Application import e4App 15 from E4Gui.E4Application import e4App
17 16
18 import Preferences 17 import Preferences
187 186
188 @param key the key of the value to get 187 @param key the key of the value to get
189 @param prefClass preferences class used as the storage area 188 @param prefClass preferences class used as the storage area
190 @return the requested refactoring setting 189 @return the requested refactoring setting
191 """ 190 """
192 if key in ["Commits"]: 191 if key in ["StopLogOnCopy"]:
193 return Preferences.Prefs.settings.value("Subversion/" + key).toStringList() 192 return Preferences.toBool(Preferences.Prefs.settings.value(
194 else: 193 "Subversion/" + key, self.__subversionDefaults[key]))
195 return Preferences.Prefs.settings.value("Subversion/" + key, 194 elif key in ["LogLimit", "CommitMessages"]:
196 QVariant(self.__subversionDefaults[key])).toInt()[0] 195 return int(Preferences.Prefs.settings.value("Subversion/" + key,
196 self.__subversionDefaults[key]))
197 elif key in ["Commits"]:
198 return Preferences.toList(Preferences.Prefs.settings.value(
199 "Subversion/" + key))
200 else:
201 return Preferences.Prefs.settings.value("Subversion/" + key)
197 202
198 def setPreferences(self, key, value): 203 def setPreferences(self, key, value):
199 """ 204 """
200 Public method to store the various refactoring settings. 205 Public method to store the various refactoring settings.
201 206
202 @param key the key of the setting to be set 207 @param key the key of the setting to be set
203 @param value the value to be set 208 @param value the value to be set
204 @param prefClass preferences class used as the storage area 209 @param prefClass preferences class used as the storage area
205 """ 210 """
206 Preferences.Prefs.settings.setValue("Subversion/" + key, QVariant(value)) 211 Preferences.Prefs.settings.setValue("Subversion/" + key, value)
207 212
208 def getServersPath(self): 213 def getServersPath(self):
209 """ 214 """
210 Public method to get the filename of the servers file. 215 Public method to get the filename of the servers file.
211 216

eric ide

mercurial