소스 검색

Safer checking of proprietary preference

Billy Barrow 2 년 전
부모
커밋
4c5418fe75
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      src/Wizards/Video.vala

+ 1 - 4
src/Wizards/Video.vala

@@ -296,7 +296,7 @@ namespace Publicate.Wizards {
     }
 
     private class ProprietaryCodecsRow : ActionRow {
-        public bool use_proprietary_codecs { get; private set; }
+        public bool use_proprietary_codecs { get { return gtk_switch.active; } }
         private Switch gtk_switch;
         private ViewerWindow toplevel;
 
@@ -318,7 +318,6 @@ namespace Publicate.Wizards {
 
         public void confirm_change() {
             if(!gtk_switch.active) {
-                use_proprietary_codecs = false;
                 return;
             }
             var prompt = new Adw.MessageDialog(toplevel, "Enable Proprietary Codecs?", "This will enable the H.264 codec which is needed for this PPUB to be playable on iOS Safari, but there may be restrictive patient licences that apply to its use.");
@@ -337,13 +336,11 @@ namespace Publicate.Wizards {
                     gtk_switch.active = false;
                 }
                 prompt.close();
-                use_proprietary_codecs = gtk_switch.active;
             });
             prompt.present();
         }
 
         public void reset() {
-            use_proprietary_codecs = false;
             gtk_switch.active = false;
         }
     }