protected virtual void OnButtonEditBranchClicked (object sender, System.EventArgs e)
		{
			TreeIter it;
			if (!listBranches.Selection.GetSelected (out it))
				return;
			Branch b = (Branch) storeBranches.GetValue (it, 0);
			EditBranchDialog dlg = new EditBranchDialog (repo, b, false);
			try {
				if (dlg.Run () == (int) ResponseType.Ok) {
					if (dlg.BranchName != b.Name)
						repo.RenameBranch (b.Name, dlg.BranchName);
					repo.SetBranchTrackSource (dlg.BranchName, dlg.TrackSource);
					FillBranches ();
				}
			} finally {
				dlg.Destroy ();
			}
		}
		protected virtual void OnButtonTrackRemoteClicked (object sender, System.EventArgs e)
		{
			TreeIter it;
			if (!treeRemotes.Selection.GetSelected (out it))
				return;
			string branchName = (string) storeRemotes.GetValue (it, 3);
			if (branchName == null)
				return;
			
			storeRemotes.IterParent (out it, it);
			RemoteSource remote = (RemoteSource) storeRemotes.GetValue (it, 0);
			
			Branch b = new Branch ();
			b.Name = branchName;
			b.Tracking = remote.Name + "/" + branchName;
			
			EditBranchDialog dlg = new EditBranchDialog (repo, b, true);
			try {
				if (dlg.Run () == (int) ResponseType.Ok) {
					repo.CreateBranch (dlg.BranchName, dlg.TrackSource);
					FillBranches ();
				}
			} finally {
				dlg.Destroy ();
			}
		}
		protected virtual void OnButtonAddBranchClicked (object sender, System.EventArgs e)
		{
			EditBranchDialog dlg = new EditBranchDialog (repo, null, true);
			try {
				if (dlg.Run () == (int) ResponseType.Ok) {
					repo.CreateBranch (dlg.BranchName, dlg.TrackSource);
					FillBranches ();
				}
			} finally {
				dlg.Destroy ();
			}
		}