public CS_PlayListAdmin(CS_PlayListsView plsview,CS_PlayListsModel mdl,CS_PlayListCollection cl)
        {
            _col=cl;
            _model=mdl;
            Gtk.HBox hb=new Gtk.HBox();

            Gtk.Button _add=new Gtk.Button(Gtk.Stock.Add);
            _add.Clicked+=delegate (object sender,EventArgs args) {
                OnAddPls();
            };

            Gtk.Button _remove=new Gtk.Button(Gtk.Stock.Remove);
            _remove.Clicked+=delegate (object sender,EventArgs args) {
                OnRemovePls();
            };

            hb.PackStart (_add);
            hb.PackStart (_remove);

            plsscroll=new Gtk.ScrolledWindow();
            plsscroll.Add (plsview);

            _pls=null;
            _pls_name=new Gtk.Entry();
            _pls_model=new CS_PlayListModel();
            _pls_view=new CS_PlayListView();
            _pls_view.SetModel (_pls_model);
            plscroll=new Gtk.ScrolledWindow();
            plscroll.Add (_pls_view);

            _pls_view.DragEnd+=delegate(object sender,DragEndArgs args) {
                Console.WriteLine (args);
            };
            Gtk.VBox plsvbox=new Gtk.VBox();
            plsvbox.PackStart (_pls_name,false,false,2);
            plsvbox.PackEnd (plscroll);

            Gtk.VPaned vpn=new Gtk.VPaned();
            vpn.Add1 (plsscroll);
            vpn.Add2 (plsvbox);

            base.PackStart (hb,false,false,2);
            base.PackEnd (vpn);

            base.ShowAll ();

            mdl.SetListener (delegate(CS_PlayList pls) {
                _pls=pls;
                _pls_model.SetPlayList (_pls);
                _pls_name.Text=_pls.PlsName;
            });
        }
Esempio n. 2
0
        public CS_PlayListAdmin(CS_PlayListsView plsview, CS_PlayListsModel mdl, CS_PlayListCollection cl)
        {
            _col   = cl;
            _model = mdl;
            Gtk.HBox hb = new Gtk.HBox();

            Gtk.Button _add = new Gtk.Button(Gtk.Stock.Add);
            _add.Clicked += delegate(object sender, EventArgs args) {
                OnAddPls();
            };

            Gtk.Button _remove = new Gtk.Button(Gtk.Stock.Remove);
            _remove.Clicked += delegate(object sender, EventArgs args) {
                OnRemovePls();
            };

            hb.PackStart(_add);
            hb.PackStart(_remove);

            plsscroll = new Gtk.ScrolledWindow();
            plsscroll.Add(plsview);

            _pls       = null;
            _pls_name  = new Gtk.Entry();
            _pls_model = new CS_PlayListModel();
            _pls_view  = new CS_PlayListView();
            _pls_view.SetModel(_pls_model);
            plscroll = new Gtk.ScrolledWindow();
            plscroll.Add(_pls_view);

            _pls_view.DragEnd += delegate(object sender, DragEndArgs args) {
                Console.WriteLine(args);
            };
            Gtk.VBox plsvbox = new Gtk.VBox();
            plsvbox.PackStart(_pls_name, false, false, 2);
            plsvbox.PackEnd(plscroll);

            Gtk.VPaned vpn = new Gtk.VPaned();
            vpn.Add1(plsscroll);
            vpn.Add2(plsvbox);

            base.PackStart(hb, false, false, 2);
            base.PackEnd(vpn);

            base.ShowAll();

            mdl.SetListener(delegate(CS_PlayList pls) {
                _pls = pls;
                _pls_model.SetPlayList(_pls);
                _pls_name.Text = _pls.PlsName;
            });
        }
