1234567891011121314151617181920212223242526272829303132333435363738 |
- diff -up gdm2setup-0.5.3-lucid/gdm2/gdm2gconf.py.fix-timedlogin gdm2setup-0.5.3-lucid/gdm2/gdm2gconf.py
- --- gdm2setup-0.5.3-lucid/gdm2/gdm2gconf.py.fix-timedlogin 2011-07-05 09:08:36.818889819 +0900
- +++ gdm2setup-0.5.3-lucid/gdm2/gdm2gconf.py 2011-07-05 09:09:20.039889819 +0900
- @@ -63,7 +63,10 @@ class GDM2Theme(object):
- config = ConfigParser.RawConfigParser()
- config.optionxform = str
- config.read(self.GDMCONF_FILE)
- - return config.getboolean('daemon', 'AutomaticLoginEnable')
- + TimedLoginEnable = config.getboolean('daemon', 'TimedLoginEnable')
- + AutomaticLoginEnable = config.getboolean('daemon', 'AutomaticLoginEnable')
- + if TimedLoginEnable == True or AutomaticLoginEnable == True:
- + return True
- except:
- return False
-
- @@ -82,6 +85,10 @@ class GDM2Theme(object):
- config = ConfigParser.RawConfigParser()
- config.optionxform = str
- config.read(self.GDMCONF_FILE)
- + if AutomaticLoginEnable:
- + config.set('daemon','TimedLoginEnable','False')
- + else:
- + config.set('daemon','TimedLoginEnable','True')
- config.set('daemon','AutomaticLoginEnable',AutomaticLoginEnable)
- config.set('daemon','AutomaticLogin',User)
- with open(self.GDMCONF_FILE, 'wb') as configfile:
- @@ -143,6 +150,11 @@ class GDM2Theme(object):
- config = ConfigParser.RawConfigParser()
- config.optionxform = str
- config.read(self.GDMCONF_FILE)
- + AutomaticLogin = config.get('daemon', 'AutomaticLogin')
- + if TimedLoginEnable or AutomaticLogin == 'None':
- + config.set('daemon','AutomaticLoginEnable','False')
- + else:
- + config.set('daemon','AutomaticLoginEnable','True')
- config.set('daemon','TimedLoginEnable',TimedLoginEnable)
- config.set('daemon','TimedLogin',User)
- config.set('daemon','TimedLoginDelay',TimedLoginDelay)
|