public void InitForUninstall(Addin[] info) { this.uninstallIds = info.Select(a => a.Id); buttonOk.Label = Catalog.GetString("Uninstall"); HashSet <Addin> sinfos = new HashSet <Addin> (); StringBuilder sb = new StringBuilder(); sb.Append("<b>").Append(Catalog.GetString("The following packages will be uninstalled:")).Append("</b>\n\n"); foreach (var a in info) { sb.Append(a.Name + "\n\n"); sinfos.UnionWith(service.GetDependentAddins(a.Id, true)); } if (sinfos.Count > 0) { sb.Append("<b>").Append(Catalog.GetString("There are other extension packages that depend on the previous ones which will also be uninstalled:")).Append("</b>\n\n"); foreach (Addin si in sinfos) { sb.Append(si.Description.Name + "\n"); } } ShowMessage(sb.ToString()); Services.PlaceDialog(this, TransientFor); }
public NewSiteDialog(Gtk.Window parent) { Build(); TransientFor = parent; Services.PlaceDialog(this, parent); pathEntry.Sensitive = false; CheckValues(); }
public InstallDialog(Gtk.Window parent, SetupService service) { this.Build(); this.service = service; TransientFor = parent; WindowPosition = Gtk.WindowPosition.CenterOnParent; Services.PlaceDialog(this, parent); boxProgress.Visible = false; Resizable = false; }
public ManageSitesDialog(Gtk.Window parent, SetupService service) { Build(); TransientFor = parent; Services.PlaceDialog(this, parent); this.service = service; treeStore = new Gtk.ListStore(typeof(string), typeof(string), typeof(bool)); repoTree.Model = treeStore; repoTree.HeadersVisible = false; var crt = new Gtk.CellRendererToggle(); crt.Toggled += HandleRepoToggled; repoTree.AppendColumn("", crt, "active", 2); repoTree.AppendColumn("", new Gtk.CellRendererText(), "markup", 1); repoTree.Selection.Changed += new EventHandler(OnSelect); AddinRepository[] reps = service.Repositories.GetRepositories(); foreach (AddinRepository rep in reps) { AppendRepository(rep); } btnRemove.Sensitive = false; }
public AddinManagerDialog(Window parent) { Build(); TransientFor = parent; HasSeparator = false; Services.PlaceDialog(this, parent); Show(); addininfoInstalled.Init(service); addininfoGallery.Init(service); addinTree.Selection.Mode = SelectionMode.Multiple; tree = new AddinTreeWidget(addinTree); addinTree.Selection.Changed += OnSelectionChanged; tree.VersionVisible = false; galleryTreeView.Selection.Mode = SelectionMode.Multiple; galleryTree = new AddinTreeWidget(galleryTreeView); galleryTree.VersionVisible = false; galleryTree.ShowInstalledMarkers = true; galleryTreeView.Selection.Changed += OnGallerySelectionChanged; updatesTreeView.Selection.Mode = SelectionMode.Multiple; updatesTree = new AddinTreeWidget(updatesTreeView); updatesTree.VersionVisible = false; updatesTree.ShowCategories = false; updatesTree.ShowInstalledMarkers = true; updatesTreeView.Selection.Changed += OnGallerySelectionChanged; repoStore = new ListStore(typeof(string), typeof(string)); repoCombo.Model = repoStore; CellRendererText crt = new CellRendererText(); repoCombo.PackStart(crt, true); repoCombo.AddAttribute(crt, "text", 0); repoCombo.RowSeparatorFunc = delegate(TreeModel model, TreeIter iter) { string val = (string)model.GetValue(iter, 0); return(val == "---"); }; // Make sure the tree has the focus when switching tabs vboxUpdates.FocusChain = new Widget [] { scrolledUpdates, eboxRepoUpdates }; vboxGallery.FocusChain = new Widget [] { scrolledGallery, eboxRepo }; // Improve the look of the headers HBox tab = new HBox(false, 3); tab.PackStart(new Image(Gdk.Pixbuf.LoadFromResource("plugin-22.png")), false, false, 0); installedTabLabel = new Label(Catalog.GetString("Installed")); tab.PackStart(installedTabLabel, true, true, 0); tab.BorderWidth = 3; tab.ShowAll(); notebook.SetTabLabel(notebook.GetNthPage(0), tab); tab = new HBox(false, 3); tab.PackStart(new Image(Gdk.Pixbuf.LoadFromResource("plugin-update-22.png")), false, false, 0); updatesTabLabel = new Label(Catalog.GetString("Updates")); tab.PackStart(updatesTabLabel, true, true, 0); tab.BorderWidth = 3; tab.ShowAll(); notebook.SetTabLabel(notebook.GetNthPage(1), tab); tab = new HBox(false, 3); tab.PackStart(new Image(Gdk.Pixbuf.LoadFromResource("system-software-update_22.png")), false, false, 0); galleryTabLabel = new Label(Catalog.GetString("Gallery")); tab.PackStart(galleryTabLabel, true, true, 0); tab.BorderWidth = 3; tab.ShowAll(); notebook.SetTabLabel(notebook.GetNthPage(2), tab); // Gradient header for the updates and gallery tabs HeaderBox hb = new HeaderBox(1, 0, 1, 1); hb.SetPadding(6, 6, 6, 6); hb.GradientBackround = true; hb.Show(); hb.Replace(eboxRepo); hb = new HeaderBox(1, 0, 1, 1); hb.SetPadding(6, 6, 6, 6); hb.GradientBackround = true; hb.Show(); hb.Replace(eboxRepoUpdates); InsertFilterEntry(); FillRepos(); repoCombo.Active = 0; LoadAll(); }
public ProgressDialog(Gtk.Window parent) { this.Build(); Services.PlaceDialog(this, parent); }
public ProgressDialog(Gtk.Window parent) { this.Build(); this.parent = new WeakReference <Gtk.Window> (parent); Services.PlaceDialog(this, parent); }
public void InitForInstall(string[] filesToInstall) { this.filesToInstall = filesToInstall; FillSummaryPage(); Services.PlaceDialog(this, TransientFor); }
public void InitForInstall(AddinRepositoryEntry[] addinsToInstall) { this.addinsToInstall = addinsToInstall; FillSummaryPage(); Services.PlaceDialog(this, TransientFor); }