Esempio n. 3
0
        /// <summary>Crea el notebook donde están los campos
        /// de edición de texto del ensamblador.</summary>
        /// <returns>El notebook.</returns>

        private Notebook CrearNotebook()
        {
            Notebook not = new Notebook();


            Gtk.HPaned panel1 = new Gtk.HPaned();
            panel1.Add1(CrearEditorEnsamblador());
            panel1.Add2(CrearResultadoEnsamblador());
            panel1.Position = 340;

            Gtk.VPaned panel2 = new Gtk.VPaned();
            panel2.Add1(panel1);
            panel2.Add2(CrearErroresEnsamblador());
            panel2.Position = 350;

            not.AppendPage(
                panel2,
                new Gtk.Label(GetText("Ventana_Notebook_Codigo"))
                );

            panelMemoria   = new PanelMemoria();
            panelRegistros = new PanelRegistros();

            Gtk.Table memreg = new Gtk.Table(1, 2, true);
            memreg.Attach(panelMemoria, 0, 1, 0, 1);
            memreg.Attach(panelRegistros, 1, 2, 0, 1);
            not.AppendPage(
                memreg,
                new Gtk.Label(
                    String.Format(
                        "{0} - {1}",
                        GetText("Ventana_Notebook_Memoria"),
                        GetText("Ventana_Notebook_Registros")
                        )
                    )
                );


            dArea = new PanelDibujo();
            not.AppendPage(
                dArea,
                new Gtk.Label(GetText("Ventana_Notebook_rdd"))
                );

            return(not);
        }
		public LogView (string filepath, bool isDirectory, Revision [] history, Repository vc) 
			: base (Path.GetFileName (filepath) + " Log")
		{
			this.vc = vc;
			this.filepath = filepath;
			this.history = history;
			
			try {
				this.vinfo = vc.GetVersionInfo (filepath, false);
			}
			catch (Exception ex) {
				MessageService.ShowException (ex, GettextCatalog.GetString ("Version control command failed."));
			}

			// Widget setup
			
			VBox box = new VBox (false, 6);
			
			widget = box;

			// Create the toolbar
			commandbar = new Toolbar ();
			commandbar.ToolbarStyle = Gtk.ToolbarStyle.BothHoriz;
			commandbar.IconSize = Gtk.IconSize.Menu;
			box.PackStart (commandbar, false, false, 0);
				
			if (vinfo != null) {
				Gtk.ToolButton button = new Gtk.ToolButton (new Gtk.Image ("vc-diff", Gtk.IconSize.Menu), GettextCatalog.GetString ("View Changes"));
				button.IsImportant = true;
				if (isDirectory) {
					button.Clicked += new EventHandler (DirDiffButtonClicked);
					commandbar.Insert (button, -1);
				} else {
					button.Clicked += new EventHandler (DiffButtonClicked);
					commandbar.Insert (button, -1);
					
					button = new Gtk.ToolButton (new Gtk.Image (Gtk.Stock.Open, Gtk.IconSize.Menu), GettextCatalog.GetString ("View File"));
					button.IsImportant = true;
					button.Clicked += new EventHandler (ViewTextButtonClicked);
					commandbar.Insert (button, -1);
				}
			}
			
			revertButton = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert changes from this revision"));
			revertButton.IsImportant = true;
			revertButton.Sensitive = false;
			revertButton.Clicked += new EventHandler (RevertRevisionClicked);
			commandbar.Insert (revertButton, -1);
			
			revertToButton = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert to this revision"));
			revertToButton.IsImportant = true;
			revertToButton.Sensitive = false;
			revertToButton.Clicked += new EventHandler (RevertToRevisionClicked);
			commandbar.Insert (revertToButton, -1);

			
			// A paned with two trees
			
			Gtk.VPaned paned = new Gtk.VPaned ();
			box.PackStart (paned, true, true, 0);
			
			// Create the log list
			
			loglist = new TreeView ();
			ScrolledWindow loglistscroll = new ScrolledWindow ();
			loglistscroll.ShadowType = Gtk.ShadowType.In;
			loglistscroll.Add (loglist);
			loglistscroll.HscrollbarPolicy = PolicyType.Automatic;
			loglistscroll.VscrollbarPolicy = PolicyType.Automatic;
			paned.Add1 (loglistscroll);
			((Paned.PanedChild)paned [loglistscroll]).Resize = true;
			
			TreeView changedPaths = new TreeView ();
			ScrolledWindow changedPathsScroll = new ScrolledWindow ();
			changedPathsScroll.ShadowType = Gtk.ShadowType.In;
			changedPathsScroll.HscrollbarPolicy = PolicyType.Automatic;
			changedPathsScroll.VscrollbarPolicy = PolicyType.Automatic;
			changedPathsScroll.Add (changedPaths);
			paned.Add2 (changedPathsScroll);
			((Paned.PanedChild)paned [changedPathsScroll]).Resize = false;

			widget.ShowAll ();
			
			// Revision list setup
			
			CellRendererText textRenderer = new CellRendererText ();
			textRenderer.Yalign = 0;
			
			TreeViewColumn colRevNum = new TreeViewColumn (GettextCatalog.GetString ("Revision"), textRenderer, "text", 0);
			TreeViewColumn colRevDate = new TreeViewColumn (GettextCatalog.GetString ("Date"), textRenderer, "text", 1);
			TreeViewColumn colRevAuthor = new TreeViewColumn (GettextCatalog.GetString ("Author"), textRenderer, "text", 2);
			TreeViewColumn colRevMessage = new TreeViewColumn (GettextCatalog.GetString ("Message"), textRenderer, "text", 3);
			
			loglist.AppendColumn (colRevNum);
			loglist.AppendColumn (colRevDate);
			loglist.AppendColumn (colRevAuthor);
			loglist.AppendColumn (colRevMessage);
			
			ListStore logstore = new ListStore (typeof (string), typeof (string), typeof (string), typeof (string));
			loglist.Model = logstore;
			 
			foreach (Revision d in history) {
				logstore.AppendValues(
					d.ToString (),
					d.Time.ToString (),
					d.Author,
					d.Message == String.Empty ? GettextCatalog.GetString ("(No message)") : d.Message);
			}

			// Changed paths list setup
			
			changedpathstore = new ListStore (typeof(Gdk.Pixbuf), typeof (string), typeof(Gdk.Pixbuf), typeof (string));
			changedPaths.Model = changedpathstore;
			
			TreeViewColumn colOperation = new TreeViewColumn ();
			CellRendererText crt = new CellRendererText ();
			var crp = new CellRendererPixbuf ();
			colOperation.Title = GettextCatalog.GetString ("Operation");
			colOperation.PackStart (crp, false);
			colOperation.PackStart (crt, true);
			colOperation.AddAttribute (crp, "pixbuf", 0);
			colOperation.AddAttribute (crt, "text", 1);
			changedPaths.AppendColumn (colOperation);
			
			TreeViewColumn colChangedPath = new TreeViewColumn ();
			crp = new CellRendererPixbuf ();
			crt = new CellRendererText ();
			colChangedPath.Title = GettextCatalog.GetString ("File Path");
			colChangedPath.PackStart (crp, false);
			colChangedPath.PackStart (crt, true);
			colChangedPath.AddAttribute (crp, "pixbuf", 2);
			colChangedPath.AddAttribute (crt, "text", 3);
			changedPaths.AppendColumn (colChangedPath);
			
			loglist.Selection.Changed += new EventHandler (TreeSelectionChanged);
		}
