Changed NewBranch.bjsNewBranch.valaRooTicket.valaTicket.bjsTicket.vala
[gitlive] / NewBranch.vala
index 9183007..c2800e8 100644 (file)
@@ -123,7 +123,7 @@ public class NewBranch : Object
         this.el.set_keep_above(true);
        
         
-        var curproj = RooTicket.singleton().getProjectByRepo(this.repo);
+        var curproj = RooProject.getProjectByRepo(this.repo);
          _this.prmodel.loadProjects(curproj == null ? "" : curproj.id);
         
        _this.dbmodel.loadTickets(curproj == null ? "": curproj.id, tid);
@@ -394,8 +394,7 @@ public class NewBranch : Object
         // user defined functions
         public void loadProjects (string id) {
         
-            var rt = RooTicket.singleton();
-            rt.loadProjects();
+        
             
             _this.projectsel.loading = true;
         
@@ -411,8 +410,8 @@ public class NewBranch : Object
             if (id == "") {
                    _this.projectsel.el.set_active_iter(iter);
             }
-            var projects = rt.projects;
-            foreach(var project in projects) {
+          
+            foreach(var project in RooProject.projects()) {
             
                 el.append(out iter);
                 
@@ -462,6 +461,7 @@ public class NewBranch : Object
 
             //this.el.add_attribute(_this.dbcellrenderer.el , "markup", 1 );
             this.el.set_entry_text_column(1);
+            this.el.get_child().set_sensitive(false);
 
             //listeners
             this.el.changed.connect( () => {
@@ -583,7 +583,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".printf( ticket.id, ticket.summary));
                 
                 if (ticket.id == tid) {
                            _this.ticketsel.el.set_active_iter(iter);
@@ -828,7 +828,8 @@ public class NewBranch : Object
             //listeners
             this.el.activate_link.connect( (uri) => {
                if (uri == "refresh") {
-                       var curproj = RooTicket.singleton().getProjectByRepo(_this.repo);
+                       RooProject.reload();
+                       var curproj = RooProject.getProjectByRepo(_this.repo);
                         _this.prmodel.loadProjects(curproj == null ? "": curproj.id);
             
                        _this.dbmodel.loadTickets(curproj == null ? "": curproj.id);