public override void Initialize()
 {
     base.Initialize();
     toolbar = new HeaderBox();
     toolbar.GradientBackground = true;
     toolbar.SetMargins(0, 1, 0, 0);
     MainBox.PackStart(toolbar, false, false, 0);
     ((Gtk.Box.BoxChild)MainBox [toolbar]).Position = 0;
 }
        public DefaultPolicyOptionsDialog(Gtk.Window parentWindow)
            : base(parentWindow, new PolicySet(),
                   "/MonoDevelop/ProjectModel/Gui/DefaultPolicyPanels")
        {
            this.Title = GettextCatalog.GetString("Custom Policies");
            editingSet = (PolicySet)DataObject;

            HBox topBar = new HBox();

            topBar.Spacing = 3;
            topBar.PackStart(new Label(GettextCatalog.GetString("Editing Policy:")), false, false, 0);

            policiesCombo = ComboBox.NewText();
            topBar.PackStart(policiesCombo, false, false, 0);

            newButton = new Button(GettextCatalog.GetString("Add Policy"));
            topBar.PackEnd(newButton, false, false, 0);

            deleteButton = new Button(GettextCatalog.GetString("Delete Policy"));
            topBar.PackEnd(deleteButton, false, false, 0);

            Alignment align = new Alignment(0f, 0f, 1f, 1f);

            align.LeftPadding   = 9;
            align.TopPadding    = 9;
            align.RightPadding  = 9;
            align.BottomPadding = 9;
            align.Add(topBar);

            HeaderBox ebox = new HeaderBox();

            ebox.GradientBackround = true;
            ebox.SetMargins(0, 1, 0, 0);
            ebox.Add(align);

            ebox.ShowAll();

            VBox.PackStart(ebox, false, false, 0);
            VBox.BorderWidth = 0;
            Box.BoxChild c = (Box.BoxChild)VBox [ebox];
            c.Position = 0;

            foreach (PolicySet ps in PolicyService.GetUserPolicySets())
            {
                PolicySet copy = ps.Clone();
                originalSets [copy] = ps;
                sets.Add(copy);
            }
            FillPolicySets();

            policiesCombo.Changed += HandlePoliciesComboChanged;
            newButton.Clicked     += HandleNewButtonClicked;
            deleteButton.Clicked  += HandleDeleteButtonClicked;
        }
