Browse Source

Safer checking of proprietary preference

Billy Barrow 2 years ago
parent
commit
4c5418fe75
1 changed files with 1 additions and 4 deletions
  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;
         }
     }