43 self.__password = "" |
43 self.__password = "" |
44 self.__ident = Utilities.getUserName() |
44 self.__ident = Utilities.getUserName() |
45 |
45 |
46 self.__rememberPosOnAway = True |
46 self.__rememberPosOnAway = True |
47 self.__awayMessage = IrcIdentity.DefaultAwayMessage |
47 self.__awayMessage = IrcIdentity.DefaultAwayMessage |
48 self.__autoAway = False |
|
49 self.__autoAwayTimeout = 1 |
|
50 self.__autoReturn = False |
|
51 |
48 |
52 self.__quitMessage = IrcIdentity.DefaultQuitMessage |
49 self.__quitMessage = IrcIdentity.DefaultQuitMessage |
53 self.__partMessage = IrcIdentity.DefaultPartMessage |
50 self.__partMessage = IrcIdentity.DefaultPartMessage |
54 |
51 |
55 def save(self, settings): |
52 def save(self, settings): |
66 settings.setValue("Password", self.__password) |
63 settings.setValue("Password", self.__password) |
67 settings.setValue("QuitMessage", self.__quitMessage) |
64 settings.setValue("QuitMessage", self.__quitMessage) |
68 settings.setValue("PartMessage", self.__partMessage) |
65 settings.setValue("PartMessage", self.__partMessage) |
69 settings.setValue("RememberAwayPosition", self.__rememberPosOnAway) |
66 settings.setValue("RememberAwayPosition", self.__rememberPosOnAway) |
70 settings.setValue("AwayMessage", self.__awayMessage) |
67 settings.setValue("AwayMessage", self.__awayMessage) |
71 settings.setValue("AutoAway", self.__autoAway) |
|
72 settings.setValue("AwayTimeout", self.__autoAwayTimeout) |
|
73 settings.setValue("AutoReturn", self.__autoReturn) |
|
74 |
68 |
75 def load(self, settings): |
69 def load(self, settings): |
76 """ |
70 """ |
77 Public method to load the identity data. |
71 Public method to load the identity data. |
78 |
72 |
86 self.__quitMessage = settings.value("QuitMessage", IrcIdentity.DefaultQuitMessage) |
80 self.__quitMessage = settings.value("QuitMessage", IrcIdentity.DefaultQuitMessage) |
87 self.__partMessage = settings.value("PartMessage", IrcIdentity.DefaultPartMessage) |
81 self.__partMessage = settings.value("PartMessage", IrcIdentity.DefaultPartMessage) |
88 self.__rememberPosOnAway = Preferences.toBool( |
82 self.__rememberPosOnAway = Preferences.toBool( |
89 settings.value("RememberAwayPosition", True)) |
83 settings.value("RememberAwayPosition", True)) |
90 self.__awayMessage = settings.value("AwayMessage", IrcIdentity.DefaultAwayMessage) |
84 self.__awayMessage = settings.value("AwayMessage", IrcIdentity.DefaultAwayMessage) |
91 self.__autoAway = Preferences.toBool(settings.value("AutoAway", False)) |
|
92 self.__autoAwayTimeout = int(settings.value("AwayTimeout", 1)) |
|
93 self.__autoReturn = Preferences.toBool(settings.value("AutoReturn", False)) |
|
94 |
85 |
95 def setName(self, name): |
86 def setName(self, name): |
96 """ |
87 """ |
97 Public method to set the identity name. |
88 Public method to set the identity name. |
98 |
89 |
258 Public method to get the AWAY message. |
249 Public method to get the AWAY message. |
259 |
250 |
260 @return AWAY message (string) |
251 @return AWAY message (string) |
261 """ |
252 """ |
262 return self.__awayMessage |
253 return self.__awayMessage |
263 |
|
264 def setAutoAway(self, on): |
|
265 """ |
|
266 Public method to set the auto away function. |
|
267 |
|
268 @param on flag indicating to enable the auto away function (boolean) |
|
269 """ |
|
270 self.__autoAway = on |
|
271 |
|
272 def autoAway(self): |
|
273 """ |
|
274 Public method to get the auto away flag. |
|
275 |
|
276 @return auto away flag (boolean) |
|
277 """ |
|
278 return self.__autoAway |
|
279 |
|
280 def setAutoAwayTimeout(self, minutes): |
|
281 """ |
|
282 Public method to set the auto away timeout. |
|
283 |
|
284 @param minutes auto away timeout in minutes (integer) |
|
285 """ |
|
286 self.__autoAwayTimeout = minutes |
|
287 |
|
288 def getAutoAwayTimeout(self): |
|
289 """ |
|
290 Public method to get the auto away timeout. |
|
291 |
|
292 @return auto away timeout in minutes (integer) |
|
293 """ |
|
294 return self.__autoAwayTimeout |
|
295 |
|
296 def setAutoReturn(self, on): |
|
297 """ |
|
298 Public method to set the auto return function. |
|
299 |
|
300 @param on flag indicating to enable the auto return function (boolean) |
|
301 """ |
|
302 self.__autoReturn = on |
|
303 |
|
304 def autoReturn(self): |
|
305 """ |
|
306 Public method to get the auto return flag. |
|
307 |
|
308 @return auto return flag (boolean) |
|
309 """ |
|
310 return self.__autoReturn |
|
311 |
254 |
312 @classmethod |
255 @classmethod |
313 def createDefaultIdentity(cls): |
256 def createDefaultIdentity(cls): |
314 """ |
257 """ |
315 Class method to create the default identity. |
258 Class method to create the default identity. |