public ConfirmShutdownDialog() { ListView.Model = new ListStore(typeof(string), typeof(Job)); ListView.AppendColumn("Error", new CellRendererText(), "text", 0); ListView.HeadersVisible = false; Header = Catalog.GetString("Important tasks are running"); Title = ""; Message = Catalog.GetString( "Closing Banshee now will cancel any currently running tasks. They cannot " + "be resumed automatically the next time Banshee is run."); DialogIconNameStock = Stock.DialogWarning; DefaultResponse = ResponseType.Cancel; AddButton(Catalog.GetString("Quit Anyway"), ResponseType.Ok, false); AddButton(Catalog.GetString("Continue Running"), ResponseType.Cancel, true); scheduler = ServiceManager.JobScheduler; foreach (Job job in scheduler.Jobs) { AddJob(job); } scheduler.JobAdded += AddJob; scheduler.JobRemoved += RemoveJob; }
public ImportFailureDialog(List <Uri> files) { BuildUI(); ListView.Model = new ListStore(typeof(string), typeof(string)); ListView.AppendColumn("Filename", new CellRendererText(), "text", 0); ListView.AppendColumn("Path", new CellRendererText(), "text", 1); ListView.HeadersVisible = false; Title = Strings.ImportFailures; Header = Strings.SomeFilesFailedToImport; Message = Strings.SomeFilesCouldNotBeImportedMightBeCorruptOrWrongWithStorage; foreach (var uri in files) { (ListView.Model as ListStore).AppendValues(uri.GetFilename(), uri.GetBaseUri().ToString()); } }
public ImportFailureDialog(List <SafeUri> files) : base() { BuildUI(); ListView.Model = new ListStore(typeof(string), typeof(string)); ListView.AppendColumn("Filename", new CellRendererText(), "text", 0); ListView.AppendColumn("Path", new CellRendererText(), "text", 1); ListView.HeadersVisible = false; Title = Catalog.GetString("Import failures"); Header = Catalog.GetString("Some files failed to import"); Message = Catalog.GetString("Some files could not be imported, they might be corrupt " + "or there might be something wrong with the storage on which they reside."); foreach (SafeUri uri in files) { (ListView.Model as ListStore).AppendValues(uri.GetFilename(), uri.GetBaseUri().ToString()); } }