예제 #3
0
        public OptionsDialog(MonoDevelop.Components.Window parentWindow, object dataObject, string extensionPath, bool removeEmptySections)
        {
            buttonCancel = new Gtk.Button(Gtk.Stock.Cancel);
            AddActionWidget(this.buttonCancel, ResponseType.Cancel);

            buttonOk = new Gtk.Button(Gtk.Stock.Ok);
            this.ActionArea.PackStart(buttonOk);
            buttonOk.Clicked += OnButtonOkClicked;

            mainHBox = new HBox();
            tree     = new TreeView();
            var sw = new ScrolledWindow();

            sw.Add(tree);
            sw.HscrollbarPolicy = PolicyType.Never;
            sw.VscrollbarPolicy = PolicyType.Automatic;
            sw.ShadowType       = ShadowType.None;

            var fboxTree = new HeaderBox();

            fboxTree.SetMargins(0, 1, 0, 1);
            fboxTree.SetPadding(0, 0, 0, 0);
            fboxTree.BackgroundColor = new Gdk.Color(255, 255, 255);
            fboxTree.Add(sw);
            mainHBox.PackStart(fboxTree, false, false, 0);

            Realized += delegate {
                fboxTree.BackgroundColor = tree.Style.Base(Gtk.StateType.Normal);
            };

            var vbox = new VBox();

            mainHBox.PackStart(vbox, true, true, 0);
            var headerBox = new HBox(false, 6);

            labelTitle        = new Label();
            labelTitle.Xalign = 0;
            textHeader        = new Alignment(0, 0, 1, 1);
            textHeader.Add(labelTitle);
            textHeader.BorderWidth = 12;
            headerBox.PackStart(textHeader, true, true, 0);

            imageHeader = new OptionsDialogHeader();
            imageHeader.Hide();
            headerBox.PackStart(imageHeader.ToGtkWidget());

            var fboxHeader = new HeaderBox();

            fboxHeader.SetMargins(0, 1, 0, 0);
            fboxHeader.Add(headerBox);
//			fbox.GradientBackround = true;
//			fbox.BackgroundColor = new Gdk.Color (255, 255, 255);
            Realized += delegate {
                var c = Style.Background(Gtk.StateType.Normal).ToXwtColor();
                c.Light += 0.09;
                fboxHeader.BackgroundColor = c.ToGdkColor();
            };
            StyleSet += delegate {
                if (IsRealized)
                {
                    var c = Style.Background(Gtk.StateType.Normal).ToXwtColor();
                    c.Light += 0.09;
                    fboxHeader.BackgroundColor = c.ToGdkColor();
                }
            };
            vbox.PackStart(fboxHeader, false, false, 0);

            pageFrame = new HBox();
            var fbox = new HeaderBox();

            fbox.SetMargins(0, 1, 0, 0);
            fbox.ShowTopShadow = true;
            fbox.Add(pageFrame);
            vbox.PackStart(fbox, true, true, 0);

            this.VBox.PackStart(mainHBox, true, true, 0);

            this.removeEmptySections = removeEmptySections;
            extensionContext         = AddinManager.CreateExtensionContext();

            this.mainDataObject = dataObject;
            this.extensionPath  = extensionPath;

            if (parentWindow != null)
            {
                TransientFor = parentWindow;
            }

            ImageService.EnsureStockIconIsLoaded(emptyCategoryIcon);

            store               = new TreeStore(typeof(OptionsDialogSection));
            tree.Model          = store;
            tree.HeadersVisible = false;

            // Column 0 is used to add some padding at the left of the expander
            TreeViewColumn col0 = new TreeViewColumn();

            col0.MinWidth = 6;
            tree.AppendColumn(col0);

            TreeViewColumn col = new TreeViewColumn();
            var            crp = new CellRendererImage();

            col.PackStart(crp, false);
            col.SetCellDataFunc(crp, PixbufCellDataFunc);
            var crt = new CellRendererText();

            col.PackStart(crt, true);
            col.SetCellDataFunc(crt, TextCellDataFunc);
            tree.AppendColumn(col);

            tree.ExpanderColumn = col;

            tree.Selection.Changed += OnSelectionChanged;

            Child.ShowAll();

            InitializeContext(extensionContext);

            FillTree();
            ExpandCategories();
            RestoreLastPanel();
            this.DefaultResponse = Gtk.ResponseType.Ok;

            buttonOk.CanDefault = true;
            buttonOk.GrabDefault();

            DefaultWidth  = 960;
            DefaultHeight = 680;
        }
예제 #4
0
        public DefaultPolicyOptionsDialog(Gtk.Window parentWindow)
            : base(parentWindow, new PolicySet(),
                   "/MonoDevelop/ProjectModel/Gui/DefaultPolicyPanels")
        {
            this.Title = GettextCatalog.GetString("Custom Policies");
            editingSet = (PolicySet)DataObject;

            HBox topBar = new HBox();

            topBar.Spacing = 3;
            topBar.PackStart(new Label(GettextCatalog.GetString("Editing Policy:")), false, false, 0);

            policiesCombo = ComboBox.NewText();
            topBar.PackStart(policiesCombo, false, false, 0);

            deleteButton = new Button(GettextCatalog.GetString("Delete Policy"));
            topBar.PackEnd(deleteButton, false, false, 0);

            exportButton             = new MenuButton();
            exportButton.Label       = GettextCatalog.GetString("Export");
            exportButton.MenuCreator = delegate {
                Gtk.Menu menu = new Gtk.Menu();
                MenuItem mi   = new MenuItem(GettextCatalog.GetString("To file..."));
                mi.Activated += HandleToFile;
                menu.Insert(mi, -1);
                mi            = new MenuItem(GettextCatalog.GetString("To project or solution..."));
                mi.Activated += HandleToProject;
                if (!IdeApp.Workspace.IsOpen)
                {
                    mi.Sensitive = false;
                }
                menu.Insert(mi, -1);
                menu.ShowAll();
                return(menu);
            };
            topBar.PackEnd(exportButton, false, false, 0);

            newButton             = new MenuButton();
            newButton.Label       = GettextCatalog.GetString("Add Policy");
            newButton.MenuCreator = delegate {
                Gtk.Menu menu = new Gtk.Menu();
                MenuItem mi   = new MenuItem(GettextCatalog.GetString("New policy..."));
                mi.Activated += HandleNewButtonClicked;
                menu.Insert(mi, -1);
                mi            = new MenuItem(GettextCatalog.GetString("From file..."));
                mi.Activated += HandleFromFile;
                menu.Insert(mi, -1);
                mi            = new MenuItem(GettextCatalog.GetString("From project or solution..."));
                mi.Activated += HandleFromProject;
                if (!IdeApp.Workspace.IsOpen)
                {
                    mi.Sensitive = false;
                }
                menu.Insert(mi, -1);
                menu.ShowAll();
                return(menu);
            };
            topBar.PackEnd(newButton, false, false, 0);

            Alignment align = new Alignment(0f, 0f, 1f, 1f);

            align.LeftPadding   = 9;
            align.TopPadding    = 9;
            align.RightPadding  = 9;
            align.BottomPadding = 9;
            align.Add(topBar);

            HeaderBox ebox = new HeaderBox();

            ebox.GradientBackround = true;
            ebox.SetMargins(0, 1, 0, 0);
            ebox.Add(align);

            ebox.ShowAll();

            VBox.PackStart(ebox, false, false, 0);
            VBox.BorderWidth = 0;
            Box.BoxChild c = (Box.BoxChild)VBox [ebox];
            c.Position = 0;

            foreach (PolicySet ps in PolicyService.GetUserPolicySets())
            {
                PolicySet copy = ps.Clone();
                originalSets [copy] = ps;
                sets.Add(copy);
            }
            FillPolicySets();

            policiesCombo.Changed += HandlePoliciesComboChanged;
            deleteButton.Clicked  += HandleDeleteButtonClicked;
        }
