3 public class Clone : Object
8 public static Clone singleton()
15 public Xcls_reposel reposel;
16 public Xcls_prcellrenderer prcellrenderer;
17 public Xcls_prmodel prmodel;
26 this.el = new Gtk.Popover( null );
31 this.el.border_width = 0;
33 this.el.position = Gtk.PositionType.RIGHT;
34 var child_0 = new Xcls_Box2( _this );
36 this.el.pack_end ( child_0.el , false,false,0 );
39 // user defined functions
40 public void show (Gtk.Widget btn, GitRepo repo) {
42 //console.log('show all');
43 this.el.set_modal(true);
44 this.el.set_relative_to(btn);
46 //this.el.set_position(Gtk.PositionType.RIGHT);
49 GLib.debug("SHOWALL - POPIP\n");
53 public class Xcls_Box2 : Object
62 public Xcls_Box2(Clone _owner )
65 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
70 this.el.expand = false;
71 this.el.vexpand = false;
72 var child_0 = new Xcls_reposel( _this );
74 this.el.attach_defaults ( child_0.el , 0,1,1,2 );
75 var child_1 = new Xcls_Button6( _this );
77 this.el.add ( child_1.el );
80 // user defined functions
82 public class Xcls_reposel : Object
84 public Gtk.ComboBox el;
92 public Xcls_reposel(Clone _owner )
96 this.el = new Gtk.ComboBox.with_entry();
101 // set gobject values
102 this.el.hexpand = true;
103 var child_0 = new Xcls_prcellrenderer( _this );
105 this.el.pack_start ( child_0.el , true );
106 var child_1 = new Xcls_prmodel( _this );
108 this.el.set_model ( child_1.el );
112 this.el.set_entry_text_column(1);
115 // user defined functions
116 public string selectedRepo () {
121 this.el.get_active_iter (out iter);
122 _this.repomodel.el.get_value (iter, 0, out val1);
125 return (string) val1;
132 public class Xcls_prcellrenderer : Object
134 public Gtk.CellRendererText el;
141 public Xcls_prcellrenderer(Clone _owner )
144 _this.prcellrenderer = this;
145 this.el = new Gtk.CellRendererText();
149 // set gobject values
152 // user defined functions
155 public class Xcls_prmodel : Object
157 public Gtk.ListStore el;
164 public Xcls_prmodel(Clone _owner )
167 _this.prmodel = this;
168 this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
172 // set gobject values
175 // user defined functions
176 public void loadProjects (string id) {
178 var rt = RooTicket.singleton();
180 _this.reposel.loading = true;
189 el.set_value(iter, 0, "");
190 el.set_value(iter, 1, "-- select a project --");
192 _this.projectsel.el.set_active_iter(iter);
194 var projects = rt.projects;
195 foreach(var project in projects) {
199 el.set_value(iter, 0, project.id);
200 el.set_value(iter, 1, project.name );
201 if (id == project.id) {
202 _this.projectsel.el.set_active_iter(iter);
207 _this.projectsel.loading = false;
208 //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);
214 public class Xcls_Button6 : Object
216 public Gtk.Button el;
223 public Xcls_Button6(Clone _owner )
226 this.el = new Gtk.Button();
230 // set gobject values
231 this.el.label = "Checkout";
234 this.el.button_press_event.connect( () => {
240 // user defined functions