X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=NewBranch.vala;h=f27c90509acc08dd6c7d29b80d7822434c923e11;hb=0e9fc3ea0deeb29e7023b0410cf7713f7adec001;hp=bcb6a0b5640534dbeb8db1b90357600504fec569;hpb=d5b2b1810b920459f527a2be1dbaad465c313c49;p=gitlive diff --git a/NewBranch.vala b/NewBranch.vala index bcb6a0b5..f27c9050 100644 --- a/NewBranch.vala +++ b/NewBranch.vala @@ -55,17 +55,7 @@ public class NewBranch : Object }); this.el.show.connect( (self) => { - - this.el.move((Gdk.Screen.width() / 2)- 250 ,0); - - - - this.el.show_all(); - GLib.debug("Loading tickets"); - _this.dbmodel.loadTickets(); - - this.el.run(); //test }); } @@ -74,7 +64,15 @@ public class NewBranch : Object public void show ( ) { // this.el.set_gravity(Gdk.Gravity.NORTH); - + + this.el.move((Gdk.Screen.width() / 2)- 250 ,0); + GLib.debug("Loading tickets"); + _this.dbmodel.loadTickets(); + + this.el.show_all(); + + + } @@ -114,11 +112,13 @@ public class NewBranch : Object public Xcls_Table3(NewBranch _owner ) { _this = _owner; - this.el = new Gtk.Table( 2, 2, true ); + this.el = new Gtk.Table( 2, 2, false ); // my vars (dec) // set gobject values + this.el.margin = 2; + this.el.column_spacing = 2; var child_0 = new Xcls_Label4( _this ); child_0.ref(); this.el.attach_defaults ( child_0.el , 0,1,0,1 ); @@ -188,6 +188,19 @@ public class NewBranch : Object // init method this.el.add_attribute(_this.dbcellrenderer.el , "markup", 1 ); + + //listeners + this.el.changed.connect( () => { + Gtk.TreeIter iter; + Value val1; + Value val2; + + this.el.get_active_iter (out iter); + _this.dbmodel.el.get_value (iter, 0, out val1); + _this.dbmodel.el.get_value (iter, 1, out val2); + + print ("Selection: %s, %d\n", (string) val1, (int) val2); + }); } // user defined functions @@ -260,7 +273,7 @@ public class NewBranch : Object el.append(out iter); el.set_value(iter, 0, ticket.id); - el.set_value(iter, 1, "#%s %s %s".printf( ticket.id, ticket.project_id_name , ticket.summary)); + el.set_value(iter, 1, "#%s [%s] %s".printf( ticket.id, ticket.project_id_name , ticket.summary)); //if (data.get(i) == cur) { // _this.build_module.el.set_active_iter(iter);