Esempio n. 5
0
		void CreateControlFromInfo ()
		{
			this.vc = info.Item.Repository;
			this.filepath = info.Item.Path;
			
			
			
			// Widget setup
			VBox box = new VBox (false, 6);
			
			widget = box;

			// Create the toolbar
			commandbar = new Toolbar ();
			commandbar.ToolbarStyle = Gtk.ToolbarStyle.BothHoriz;
			commandbar.IconSize = Gtk.IconSize.Menu;
			box.PackStart (commandbar, false, false, 0);
				
			if (vinfo != null) {
				Gtk.ToolButton button = new Gtk.ToolButton (new Gtk.Image ("vc-diff", Gtk.IconSize.Menu), GettextCatalog.GetString ("View Changes"));
				button.IsImportant = true;
				button.Clicked += new EventHandler (DiffButtonClicked);
				commandbar.Insert (button, -1);
				
				button = new Gtk.ToolButton (new Gtk.Image (Gtk.Stock.Open, Gtk.IconSize.Menu), GettextCatalog.GetString ("View File"));
				button.IsImportant = true;
				button.Clicked += new EventHandler (ViewTextButtonClicked);
				commandbar.Insert (button, -1);
			}
			
			revertButton = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert changes from this revision"));
			revertButton.IsImportant = true;
			revertButton.Sensitive = false;
			revertButton.Clicked += new EventHandler (RevertRevisionClicked);
			commandbar.Insert (revertButton, -1);
			
			revertToButton = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert to this revision"));
			revertToButton.IsImportant = true;
			revertToButton.Sensitive = false;
			revertToButton.Clicked += new EventHandler (RevertToRevisionClicked);
			commandbar.Insert (revertToButton, -1);

			
			// A paned with two trees
			
			Gtk.VPaned paned = new Gtk.VPaned ();
			box.PackStart (paned, true, true, 0);
			
			// Create the log list
			
			loglist = new TreeView ();
			ScrolledWindow loglistscroll = new ScrolledWindow ();
			loglistscroll.ShadowType = Gtk.ShadowType.In;
			loglistscroll.Add (loglist);
			loglistscroll.HscrollbarPolicy = PolicyType.Automatic;
			loglistscroll.VscrollbarPolicy = PolicyType.Automatic;
			paned.Add1 (loglistscroll);
			((Paned.PanedChild)paned [loglistscroll]).Resize = true;
			
			TreeView changedPaths = new TreeView ();
			ScrolledWindow changedPathsScroll = new ScrolledWindow ();
			changedPathsScroll.ShadowType = Gtk.ShadowType.In;
			changedPathsScroll.HscrollbarPolicy = PolicyType.Automatic;
			changedPathsScroll.VscrollbarPolicy = PolicyType.Automatic;
			changedPathsScroll.Add (changedPaths);
			paned.Add2 (changedPathsScroll);
			((Paned.PanedChild)paned [changedPathsScroll]).Resize = false;

			widget.ShowAll ();
			
			// Revision list setup
			
			CellRendererText textRenderer = new CellRendererText ();
			textRenderer.Yalign = 0;
			
			TreeViewColumn colRevNum = new TreeViewColumn (GettextCatalog.GetString ("Revision"), textRenderer, "text", 0);
			colRevNum.Resizable = true;
			TreeViewColumn colRevDate = new TreeViewColumn (GettextCatalog.GetString ("Date"), textRenderer, "text", 1);
			colRevDate.Resizable = true;
			TreeViewColumn colRevAuthor = new TreeViewColumn (GettextCatalog.GetString ("Author"), textRenderer, "text", 2);
			colRevAuthor.Resizable = true;
			TreeViewColumn colRevMessage = new TreeViewColumn (GettextCatalog.GetString ("Message"), textRenderer, "text", 3);
			colRevMessage.Resizable = true;
			
			loglist.AppendColumn (colRevNum);
			loglist.AppendColumn (colRevDate);
			loglist.AppendColumn (colRevAuthor);
			loglist.AppendColumn (colRevMessage);
			
			logstore = new ListStore (typeof (string), typeof (string), typeof (string), typeof (string));
			loglist.Model = logstore;

			// Changed paths list setup
			
			changedpathstore = new ListStore (typeof(Gdk.Pixbuf), typeof (string), typeof(Gdk.Pixbuf), typeof (string));
			changedPaths.Model = changedpathstore;
			
			TreeViewColumn colOperation = new TreeViewColumn ();
			CellRendererText crt = new CellRendererText ();
			var crp = new CellRendererPixbuf ();
			colOperation.Title = GettextCatalog.GetString ("Operation");
			colOperation.PackStart (crp, false);
			colOperation.PackStart (crt, true);
			colOperation.AddAttribute (crp, "pixbuf", 0);
			colOperation.AddAttribute (crt, "text", 1);
			changedPaths.AppendColumn (colOperation);
			
			TreeViewColumn colChangedPath = new TreeViewColumn ();
			crp = new CellRendererPixbuf ();
			crt = new CellRendererText ();
			colChangedPath.Title = GettextCatalog.GetString ("File Path");
			colChangedPath.PackStart (crp, false);
			colChangedPath.PackStart (crt, true);
			colChangedPath.AddAttribute (crp, "pixbuf", 2);
			colChangedPath.AddAttribute (crt, "text", 3);
			changedPaths.AppendColumn (colChangedPath);
			
			loglist.Selection.Changed += new EventHandler (TreeSelectionChanged);
			
			
			info.Updated += delegate {
				history = this.info.History;
				vinfo   = this.info.VersionInfo;
				ShowHistory ();
			};
			history = this.info.History;
			vinfo   = this.info.VersionInfo;
			ShowHistory ();
		}