예제 #5
0
        public LogWidget(VersionControlDocumentInfo info)
        {
            this.Build();
            this.info = info;
            if (info.Document != null)
            {
                this.preselectFile = info.Item.Path;
            }

            var separator = new HeaderBox();

            separator.SetMargins(1, 0, 0, 0);
            separator.HeightRequest = 4;
            separator.ShowAll();

            hpaned1 = hpaned1.ReplaceWithWidget(new HPanedThin(), true);
            vpaned1 = vpaned1.ReplaceWithWidget(new VPanedThin()
            {
                HandleWidget = separator
            }, true);

            revertButton = new DocumentToolButton("vc-revert-command", GettextCatalog.GetString("Revert changes from this revision"));
//			revertButton.Sensitive = false;
            revertButton.Clicked += new EventHandler(RevertRevisionClicked);

            revertToButton = new DocumentToolButton("vc-revert-command", GettextCatalog.GetString("Revert to this revision"));
//			revertToButton.Sensitive = false;
            revertToButton.Clicked += new EventHandler(RevertToRevisionClicked);

            searchEntry = new SearchEntry();
            searchEntry.WidthRequest             = 200;
            searchEntry.ForceFilterButtonVisible = true;
            searchEntry.EmptyMessage             = GettextCatalog.GetString("Search");
            searchEntry.Changed += HandleSearchEntryFilterChanged;
            searchEntry.Ready    = true;
            searchEntry.Show();

            messageRenderer.Ellipsize = Pango.EllipsizeMode.End;
            TreeViewColumn colRevMessage = new TreeViewColumn();

            colRevMessage.Title = GettextCatalog.GetString("Message");
            var graphRenderer = new RevisionGraphCellRenderer();

            colRevMessage.PackStart(graphRenderer, false);
            colRevMessage.SetCellDataFunc(graphRenderer, GraphFunc);

            colRevMessage.PackStart(messageRenderer, true);
            colRevMessage.SetCellDataFunc(messageRenderer, MessageFunc);
            colRevMessage.Sizing = TreeViewColumnSizing.Autosize;

            treeviewLog.AppendColumn(colRevMessage);
            colRevMessage.MinWidth  = 350;
            colRevMessage.Resizable = true;


            TreeViewColumn colRevDate = new TreeViewColumn(GettextCatalog.GetString("Date"), textRenderer);

            colRevDate.SetCellDataFunc(textRenderer, DateFunc);
            colRevDate.Resizable = true;
            treeviewLog.AppendColumn(colRevDate);

            TreeViewColumn colRevAuthor = new TreeViewColumn();

            colRevAuthor.Title = GettextCatalog.GetString("Author");
            colRevAuthor.PackStart(pixRenderer, false);
            colRevAuthor.PackStart(textRenderer, true);
            colRevAuthor.SetCellDataFunc(textRenderer, AuthorFunc);
            colRevAuthor.SetCellDataFunc(pixRenderer, AuthorIconFunc);
            colRevAuthor.Resizable = true;
            treeviewLog.AppendColumn(colRevAuthor);

            TreeViewColumn colRevNum = new TreeViewColumn(GettextCatalog.GetString("Revision"), textRenderer);

            colRevNum.SetCellDataFunc(textRenderer, RevisionFunc);
            colRevNum.Resizable = true;
            treeviewLog.AppendColumn(colRevNum);

            treeviewLog.Model              = logstore;
            treeviewLog.Selection.Changed += TreeSelectionChanged;

            treeviewFiles = new FileTreeView();
            treeviewFiles.DiffLineActivated += HandleTreeviewFilesDiffLineActivated;
            scrolledwindowFiles.Child        = treeviewFiles;
            scrolledwindowFiles.ShowAll();

            changedpathstore = new TreeStore(typeof(Gdk.Pixbuf), typeof(string), // icon/file name
                                             typeof(Gdk.Pixbuf), typeof(string), // icon/operation
                                             typeof(string),                     // path
                                             typeof(string),                     // revision path (invisible)
                                             typeof(string[])                    // diff
                                             );

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

            colChangedFile.Title = GettextCatalog.GetString("File");
            colChangedFile.PackStart(crp, false);
            colChangedFile.PackStart(crt, true);
            colChangedFile.AddAttribute(crp, "pixbuf", 2);
            colChangedFile.AddAttribute(crt, "text", 3);
            treeviewFiles.AppendColumn(colChangedFile);

            TreeViewColumn colOperation = new TreeViewColumn();

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

            TreeViewColumn colChangedPath = new TreeViewColumn();

            colChangedPath.Title = GettextCatalog.GetString("Path");

            diffRenderer.DrawLeft = true;
            colChangedPath.PackStart(diffRenderer, true);
            colChangedPath.SetCellDataFunc(diffRenderer, SetDiffCellData);
            treeviewFiles.AppendColumn(colChangedPath);
            treeviewFiles.Model          = changedpathstore;
            treeviewFiles.TestExpandRow += HandleTreeviewFilesTestExpandRow;
            treeviewFiles.Events        |= Gdk.EventMask.PointerMotionMask;

            textviewDetails.WrapMode = Gtk.WrapMode.Word;

            labelAuthor.Text   = "";
            labelDate.Text     = "";
            labelRevision.Text = "";

            vbox2.Remove(scrolledwindow1);
            HeaderBox tb = new HeaderBox();

            tb.Show();
            tb.SetMargins(1, 0, 0, 0);
            tb.ShowTopShadow = true;
            tb.ShadowSize    = 4;
            tb.SetPadding(8, 8, 8, 8);
            tb.UseChildBackgroundColor = true;
            tb.Add(scrolledwindow1);
            vbox2.PackStart(tb, true, true, 0);
        }
