Beispiel #1
0
        public EditBranchDialog(MercurialRepository repo, Branch branch, bool isNew)
        {
            this.Build();
            this.repo = repo;

            comboStore         = new ListStore(typeof(string), typeof(Gdk.Pixbuf), typeof(string));
            comboSources.Model = comboStore;
            CellRendererPixbuf crp = new CellRendererPixbuf();

            comboSources.PackStart(crp, false);
            comboSources.AddAttribute(crp, "pixbuf", 1);
            CellRendererText crt = new CellRendererText();

            comboSources.PackStart(crt, true);
            comboSources.AddAttribute(crt, "text", 2);

            if (branch != null)
            {
                if (!isNew)
                {
                    oldName = branch.Name;
                }
                currentTracking = branch.Tracking;
                entryName.Text  = branch.Name;
                if (currentTracking != null)
                {
                    checkTrack.Active = true;
                }
            }

            foreach (var b in repo.GetBranches())
            {
                AddValues(b.Name, ImageService.GetPixbuf("vc-git-branch", IconSize.Menu));
            }

            foreach (var t in repo.GetTags())
            {
                AddValues(t.Name, ImageService.GetPixbuf("vc-git-tag", IconSize.Menu));
            }

            foreach (var r in repo.GetRemotes())
            {
                foreach (string b in repo.GetRemoteBranches(r.Name))
                {
                    AddValues(r.Name + "/" + b, ImageService.GetPixbuf("md-web-search-icon", IconSize.Menu));
                }
            }

            UpdateStatus();
        }
        public PushDialog(MercurialRepository repo)
        {
            this.Build ();
            this.repo = repo;
            HasSeparator = false;

            changeList.DiffLoader = DiffLoader;

            List<string> list = new List<string> (repo.GetRemotes ().Select (r => r.Name));
            foreach (string s in list)
                remoteCombo.AppendText (s);
            remoteCombo.Active = list.IndexOf (repo.GetCurrentRemote ());

            UpdateChangeSet ();
        }
Beispiel #3
0
        public PushDialog(MercurialRepository repo)
        {
            this.Build();
            this.repo    = repo;
            HasSeparator = false;

            changeList.DiffLoader = DiffLoader;

            List <string> list = new List <string> (repo.GetRemotes().Select(r => r.Name));

            foreach (string s in list)
            {
                remoteCombo.AppendText(s);
            }
            remoteCombo.Active = list.IndexOf(repo.GetCurrentRemote());

            UpdateChangeSet();
        }
Beispiel #4
0
        void FillRemotes()
        {
            TreeViewState state = new TreeViewState(treeRemotes, 4);

            state.Save();
            storeRemotes.Clear();
            string currentRemote = repo.GetCurrentRemote();

            foreach (var remote in repo.GetRemotes())
            {
                string   text = remote.Name == currentRemote ? "<b>" + remote.Name + "</b>" : remote.Name;
                string   url  = remote.Path;
                TreeIter it   = storeRemotes.AppendValues(remote, text, url, null, remote.Name);
                foreach (string branch in repo.GetRemoteBranches(remote.Name))
                {
                    storeRemotes.AppendValues(it, null, branch, null, branch, remote.Name + "/" + branch);
                }
            }
            state.Load();
        }
        public EditBranchDialog(MercurialRepository repo, Branch branch, bool isNew)
        {
            this.Build ();
            this.repo =  repo;

            comboStore = new ListStore (typeof(string), typeof(Gdk.Pixbuf), typeof (string));
            comboSources.Model = comboStore;
            CellRendererPixbuf crp = new CellRendererPixbuf ();
            comboSources.PackStart (crp, false);
            comboSources.AddAttribute (crp, "pixbuf", 1);
            CellRendererText crt = new CellRendererText ();
            comboSources.PackStart (crt, true);
            comboSources.AddAttribute (crt, "text", 2);

            if (branch != null) {
                if (!isNew)
                    oldName = branch.Name;
                currentTracking = branch.Tracking;
                entryName.Text = branch.Name;
                if (currentTracking != null)
                    checkTrack.Active = true;
            }

            foreach (var b in repo.GetBranches ()) {
                AddValues (b.Name, ImageService.GetPixbuf ("vc-git-branch", IconSize.Menu));
            }

            foreach (var t in repo.GetTags ())
                AddValues (t.Name, ImageService.GetPixbuf ("vc-git-tag", IconSize.Menu));

            foreach (var r in repo.GetRemotes ()) {
                foreach (string b in repo.GetRemoteBranches (r.Name))
                    AddValues (r.Name + "/" + b, ImageService.GetPixbuf ("md-web-search-icon", IconSize.Menu));
            }

            UpdateStatus ();
        }
Beispiel #6
0
        void Fill()
        {
            store.Clear();

            foreach (var b in repo.GetBranches())
            {
                store.AppendValues(b.Name, ImageService.GetPixbuf("vc-git-branch", IconSize.Menu), b.Name, "branch");
            }

            foreach (var t in repo.GetTags())
            {
                store.AppendValues(t.Name, ImageService.GetPixbuf("vc-git-tag", IconSize.Menu), t, "tag");
            }

            foreach (var r in repo.GetRemotes())
            {
                TreeIter it = store.AppendValues(null, ImageService.GetPixbuf("md-web-search-icon", IconSize.Menu), r.Name, null);
                foreach (string b in repo.GetRemoteBranches(r.Name))
                {
                    store.AppendValues(it, r.Name + "/" + b, ImageService.GetPixbuf("vc-git-branch", IconSize.Menu), b, "remote");
                }
            }
            UpdateStatus();
        }