source: projects/specs/trunk/g/gdm2setup/gdm2setup-0.5.3-fix-timedlogin.patch @ 4285

Revision 4285, 2.0 KB checked in by daisuke, 13 years ago (diff)

gdm2setup: add patch

  • gdm2setup-0.5.3-lucid/gdm2/gdm2gconf.py

    diff -up gdm2setup-0.5.3-lucid/gdm2/gdm2gconf.py.fix-timedlogin gdm2setup-0.5.3-lucid/gdm2/gdm2gconf.py
    old new class GDM2Theme(object):  
    6363            config = ConfigParser.RawConfigParser() 
    6464            config.optionxform = str 
    6565            config.read(self.GDMCONF_FILE) 
    66             return config.getboolean('daemon', 'AutomaticLoginEnable') 
     66            TimedLoginEnable = config.getboolean('daemon', 'TimedLoginEnable') 
     67            AutomaticLoginEnable = config.getboolean('daemon', 'AutomaticLoginEnable') 
     68            if TimedLoginEnable == True or AutomaticLoginEnable == True: 
     69                return True 
    6770        except: 
    6871            return False 
    6972     
    class GDM2Theme(object):  
    8285            config = ConfigParser.RawConfigParser() 
    8386            config.optionxform = str 
    8487            config.read(self.GDMCONF_FILE) 
     88            if AutomaticLoginEnable: 
     89                config.set('daemon','TimedLoginEnable','False') 
     90            else: 
     91                config.set('daemon','TimedLoginEnable','True') 
    8592            config.set('daemon','AutomaticLoginEnable',AutomaticLoginEnable) 
    8693            config.set('daemon','AutomaticLogin',User) 
    8794            with open(self.GDMCONF_FILE, 'wb') as configfile: 
    class GDM2Theme(object):  
    143150            config = ConfigParser.RawConfigParser() 
    144151            config.optionxform = str 
    145152            config.read(self.GDMCONF_FILE) 
     153            AutomaticLogin = config.get('daemon', 'AutomaticLogin') 
     154            if TimedLoginEnable or AutomaticLogin == 'None': 
     155                config.set('daemon','AutomaticLoginEnable','False') 
     156            else: 
     157                config.set('daemon','AutomaticLoginEnable','True') 
    146158            config.set('daemon','TimedLoginEnable',TimedLoginEnable) 
    147159            config.set('daemon','TimedLogin',User) 
    148160            config.set('daemon','TimedLoginDelay',TimedLoginDelay) 
Note: See TracBrowser for help on using the repository browser.