예제 #6
0
        public LogWidget(VersionControlDocumentInfo info)
        {
            this.Build();
            this.info = info;
            if (info.Document != null)
            {
                this.preselectFile = info.Item.Path;
            }

            var separator = new HeaderBox();

            separator.SetMargins(1, 0, 0, 0);
            separator.HeightRequest = 4;
            separator.ShowAll();

            hpaned1 = hpaned1.ReplaceWithWidget(new HPanedThin(), true);
            vpaned1 = vpaned1.ReplaceWithWidget(new VPanedThin()
            {
                HandleWidget = separator
            }, true);

            revertButton = new DocumentToolButton("vc-revert-command", GettextCatalog.GetString("Revert changes from this revision"));
            revertButton.GetNativeWidget <Gtk.Widget> ().Sensitive = false;
            revertButton.Clicked += new EventHandler(RevertRevisionClicked);

            revertToButton = new DocumentToolButton("vc-revert-command", GettextCatalog.GetString("Revert to this revision"));
            revertToButton.GetNativeWidget <Gtk.Widget> ().Sensitive = false;
            revertToButton.Clicked += new EventHandler(RevertToRevisionClicked);

            refreshButton          = new DocumentToolButton(Gtk.Stock.Refresh, GettextCatalog.GetString("Refresh"));
            refreshButton.Clicked += new EventHandler(RefreshClicked);

            searchEntry = new SearchEntry();
            searchEntry.WidthRequest             = 200;
            searchEntry.ForceFilterButtonVisible = true;
            searchEntry.EmptyMessage             = GettextCatalog.GetString("Search");
            searchEntry.Changed += HandleSearchEntryFilterChanged;
            searchEntry.Ready    = true;
            searchEntry.Show();

            messageRenderer.Ellipsize = Pango.EllipsizeMode.End;
            TreeViewColumn colRevMessage = new TreeViewColumn();

            colRevMessage.Title = GettextCatalog.GetString("Message");
            var graphRenderer = new RevisionGraphCellRenderer();

            colRevMessage.PackStart(graphRenderer, false);
            colRevMessage.SetCellDataFunc(graphRenderer, GraphFunc);

            colRevMessage.PackStart(messageRenderer, true);
            colRevMessage.SetCellDataFunc(messageRenderer, MessageFunc);
            colRevMessage.Sizing = TreeViewColumnSizing.Autosize;

            treeviewLog.AppendColumn(colRevMessage);
            colRevMessage.MinWidth  = 350;
            colRevMessage.Resizable = true;

            TreeViewColumn colRevDate = new TreeViewColumn(GettextCatalog.GetString("Date"), textRenderer);

            colRevDate.SetCellDataFunc(textRenderer, DateFunc);
            colRevDate.Resizable = true;
            treeviewLog.AppendColumn(colRevDate);

            TreeViewColumn colRevAuthor = new TreeViewColumn();

            colRevAuthor.Title = GettextCatalog.GetString("Author");
            colRevAuthor.PackStart(pixRenderer, false);
            colRevAuthor.PackStart(textRenderer, true);
            colRevAuthor.SetCellDataFunc(textRenderer, AuthorFunc);
            colRevAuthor.SetCellDataFunc(pixRenderer, AuthorIconFunc);
            colRevAuthor.Resizable = true;
            treeviewLog.AppendColumn(colRevAuthor);

            TreeViewColumn colRevNum = new TreeViewColumn(GettextCatalog.GetString("Revision"), textRenderer);

            colRevNum.SetCellDataFunc(textRenderer, RevisionFunc);
            colRevNum.Resizable = true;
            treeviewLog.AppendColumn(colRevNum);

            treeviewLog.Model              = logstore;
            treeviewLog.Selection.Changed += TreeSelectionChanged;

            treeviewFiles = new FileTreeView();
            treeviewFiles.DiffLineActivated += HandleTreeviewFilesDiffLineActivated;
            scrolledwindowFiles.Child        = treeviewFiles;
            scrolledwindowFiles.ShowAll();

            changedpathstore = new TreeStore(typeof(Xwt.Drawing.Image), typeof(string), // icon/file name
                                             typeof(Xwt.Drawing.Image), typeof(string), // icon/operation
                                             typeof(string),                            // path
                                             typeof(string),                            // revision path (invisible)
                                             typeof(string [])                          // diff
                                             );

            TreeViewColumn colChangedFile = new TreeViewColumn();
            var            crp            = new CellRendererImage();
            var            crt            = new CellRendererText();

            colChangedFile.Title = GettextCatalog.GetString("File");
            colChangedFile.PackStart(crp, false);
            colChangedFile.PackStart(crt, true);
            colChangedFile.SetCellDataFunc(crp, HandleNodeCellDataFunc);
            colChangedFile.AddAttribute(crt, "text", 3);
            treeviewFiles.AppendColumn(colChangedFile);

            TreeViewColumn colOperation = new TreeViewColumn();

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

            TreeViewColumn colChangedPath = new TreeViewColumn();

            colChangedPath.Title = GettextCatalog.GetString("Path");

            diffRenderer.DrawLeft = true;
            colChangedPath.PackStart(diffRenderer, true);
            colChangedPath.SetCellDataFunc(diffRenderer, SetDiffCellData);
            treeviewFiles.AppendColumn(colChangedPath);
            treeviewFiles.Model          = changedpathstore;
            treeviewFiles.TestExpandRow += HandleTreeviewFilesTestExpandRow;
            treeviewFiles.Events        |= Gdk.EventMask.PointerMotionMask;

            textviewDetails.WrapMode = Gtk.WrapMode.Word;
            textviewDetails.AddEvents((int)Gdk.EventMask.ButtonPressMask);
            textviewDetails.ButtonPressEvent += TextviewDetails_ButtonPressEvent;

            labelAuthor.Text   = "";
            labelDate.Text     = "";
            labelRevision.Text = "";

            labelDate.AddEvents((int)Gdk.EventMask.ButtonPressMask);
            labelDate.ButtonPressEvent += LabelDate_ButtonPressEvent;

            labelAuthor.AddEvents((int)Gdk.EventMask.ButtonPressMask);
            labelAuthor.ButtonPressEvent += LabelAuthor_ButtonPressEvent;

            labelRevision.AddEvents((int)Gdk.EventMask.ButtonPressMask);
            labelRevision.ButtonPressEvent += LabelRevision_ButtonPressEvent;

            vbox2.Remove(scrolledwindow1);
            HeaderBox tb = new HeaderBox();

            tb.Show();
            tb.SetMargins(1, 0, 0, 0);
            tb.ShowTopShadow = true;
            tb.ShadowSize    = 4;
            tb.SetPadding(8, 8, 8, 8);
            tb.UseChildBackgroundColor = true;
            tb.Add(scrolledwindow1);
            vbox2.PackStart(tb, true, true, 0);

            (Platform.IsMac ? Xwt.Toolkit.NativeEngine : Xwt.Toolkit.CurrentEngine).Invoke(() => {
                popupMenu    = new Xwt.Menu();
                var copyItem = new Xwt.MenuItem(GettextCatalog.GetString("Copy"));
                popupMenu.Items.Add(copyItem);
                copyItem.Clicked += (sender, e) => {
                    var selectedText = GetSelectedText();
                    if (!string.IsNullOrEmpty(selectedText))
                    {
                        LogView.CopyToClipboard(selectedText);
                    }
                };
            });

            UpdateStyle();
            Ide.Gui.Styles.Changed += HandleStylesChanged;
        }