Esempio n. 6
0
        private void Build()
        {
            // toolbar
            toolbar = new Toolbar();
            //			toolbar.MarginLeft = 10;
            this.Add (toolbar);
            var toolbarBox = (Gtk.Box.BoxChild)this [toolbar];
            toolbarBox.Fill = false;
            toolbarBox.Expand = false;
            toolbarBox.Position = 0;

            // toolbar choose database dropdown
            Gtk.Label l = new Gtk.Label(string.Format("Current database: {0}", this.ServerConnection.Name));
            ToolItem lTi = new ToolItem ();
            lTi.Add (l);
            toolbar.Insert (lTi, 0);

            // toolbar exec button
            ToolButton execBtn = new ToolButton (Gtk.Stock.MediaPlay);
            execBtn.Clicked += (sender, e) => this.ExecuteCommand();
            toolbar.Insert (execBtn, 1);

            // vpaned
            vpaned = new VPaned();
            this.Add (vpaned);

            // Sql area textbox wrapped in a scrolled window
            ScrolledWindow sqlAreaScroll = new ScrolledWindow();
            vpaned.Add1 (sqlAreaScroll);
            sqlArea = new Mono.TextEditor.TextEditor();
            sqlArea.Text = string.Format ("{0}{0}", System.Environment.NewLine);
            sqlArea.SetCaretTo (1, 1);
            sqlArea.CanFocus = true;
            sqlArea.IsFocus = true;

            var syntaxMode = loadSyntaxMode ();
            sqlArea.Document.SyntaxMode = syntaxMode;

            sqlAreaScroll.Add (sqlArea);

            // result tabs
            resultNoteBook = new Notebook ();
            sqlResultContainer = new Gtk.ScrolledWindow ();
            resultNoteBook.Add (sqlResultContainer);
            resultNoteBook.SetTabLabel (sqlResultContainer, new Label ("Results"));

            outputView = new TextView ();
            outputView.Editable = false;
            resultNoteBook.Add (outputView);
            resultNoteBook.SetTabLabel (outputView, new Label ("Output"));

            vpaned.Add2 (resultNoteBook);

            vpaned.Position = 180;
        }
