Exemplo n.º 1
0
        public IPhoneBuildOptionsWidget()
        {
            IPhoneFramework.CheckInfoCaches();

            this.Build();
            extraArgsEntry.AddOptions(menuOptions);

            linkCombo.AppendText("Don't link");               //MtouchLinkMode.None
            linkCombo.AppendText("Link SDK assemblies only"); //MtouchLinkMode.SdkOnly
            linkCombo.AppendText("Link all assemblies");      //MtouchLinkMode.All

            i18nTreeView.Model = i18nStore;
            sdkCombo.Model     = sdkStore;
            archCombo.Model    = archStore;

            var toggle = new CellRendererToggle();

            i18nTreeView.AppendColumn("", toggle, "active", 1);
            i18nTreeView.AppendColumn("", new CellRendererText(), "text", 0);
            i18nTreeView.HeadersVisible = false;
            toggle.Toggled += delegate(object o, ToggledArgs args) {
                TreeIter iter;
                if (i18nStore.GetIter(out iter, new TreePath(args.Path)))
                {
                    i18nStore.SetValue(iter, 1, !(bool)i18nStore.GetValue(iter, 1));
                }
            };

            sdkCombo.Changed += HandleSdkComboChanged;
            minOSComboEntry.Entry.Changed += delegate {
                UpdateArches();
            };

            enableMtouch4Features = IPhoneFramework.MonoTouchVersion >= new IPhoneSdkVersion(3, 99);
            if (enableMtouch4Features)
            {
                useLlvmCheck.Toggled += UpdateCodegenCheckSensitivity;
                archCombo.Changed    += UpdateCodegenCheckSensitivity;
            }
            else
            {
                advancedVbox.Remove(codeGenerationLabel);
                codeGenerationLabel.Destroy();
                advancedVbox.Remove(codeGenerationAlignment);
                codeGenerationAlignment.Destroy();
                advancedVbox.Remove(runtimeOptionsLabel);
                runtimeOptionsLabel.Destroy();
                advancedVbox.Remove(runtimeOptionsAlignment);
                runtimeOptionsAlignment.Destroy();
            }

            //sGen is currently unsupported
            if (enableMtouch4Features)
            {
                useSGenCheck.Sensitive = false;
            }

            this.ShowAll();
        }