void AddCreatePackageSection(Gtk.VBox vbox, string label, PackagingProject parentProject, bool showCheck) { Gtk.VBox vboxNewPacks; Gtk.Widget hbox; if (showCheck) { Gtk.CheckButton check = new Gtk.CheckButton(label); check.Show(); vbox.PackStart(check, false, false, 0); AddBox(vbox, out hbox, out vboxNewPacks); check.Toggled += delegate { hbox.Visible = check.Active; if (!check.Active) { DisableChecks(hbox); } }; } else { Gtk.Label lab = new Gtk.Label(label); lab.Show(); vbox.PackStart(lab, false, false, 0); AddBox(vbox, out hbox, out vboxNewPacks); hbox.Show(); } ICollection builders; if (creatingPackProject) { builders = DeployService.GetPackageBuilders(); } else { builders = DeployService.GetSupportedPackageBuilders(entry); } foreach (PackageBuilder pb in builders) { if (creatingPackProject) { pb.SetSolutionItem(parentFolder.ParentSolution.RootFolder); // Add all compatible projects foreach (SolutionItem e in parentFolder.ParentSolution.GetAllSolutionItems()) { if (pb.CanBuild(e)) { pb.AddEntry(e); } } } else { pb.SetSolutionItem(parentFolder, new SolutionItem [] { entry }); } PackageBuilder[] defp = pb.CreateDefaultBuilders(); if (defp.Length == 0) { continue; } if (defp.Length == 1) { AddPackageBuilder(vboxNewPacks, parentProject, defp[0]); } else { Gtk.CheckButton checkBuilder = new Gtk.CheckButton(pb.Description); checkBuilder.Show(); vboxNewPacks.PackStart(checkBuilder, false, false, 0); Gtk.VBox vboxDefPacks; Gtk.Widget thbox; AddBox(vboxNewPacks, out thbox, out vboxDefPacks); checkBuilder.Toggled += delegate { thbox.Visible = checkBuilder.Active; if (!checkBuilder.Active) { DisableChecks(thbox); } }; foreach (PackageBuilder dp in defp) { AddPackageBuilder(vboxDefPacks, parentProject, dp); } } } }