Example #1
0
 public Worker(string name, string file, VersionControlSystem vc, object revPath, RevisionPtr revision)
 {
     this.name = name;
     this.file = file;
     this.vc = vc;
     this.revPath = revPath;
     this.revision = revision;
 }
        public StatusView(string filepath, VersionControlSystem vc)
            : base(Path.GetFileName(filepath) + " Status")
        {
            this.vc = vc;
            this.filepath = filepath;

            main = new VBox(false, 5);
            widget = main;
            main.Show();

            commandbar = new HBox(false, 5);
            main.PackStart(commandbar, false, false, 5);

            showRemoteStatus = new Button("Show Remote Status");
            commandbar.PackEnd(showRemoteStatus, false, false, 0);
            showRemoteStatus.Clicked += new EventHandler(OnShowRemoteStatusClicked);

            buttonCommit = new Button("Commit...");
            commandbar.PackEnd(buttonCommit, false, false, 0);
            buttonCommit.Clicked += new EventHandler(OnCommitClicked);

            boxCommit = new VBox(false, 2);
            textCommitMessage = new TextView();
            HBox boxCommitButtons = new HBox(false, 2);
            buttonCommitCancel = new Button("Cancel");
            buttonCommitCommit = new Button("Commit");
            textCommitMessage.Show();
            buttonCommitCancel.Show();
            buttonCommitCommit.Show();
            boxCommit.PackStart(textCommitMessage, true, true, 0);
            boxCommit.PackStart(boxCommitButtons, false, false, 0);
            boxCommitButtons.PackEnd(buttonCommitCancel, false, false, 0);
            boxCommitButtons.PackEnd(buttonCommitCommit, false, false, 0);
            buttonCommitCancel.Clicked += new EventHandler(OnCommitCancelClicked);
            buttonCommitCommit.Clicked += new EventHandler(OnCommitCommitClicked);

            ScrolledWindow scroller = new ScrolledWindow();
            Viewport viewport = new Viewport();
            box = new VBox(false, 5);
            main.Add(scroller);

            viewport.Add(box);
            scroller.Add(viewport);

            main.ShowAll();

            StartUpdate();
        }
Example #3
0
 public static void Show(string file, VersionControlSystem vc, object revPath, RevisionPtr revision)
 {
     new Worker(Path.GetFileName(file) + " " + revision.ToString(),
         file, vc, revPath, revision).Start();
 }
Example #4
0
 public Worker(VersionControlSystem vc, string filepath, bool isDirectory, RevisionPtr since)
 {
     this.vc = vc;
     this.filepath = filepath;
     this.isDirectory = isDirectory;
     this.since = since;
 }
Example #5
0
        public LogView(string filepath, bool isDirectory, RevisionDescription[] history, VersionControlSystem vc)
            : base(Path.GetFileName(filepath) + " Log")
        {
            this.vc = vc;
            this.filepath = filepath;

            ScrolledWindow scroller = new ScrolledWindow();
            Viewport viewport = new Viewport();
            VBox box = new VBox(false, 5);

            viewport.Add(box);
            scroller.Add(viewport);
            widget = scroller;

            foreach (RevisionDescription d in history) {
                RevItem revitem = new RevItem();
                revitem.Path = d.RepositoryPath;
                revitem.Rev = d.Revision;

                VBox item = new VBox(false, 1);

                HBox header_row = new HBox(false, 2);
                item.PackStart(header_row, false, false, 0);

                Label header = new Label(d.Revision + " -- " + d.Time + " -- " + d.Author);
                header.Xalign = 0;
                header_row.Add(header);

                if (!isDirectory) {
                    Button viewdiff = new Button("View Changes");
                    viewdiff.Clicked += new EventHandler(DiffButtonClicked);
                    header_row.Add(viewdiff);
                    buttons[viewdiff] = revitem;

                    Button viewtext = new Button("View File");
                    viewtext.Clicked += new EventHandler(ViewTextButtonClicked);
                    header_row.Add(viewtext);
                    buttons[viewtext] = revitem;
                }

                TextView message = new TextView();
                message.Editable = false;
                message.WrapMode = Gtk.WrapMode.WordChar;
                message.Buffer.Text = d.Message == "" ? "No message." : d.Message;
                item.PackStart(message, false, false, 0);

                box.PackStart(item, false, false, 0);
            }

            widget.ShowAll();
        }
Example #6
0
 public UpdateWorker(VersionControlSystem vc, string path)
 {
     this.vc = vc;
     this.path = path;
 }
 public Worker(VersionControlSystem vc, string filepath, bool remoteStatus, StatusView view)
 {
     this.vc = vc;
     this.filepath = filepath;
     this.view = view;
     this.remoteStatus = remoteStatus;
 }
 public CommitWorker(VersionControlSystem vc, string[] paths, string message, StatusView view)
 {
     this.vc = vc;
     this.paths = paths;
     this.message = message;
     this.view = view;
 }