fixed duplicate entry and entry for 'unknown' in the button config list
[deb_libcec.git] / src / LibCecTray / controller / applications / ApplicationController.cs
index 6234b4cf991904538ba347f6947c8b3a3d410d35..4d23071946db8ecfff2e61d5fc32c9a4e5240581 100644 (file)
@@ -285,7 +285,7 @@ namespace LibCECTray.controller.applications
       {
         if (!Settings.ContainsKey(ProcessName + "_autostart"))
         {
-          CECSettingBool setting = new CECSettingBool(ProcessName + "_autostart", "Autostart application", true, null);
+          CECSettingBool setting = new CECSettingBool(ProcessName + "_autostart", "Autostart application", false, null);
           Settings.Load(setting);
           Settings[ProcessName + "_autostart"] = setting;
         }
@@ -353,18 +353,7 @@ namespace LibCECTray.controller.applications
     private CecButtonConfig _buttonConfig;
     public CecButtonConfig ButtonConfig
     {
-      get
-      {
-        if (_buttonConfig == null)
-        {
-          _buttonConfig = new CecButtonConfig(this);
-          foreach (CecUserControlCode key in Enum.GetValues(typeof(CecUserControlCode)))
-            _buttonConfig.Add(new CecButtonConfigItem(this, (new CecKeypress { Keycode = key })));
-
-          _buttonConfig.Load();
-        }
-        return _buttonConfig;
-      }
+      get { return _buttonConfig ?? (_buttonConfig = new CecButtonConfig(this)); }
     }
 
     public CECSettings Settings;