projects
/
gitlive
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
handling of old branches
[gitlive]
/
NewBranch.vala
diff --git
a/NewBranch.vala
b/NewBranch.vala
index
6a48613
..
1ec03ee
100644
(file)
--- a/
NewBranch.vala
+++ b/
NewBranch.vala
@@
-20,6
+20,7
@@
public class NewBranch : Object
// my vars (def)
public GitRepo? repo;
public bool running;
// my vars (def)
public GitRepo? repo;
public bool running;
+ public Gee.ArrayList<GitMonitorQueue> queue;
// ctor
public NewBranch()
// ctor
public NewBranch()
@@
-30,6
+31,7
@@
public class NewBranch : Object
// my vars (dec)
this.repo = null;
this.running = false;
// my vars (dec)
this.repo = null;
this.running = false;
+ this.queue = null;
// set gobject values
this.el.title = "Create a working branch ";
// set gobject values
this.el.title = "Create a working branch ";
@@
-50,6
+52,7
@@
public class NewBranch : Object
//listeners
this.el.delete_event.connect( (self, event) => {
this.el.hide();
//listeners
this.el.delete_event.connect( (self, event) => {
this.el.hide();
+ this.running = false;
return true;
//test
});
return true;
//test
});
@@
-72,15
+75,16
@@
public class NewBranch : Object
// -- initial load can check the contents of the ticket files on first scan.
var ticket_id = _this.ticketsel.selectedTicketId();
// -- initial load can check the contents of the ticket files on first scan.
var ticket_id = _this.ticketsel.selectedTicketId();
+ var success = true;
if (this.repo != null) {
var bn = _this.name.el.get_text();
if (ticket_id != "" ) {
if (this.repo != null) {
var bn = _this.name.el.get_text();
if (ticket_id != "" ) {
- this.repo.setActiveTicket( RooTicket.singleton().getById(ticket_id), bn);
+
success =
this.repo.setActiveTicket( RooTicket.singleton().getById(ticket_id), bn);
} else {
} else {
- this.repo.createBranchNamed(bn);
+
success =
this.repo.createBranchNamed(bn);
}
}
}
}
- GitMonitor.gitmonitor.start();
+
this.running = false;
this.running = false;
@@
-97,13
+101,16
@@
public class NewBranch : Object
}
// user defined functions
}
// user defined functions
- public void show ( GitRepo repo )
+ public void show ( GitRepo repo
, Gee.ArrayList<GitMonitorQueue> queue
)
{
// this.el.set_gravity(Gdk.Gravity.NORTH);
{
// this.el.set_gravity(Gdk.Gravity.NORTH);
- if (this.running) {
-
return
;
+ if (this.running) {
// should not happen!!
+
GLib.error("new branch show called, when already being displayed?")
;
}
}
- GitMonitor.gitmonitor.stop();
+ this.queue = queue;
+
+ this.running = true;
+ GitMonitor.gitmonitor.stop();
this.repo = repo;
this.repo = repo;