Ejemplo n.º 1
0
        private void Update()
        {
            localDiff.diffRequested  = false;
            remoteDiff.diffRequested = false;
            localDiff.difs           = null;
            remoteDiff.difs          = null;

            filestore.Clear();
            diffRenderer.Reset();

            if (statuses.Count > 0)
            {
                foreach (VersionInfo n in statuses)
                {
                    if (FileVisible(n))
                    {
                        if (firstLoad)
                        {
                            changeSet.AddFile(n);
                        }
                        AppendFileInfo(n);
                    }
                }
            }
            UpdateControlStatus();
            if (firstLoad)
            {
                TreeIter it;
                if (filestore.GetIterFirst(out it))
                {
                    filelist.Selection.SelectIter(it);
                }
                firstLoad = false;
            }
        }
Ejemplo n.º 2
0
        void Update()
        {
            localDiff.diffRequested = false;
            localDiff.difs          = null;

            filestore.Clear();
            diffRenderer.Reset();

            if (changeSet == null)
            {
                Sensitive = false;
                return;
            }

            Sensitive = true;

            foreach (ChangeSetItem n in changeSet.Items)
            {
                AppendFileInfo(n);
            }

            UpdateControlStatus();
            if (firstLoad)
            {
                TreeIter it;
                if (filestore.GetIterFirst(out it))
                {
                    filelist.Selection.SelectIter(it);
                }
                firstLoad = false;
            }
        }
        private void Update()
        {
            localDiff.Clear();
            remoteDiff.Clear();

            filestore.Clear();
            diffRenderer.Reset();

            if (statuses.Count > 0)
            {
                try
                {
                    filelist.FreezeChildNotify();

                    foreach (VersionInfo n in statuses)
                    {
                        if (firstLoad)
                        {
                            changeSet.AddFile(n);
                        }
                        AppendFileInfo(n);

                        // Calling GenerateDiff and supplying the versioninfo
                        // is the new fast way of doing things. If we do not get
                        // the same number of diffs as VersionInfos, we should
                        // fall back to the old slow method as the VC addin probably
                        // has not implemented the new fast one.
                        // The new way can also only be used locally.
                        localDiff.Add(new DiffData(vc, filepath, n, false));
                        remoteDiff.Add(new DiffData(vc, filepath, n, true));
                    }
                }
                finally
                {
                    filelist.ThawChildNotify();
                }
            }
            UpdateControlStatus();
            if (firstLoad)
            {
                TreeIter it;
                if (filestore.GetIterFirst(out it))
                {
                    filelist.Selection.SelectIter(it);
                }
                firstLoad = false;
            }
        }