예제 #7
0
        void Init()
        {
            main   = new VBox(false, 6);
            widget = main;

            buttonCommit = new Gtk.Button()
            {
                Image = new Xwt.ImageView(Xwt.Drawing.Image.FromResource("commit-light-16.png")).ToGtkWidget(),
                Label = GettextCatalog.GetString("Commit...")
            };
            buttonCommit.Image.Show();
            buttonRevert = new Gtk.Button()
            {
                Image = new Xwt.ImageView(Xwt.Drawing.Image.FromResource("revert-light-16.png")).ToGtkWidget(),
                Label = GettextCatalog.GetString("Revert")
            };
            buttonRevert.Image.Show();
            showRemoteStatus = new Gtk.Button()
            {
                Image = new Xwt.ImageView(Xwt.Drawing.Image.FromResource("remote-status-light-16.png")).ToGtkWidget(),
                Label = GettextCatalog.GetString("Show Remote Status")
            };
            showRemoteStatus.Image.Show();

            status = new Label("");
            main.PackStart(status, false, false, 0);

            scroller                = new ScrolledWindow();
            scroller.ShadowType     = Gtk.ShadowType.None;
            filelist                = new FileTreeView();
            filelist.Selection.Mode = Gtk.SelectionMode.Multiple;

            scroller.Add(filelist);
            scroller.HscrollbarPolicy   = PolicyType.Automatic;
            scroller.VscrollbarPolicy   = PolicyType.Automatic;
            filelist.RowActivated      += OnRowActivated;
            filelist.DiffLineActivated += OnDiffLineActivated;

            cellToggle          = new CellRendererToggle();
            cellToggle.Toggled += new ToggledHandler(OnCommitToggledHandler);
            var crc = new CellRendererImage();

            crc.StockId       = "vc-comment";
            colCommit         = new TreeViewColumn();
            colCommit.Spacing = 2;
            colCommit.Widget  = new Xwt.ImageView(Xwt.Drawing.Image.FromResource("commit-light-16.png")).ToGtkWidget();
            colCommit.Widget.Show();
            colCommit.PackStart(cellToggle, false);
            colCommit.PackStart(crc, false);
            colCommit.AddAttribute(cellToggle, "active", ColCommit);
            colCommit.AddAttribute(cellToggle, "visible", ColShowToggle);
            colCommit.AddAttribute(crc, "visible", ColShowComment);

            CellRendererText crt     = new CellRendererText();
            var            crp       = new CellRendererImage();
            TreeViewColumn colStatus = new TreeViewColumn();

            colStatus.Title = GettextCatalog.GetString("Status");
            colStatus.PackStart(crp, false);
            colStatus.PackStart(crt, true);
            colStatus.AddAttribute(crp, "image", ColIcon);
            colStatus.AddAttribute(crp, "visible", ColShowStatus);
            colStatus.AddAttribute(crt, "text", ColStatus);
            colStatus.AddAttribute(crt, "foreground", ColStatusColor);

            colFile         = new TreeViewColumn();
            colFile.Title   = GettextCatalog.GetString("File");
            colFile.Spacing = 2;
            crp             = new CellRendererImage();
            diffRenderer    = new CellRendererDiff();
            colFile.PackStart(crp, false);
            colFile.PackStart(diffRenderer, true);
            colFile.AddAttribute(crp, "image", ColIconFile);
            colFile.AddAttribute(crp, "visible", ColShowStatus);
            colFile.SetCellDataFunc(diffRenderer, new TreeCellDataFunc(SetDiffCellData));

            crt             = new CellRendererText();
            crp             = new CellRendererImage();
            colRemote       = new TreeViewColumn();
            colRemote.Title = GettextCatalog.GetString("Remote Status");
            colRemote.PackStart(crp, false);
            colRemote.PackStart(crt, true);
            colRemote.AddAttribute(crp, "image", ColRemoteIcon);
            colRemote.AddAttribute(crt, "text", ColRemoteStatus);
            colRemote.AddAttribute(crt, "foreground", ColStatusColor);

            filelist.AppendColumn(colStatus);
            filelist.AppendColumn(colRemote);
            filelist.AppendColumn(colCommit);
            filelist.AppendColumn(colFile);

            colRemote.Visible = false;

            filestore               = new TreeStore(typeof(Xwt.Drawing.Image), typeof(string), typeof(string[]), typeof(string), typeof(bool), typeof(bool), typeof(string), typeof(bool), typeof(bool), typeof(Xwt.Drawing.Image), typeof(bool), typeof(Xwt.Drawing.Image), typeof(string), typeof(bool), typeof(bool));
            filelist.Model          = filestore;
            filelist.TestExpandRow += new Gtk.TestExpandRowHandler(OnTestExpandRow);

            commitBox = new VBox();

            HeaderBox commitMessageLabelBox = new HeaderBox();

            commitMessageLabelBox.SetPadding(6, 6, 6, 6);
            commitMessageLabelBox.SetMargins(1, 1, 0, 0);

            HBox labBox = new HBox();

            labelCommit        = new Gtk.Label(GettextCatalog.GetString("Commit message:"));
            labelCommit.Xalign = 0;
            labBox.PackStart(new Xwt.ImageView(Xwt.Drawing.Image.FromResource("comment-light-16.png")).ToGtkWidget(), false, false, 0);
            labBox.PackStart(labelCommit, true, true, 3);

            commitMessageLabelBox.Add(labBox);
            commitMessageLabelBox.ShowAll();
            //commitBox.PackStart (commitMessageLabelBox, false, false, 0);

            Gtk.ScrolledWindow frame = new Gtk.ScrolledWindow();
            frame.HeightRequest        = 75;
            frame.ShadowType           = ShadowType.None;
            commitText                 = new TextView();
            commitText.WrapMode        = WrapMode.WordChar;
            commitText.Buffer.Changed += OnCommitTextChanged;
            frame.Add(commitText);
            commitBox.PackStart(frame, true, true, 0);

            var paned = new VPanedThin();

            paned.HandleWidget = commitMessageLabelBox;
            paned.Pack1(scroller, true, true);
            paned.Pack2(commitBox, false, false);
            main.PackStart(paned, true, true, 0);

            main.ShowAll();
            status.Visible = false;

            filelist.Selection.Changed += new EventHandler(OnCursorChanged);
            VersionControlService.FileStatusChanged += OnFileStatusChanged;

            filelist.HeadersClickable = true;
            filestore.SetSortFunc(0, CompareNodes);
            colStatus.SortColumnId = 0;
            filestore.SetSortFunc(1, CompareNodes);
            colRemote.SortColumnId = 1;
            filestore.SetSortFunc(2, CompareNodes);
            colCommit.SortColumnId = 2;
            filestore.SetSortFunc(3, CompareNodes);
            colFile.SortColumnId = 3;

            filestore.SetSortColumnId(3, Gtk.SortType.Ascending);

            filelist.DoPopupMenu = DoPopupMenu;

            StartUpdate();
        }