Esempio n. 7
0
        public LogView(VersionControlDocumentInfo info) : base("Log")
        {
            this.info     = info;
            this.vc       = info.Item.Repository;
            this.filepath = info.Item.Path;

            info.Updated += delegate {
                history = this.info.History;
                vinfo   = this.info.VersionInfo;
                ShowHistory();
            };

            // Widget setup
            VBox box = new VBox(false, 6);

            widget = box;

            // Create the toolbar
            commandbar = new Toolbar();
            commandbar.ToolbarStyle = Gtk.ToolbarStyle.BothHoriz;
            commandbar.IconSize     = Gtk.IconSize.Menu;
            box.PackStart(commandbar, false, false, 0);

            if (vinfo != null)
            {
                Gtk.ToolButton button = new Gtk.ToolButton(new Gtk.Image("vc-diff", Gtk.IconSize.Menu), GettextCatalog.GetString("View Changes"));
                button.IsImportant = true;
                button.Clicked    += new EventHandler(DiffButtonClicked);
                commandbar.Insert(button, -1);

                button             = new Gtk.ToolButton(new Gtk.Image(Gtk.Stock.Open, Gtk.IconSize.Menu), GettextCatalog.GetString("View File"));
                button.IsImportant = true;
                button.Clicked    += new EventHandler(ViewTextButtonClicked);
                commandbar.Insert(button, -1);
            }

            revertButton             = new Gtk.ToolButton(new Gtk.Image("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString("Revert changes from this revision"));
            revertButton.IsImportant = true;
            revertButton.Sensitive   = false;
            revertButton.Clicked    += new EventHandler(RevertRevisionClicked);
            commandbar.Insert(revertButton, -1);

            revertToButton             = new Gtk.ToolButton(new Gtk.Image("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString("Revert to this revision"));
            revertToButton.IsImportant = true;
            revertToButton.Sensitive   = false;
            revertToButton.Clicked    += new EventHandler(RevertToRevisionClicked);
            commandbar.Insert(revertToButton, -1);


            // A paned with two trees

            Gtk.VPaned paned = new Gtk.VPaned();
            box.PackStart(paned, true, true, 0);

            // Create the log list

            loglist = new TreeView();
            ScrolledWindow loglistscroll = new ScrolledWindow();

            loglistscroll.ShadowType = Gtk.ShadowType.In;
            loglistscroll.Add(loglist);
            loglistscroll.HscrollbarPolicy = PolicyType.Automatic;
            loglistscroll.VscrollbarPolicy = PolicyType.Automatic;
            paned.Add1(loglistscroll);
            ((Paned.PanedChild)paned [loglistscroll]).Resize = true;

            TreeView       changedPaths       = new TreeView();
            ScrolledWindow changedPathsScroll = new ScrolledWindow();

            changedPathsScroll.ShadowType       = Gtk.ShadowType.In;
            changedPathsScroll.HscrollbarPolicy = PolicyType.Automatic;
            changedPathsScroll.VscrollbarPolicy = PolicyType.Automatic;
            changedPathsScroll.Add(changedPaths);
            paned.Add2(changedPathsScroll);
            ((Paned.PanedChild)paned [changedPathsScroll]).Resize = false;

            widget.ShowAll();

            // Revision list setup

            CellRendererText textRenderer = new CellRendererText();

            textRenderer.Yalign = 0;

            TreeViewColumn colRevNum     = new TreeViewColumn(GettextCatalog.GetString("Revision"), textRenderer, "text", 0);
            TreeViewColumn colRevDate    = new TreeViewColumn(GettextCatalog.GetString("Date"), textRenderer, "text", 1);
            TreeViewColumn colRevAuthor  = new TreeViewColumn(GettextCatalog.GetString("Author"), textRenderer, "text", 2);
            TreeViewColumn colRevMessage = new TreeViewColumn(GettextCatalog.GetString("Message"), textRenderer, "text", 3);

            loglist.AppendColumn(colRevNum);
            loglist.AppendColumn(colRevDate);
            loglist.AppendColumn(colRevAuthor);
            loglist.AppendColumn(colRevMessage);

            logstore      = new ListStore(typeof(string), typeof(string), typeof(string), typeof(string));
            loglist.Model = logstore;

            // Changed paths list setup

            changedpathstore   = new ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(Gdk.Pixbuf), typeof(string));
            changedPaths.Model = changedpathstore;

            TreeViewColumn   colOperation = new TreeViewColumn();
            CellRendererText crt          = new CellRendererText();
            var crp = new CellRendererPixbuf();

            colOperation.Title = GettextCatalog.GetString("Operation");
            colOperation.PackStart(crp, false);
            colOperation.PackStart(crt, true);
            colOperation.AddAttribute(crp, "pixbuf", 0);
            colOperation.AddAttribute(crt, "text", 1);
            changedPaths.AppendColumn(colOperation);

            TreeViewColumn colChangedPath = new TreeViewColumn();

            crp = new CellRendererPixbuf();
            crt = new CellRendererText();
            colChangedPath.Title = GettextCatalog.GetString("File Path");
            colChangedPath.PackStart(crp, false);
            colChangedPath.PackStart(crt, true);
            colChangedPath.AddAttribute(crp, "pixbuf", 2);
            colChangedPath.AddAttribute(crt, "text", 3);
            changedPaths.AppendColumn(colChangedPath);

            loglist.Selection.Changed += new EventHandler(TreeSelectionChanged);
        }
Esempio n. 8
0
        public LogView(string filepath, bool isDirectory, Revision [] history, Repository vc)
            : base(Path.GetFileName(filepath) + " Log")
        {
            this.vc       = vc;
            this.filepath = filepath;
            this.history  = history;

            try {
                this.vinfo = vc.GetVersionInfo(filepath, false);
            }
            catch (Exception ex) {
                MessageService.ShowException(ex, GettextCatalog.GetString("Version control command failed."));
            }

            // Widget setup

            VBox box = new VBox(false, 6);

            widget = box;

            // Create the toolbar
            commandbar = new Toolbar();
            commandbar.ToolbarStyle = Gtk.ToolbarStyle.BothHoriz;
            commandbar.IconSize     = Gtk.IconSize.Menu;
            box.PackStart(commandbar, false, false, 0);

            if (vinfo != null)
            {
                Gtk.ToolButton button = new Gtk.ToolButton(new Gtk.Image("vc-diff", Gtk.IconSize.Menu), GettextCatalog.GetString("View Changes"));
                button.IsImportant = true;
                if (isDirectory)
                {
                    button.Clicked += new EventHandler(DirDiffButtonClicked);
                    commandbar.Insert(button, -1);
                }
                else
                {
                    button.Clicked += new EventHandler(DiffButtonClicked);
                    commandbar.Insert(button, -1);

                    button             = new Gtk.ToolButton(new Gtk.Image(Gtk.Stock.Open, Gtk.IconSize.Menu), GettextCatalog.GetString("View File"));
                    button.IsImportant = true;
                    button.Clicked    += new EventHandler(ViewTextButtonClicked);
                    commandbar.Insert(button, -1);
                }
            }

            revertButton             = new Gtk.ToolButton(new Gtk.Image("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString("Revert changes from this revision"));
            revertButton.IsImportant = true;
            revertButton.Sensitive   = false;
            revertButton.Clicked    += new EventHandler(RevertRevisionClicked);
            commandbar.Insert(revertButton, -1);

            revertToButton             = new Gtk.ToolButton(new Gtk.Image("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString("Revert to this revision"));
            revertToButton.IsImportant = true;
            revertToButton.Sensitive   = false;
            revertToButton.Clicked    += new EventHandler(RevertToRevisionClicked);
            commandbar.Insert(revertToButton, -1);


            // A paned with two trees

            Gtk.VPaned paned = new Gtk.VPaned();
            box.PackStart(paned, true, true, 0);

            // Create the log list

            loglist = new TreeView();
            ScrolledWindow loglistscroll = new ScrolledWindow();

            loglistscroll.ShadowType = Gtk.ShadowType.In;
            loglistscroll.Add(loglist);
            loglistscroll.HscrollbarPolicy = PolicyType.Automatic;
            loglistscroll.VscrollbarPolicy = PolicyType.Automatic;
            paned.Add1(loglistscroll);
            ((Paned.PanedChild)paned [loglistscroll]).Resize = true;

            TreeView       changedPaths       = new TreeView();
            ScrolledWindow changedPathsScroll = new ScrolledWindow();

            changedPathsScroll.ShadowType       = Gtk.ShadowType.In;
            changedPathsScroll.HscrollbarPolicy = PolicyType.Automatic;
            changedPathsScroll.VscrollbarPolicy = PolicyType.Automatic;
            changedPathsScroll.Add(changedPaths);
            paned.Add2(changedPathsScroll);
            ((Paned.PanedChild)paned [changedPathsScroll]).Resize = false;

            widget.ShowAll();

            // Revision list setup

            CellRendererText textRenderer = new CellRendererText();

            textRenderer.Yalign = 0;

            TreeViewColumn colRevNum     = new TreeViewColumn(GettextCatalog.GetString("Revision"), textRenderer, "text", 0);
            TreeViewColumn colRevDate    = new TreeViewColumn(GettextCatalog.GetString("Date"), textRenderer, "text", 1);
            TreeViewColumn colRevAuthor  = new TreeViewColumn(GettextCatalog.GetString("Author"), textRenderer, "text", 2);
            TreeViewColumn colRevMessage = new TreeViewColumn(GettextCatalog.GetString("Message"), textRenderer, "text", 3);

            loglist.AppendColumn(colRevNum);
            loglist.AppendColumn(colRevDate);
            loglist.AppendColumn(colRevAuthor);
            loglist.AppendColumn(colRevMessage);

            ListStore logstore = new ListStore(typeof(string), typeof(string), typeof(string), typeof(string));

            loglist.Model = logstore;

            foreach (Revision d in history)
            {
                logstore.AppendValues(
                    d.ToString(),
                    d.Time.ToString(),
                    d.Author,
                    d.Message == String.Empty ? GettextCatalog.GetString("(No message)") : d.Message);
            }

            // Changed paths list setup

            changedpathstore   = new ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(Gdk.Pixbuf), typeof(string));
            changedPaths.Model = changedpathstore;

            TreeViewColumn   colOperation = new TreeViewColumn();
            CellRendererText crt          = new CellRendererText();
            var crp = new CellRendererPixbuf();

            colOperation.Title = GettextCatalog.GetString("Operation");
            colOperation.PackStart(crp, false);
            colOperation.PackStart(crt, true);
            colOperation.AddAttribute(crp, "pixbuf", 0);
            colOperation.AddAttribute(crt, "text", 1);
            changedPaths.AppendColumn(colOperation);

            TreeViewColumn colChangedPath = new TreeViewColumn();

            crp = new CellRendererPixbuf();
            crt = new CellRendererText();
            colChangedPath.Title = GettextCatalog.GetString("File Path");
            colChangedPath.PackStart(crp, false);
            colChangedPath.PackStart(crt, true);
            colChangedPath.AddAttribute(crp, "pixbuf", 2);
            colChangedPath.AddAttribute(crt, "text", 3);
            changedPaths.AppendColumn(colChangedPath);

            loglist.Selection.Changed += new EventHandler(TreeSelectionChanged);
        }