X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=NewBranch.vala;h=c543aa10bb80bd0cdb17d62e6971da6a779510f0;hb=d865ed50506c818daead1fdc7beaabcbfeb0bd21;hp=d19df7b3c8fc34228f570c38b6954c0f547c9487;hpb=e3c663a218985b982923470676563178a372acaf;p=gitlive diff --git a/NewBranch.vala b/NewBranch.vala index d19df7b3..c543aa10 100644 --- a/NewBranch.vala +++ b/NewBranch.vala @@ -55,15 +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(); - + //test }); } @@ -72,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(); + + + } @@ -112,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 ); @@ -186,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.dbmodelel..get_value (iter, 1, out val2); + + print ("Selection: %s, %d\n", (string) val1, (int) val2); + }); } // user defined functions @@ -258,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);