2 Simple wrapper around selected vapi packages
6 public class Project.VapiSelection : Object
9 public string name { get; set; }
10 public string sortkey {
12 return (this.vapi_list.contains(this.name)? "A" : "Z" ) + "-"+ this.name;
17 public bool selected {
19 var res = this.vapi_list.contains(this.name);
20 GLib.debug("vapi %s = %s", this.name, res ? "X" : "");
25 if (!vapi_list.contains(this.name)) {
26 GLib.debug("vapi set %s = X", this.name);
27 this.vapi_list.add(this.name);
29 if (this.btn != null) {
30 this.btn.active = true;
35 if (vapi_list.contains(this.name)) {
36 GLib.debug("vapi set %s = .", this.name);
37 this.vapi_list.remove(this.name);
38 if (this.btn != null) {
39 this.btn.active = false;
47 Gee.ArrayList<string> vapi_list;
48 public global::Gtk.CheckButton? btn = null;
50 public VapiSelection( Gee.ArrayList<string> vapi_list, string name)
52 //this.project = project;
53 this.vapi_list = vapi_list;