public ThreadsPad() { this.ShadowType = ShadowType.None; store = new TreeStore (typeof(string), typeof (string), typeof(string), typeof(object), typeof(int), typeof(string)); tree = new MonoDevelop.Ide.Gui.Components.PadTreeView (store); tree.RulesHint = true; tree.HeadersVisible = true; treeViewState = new TreeViewState (tree, (int)Columns.Object); TreeViewColumn col = new TreeViewColumn (); CellRenderer crp = new CellRendererIcon (); col.PackStart (crp, false); col.AddAttribute (crp, "stock_id", (int) Columns.Icon); tree.AppendColumn (col); TreeViewColumn FrameCol = new TreeViewColumn (); FrameCol.Title = GettextCatalog.GetString ("Id"); FrameCol.PackStart (tree.TextRenderer, true); FrameCol.AddAttribute (tree.TextRenderer, "text", (int) Columns.Id); FrameCol.AddAttribute (tree.TextRenderer, "weight", (int) Columns.Weight); FrameCol.Resizable = true; FrameCol.Alignment = 0.0f; tree.AppendColumn (FrameCol); col = new TreeViewColumn (); col.Title = GettextCatalog.GetString ("Name"); col.Resizable = true; col.PackStart (tree.TextRenderer, false); col.AddAttribute (tree.TextRenderer, "text", (int) Columns.Name); col.AddAttribute (tree.TextRenderer, "weight", (int) Columns.Weight); tree.AppendColumn (col); col = new TreeViewColumn (); col.Title = GettextCatalog.GetString ("Location"); col.Resizable = true; col.PackStart (tree.TextRenderer, false); col.AddAttribute (tree.TextRenderer, "text", (int) Columns.Location); col.AddAttribute (tree.TextRenderer, "weight", (int) Columns.Weight); tree.AppendColumn (col); Add (tree); ShowAll (); UpdateDisplay (); tree.RowActivated += OnRowActivated; DebuggingService.CallStackChanged += OnStackChanged; DebuggingService.PausedEvent += OnDebuggerPaused; DebuggingService.ResumedEvent += OnDebuggerResumed; DebuggingService.StoppedEvent += OnDebuggerStopped; }
public PackageReferencePanel (SelectReferenceDialog selectDialog, bool showAll) { this.selectDialog = selectDialog; this.showAll = showAll; store = new ListStore (typeof (string), typeof (string), typeof (SystemAssembly), typeof (bool), typeof (string), typeof (string), typeof(IconId), typeof(int), typeof(ReferenceType)); treeView = new TreeView (store); TreeViewColumn firstColumn = new TreeViewColumn (); CellRendererToggle tog_render = new CellRendererToggle (); tog_render.Toggled += new Gtk.ToggledHandler (AddReference); firstColumn.PackStart (tog_render, false); firstColumn.AddAttribute (tog_render, "active", ColSelected); treeView.AppendColumn (firstColumn); TreeViewColumn secondColumn = new TreeViewColumn (); secondColumn.Title = GettextCatalog.GetString ("Assembly"); CellRendererIcon crp = new CellRendererIcon (); secondColumn.PackStart (crp, false); secondColumn.AddAttribute (crp, "icon-id", ColIcon); CellRendererText text_render = new CellRendererText (); secondColumn.PackStart (text_render, true); secondColumn.AddAttribute (text_render, "markup", ColName); treeView.AppendColumn (secondColumn); treeView.AppendColumn (GettextCatalog.GetString ("Version"), new CellRendererText (), "markup", ColVersion); treeView.AppendColumn (GettextCatalog.GetString ("Package"), new CellRendererText (), "text", ColPackage); treeView.Columns[1].Resizable = true; store.SetSortColumnId (0, SortType.Ascending); store.SetSortFunc (0, new TreeIterCompareFunc (Sort)); ScrolledWindow sc = new ScrolledWindow (); sc.ShadowType = Gtk.ShadowType.In; sc.Add (treeView); this.PackStart (sc, true, true, 0); ShowAll (); BorderWidth = 6; }
public void Initialize (IPadWindow window) { // Toolbar and menu definitions ActionCommand gotoCmd = new ActionCommand (LocalCommands.GoToFile, GettextCatalog.GetString ("Go to File")); ActionCommand propertiesCmd = new ActionCommand (LocalCommands.Properties, GettextCatalog.GetString ("Properties"), Gtk.Stock.Properties); menuSet = new CommandEntrySet (); menuSet.Add (gotoCmd); menuSet.AddSeparator (); menuSet.AddItem (DebugCommands.EnableDisableBreakpoint); menuSet.AddItem (DebugCommands.ClearAllBreakpoints); menuSet.AddItem (DebugCommands.DisableAllBreakpoints); menuSet.AddItem (EditCommands.DeleteKey); menuSet.AddSeparator (); menuSet.Add (propertiesCmd); CommandEntrySet toolbarSet = new CommandEntrySet (); toolbarSet.AddItem (DebugCommands.EnableDisableBreakpoint); toolbarSet.AddItem (DebugCommands.ClearAllBreakpoints); toolbarSet.AddItem (DebugCommands.DisableAllBreakpoints); toolbarSet.AddItem (EditCommands.Delete); toolbarSet.AddSeparator (); toolbarSet.Add (propertiesCmd); // The breakpoint list store = new TreeStore (typeof(string), typeof (bool), typeof(string), typeof(object), typeof(string), typeof(string), typeof(string), typeof(string)); tree = new PadTreeView (); tree.Model = store; tree.RulesHint = true; tree.HeadersVisible = true; tree.DoPopupMenu = ShowPopup; tree.KeyPressEvent += OnKeyPressEvent; treeState = new TreeViewState (tree, (int) Columns.Breakpoint); TreeViewColumn col = new TreeViewColumn (); CellRenderer crp = new CellRendererIcon (); col.PackStart (crp, false); col.AddAttribute (crp, "stock_id", (int) Columns.Icon); tree.AppendColumn (col); Gtk.CellRendererToggle toggleRender = new Gtk.CellRendererToggle (); toggleRender.Toggled += new ToggledHandler (ItemToggled); col = new TreeViewColumn (); col.PackStart (toggleRender, false); col.AddAttribute (toggleRender, "active", (int) Columns.Selected); tree.AppendColumn (col); TreeViewColumn FrameCol = new TreeViewColumn (); CellRenderer crt = tree.TextRenderer; FrameCol.Title = GettextCatalog.GetString ("Name"); FrameCol.PackStart (crt, true); FrameCol.AddAttribute (crt, "text", (int) Columns.FileName); FrameCol.Resizable = true; FrameCol.Alignment = 0.0f; tree.AppendColumn (FrameCol); col = tree.AppendColumn (GettextCatalog.GetString ("Condition"), crt, "text", (int) Columns.Condition); col.Resizable = true; col = tree.AppendColumn (GettextCatalog.GetString ("Trace Expression"), crt, "text", (int) Columns.TraceExp); col.Resizable = true; col = tree.AppendColumn (GettextCatalog.GetString ("Hit Count"), crt, "text", (int) Columns.HitCount); col.Resizable = true; col = tree.AppendColumn (GettextCatalog.GetString ("Last Trace"), crt, "text", (int) Columns.LastTrace); col.Resizable = true; sw = new Gtk.ScrolledWindow (); sw.ShadowType = ShadowType.None; sw.Add (tree); control = sw; control.ShowAll (); bps = DebuggingService.Breakpoints; UpdateDisplay (); breakpointUpdatedHandler = DispatchService.GuiDispatch<EventHandler<BreakpointEventArgs>> (OnBreakpointUpdated); breakpointRemovedHandler = DispatchService.GuiDispatch<EventHandler<BreakpointEventArgs>> (OnBreakpointRemoved); breakpointAddedHandler = DispatchService.GuiDispatch<EventHandler<BreakpointEventArgs>> (OnBreakpointAdded); breakpointChangedHandler = DispatchService.GuiDispatch<EventHandler> (OnBreakpointChanged); DebuggingService.Breakpoints.BreakpointAdded += breakpointAddedHandler; DebuggingService.Breakpoints.BreakpointRemoved += breakpointRemovedHandler; DebuggingService.Breakpoints.Changed += breakpointChangedHandler; DebuggingService.Breakpoints.BreakpointUpdated += breakpointUpdatedHandler; DebuggingService.PausedEvent += OnDebuggerStatusCheck; DebuggingService.ResumedEvent += OnDebuggerStatusCheck; DebuggingService.StoppedEvent += OnDebuggerStatusCheck; tree.RowActivated += OnRowActivated; DockItemToolbar toolbar = window.GetToolbar (PositionType.Top); toolbar.Add (toolbarSet, sw); toolbar.ShowAll (); }
public StackTracePad () { this.ShadowType = ShadowType.None; ActionCommand evalCmd = new ActionCommand ("StackTracePad.EvaluateMethodParams", GettextCatalog.GetString ("Evaluate Method Parameters")); ActionCommand gotoCmd = new ActionCommand ("StackTracePad.ActivateFrame", GettextCatalog.GetString ("Activate Stack Frame")); menuSet = new CommandEntrySet (); menuSet.Add (evalCmd); menuSet.Add (gotoCmd); menuSet.AddSeparator (); menuSet.AddItem (EditCommands.SelectAll); menuSet.AddItem (EditCommands.Copy); store = new ListStore (typeof (string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (Pango.Style), typeof (object), typeof (bool)); tree = new PadTreeView (store); tree.RulesHint = true; tree.HeadersVisible = true; tree.Selection.Mode = SelectionMode.Multiple; tree.EnableSearch = true; tree.SearchColumn = 1; tree.ButtonPressEvent += HandleButtonPressEvent; tree.DoPopupMenu = ShowPopup; TreeViewColumn col = new TreeViewColumn (); CellRenderer crp = new CellRendererIcon (); col.PackStart (crp, false); col.AddAttribute (crp, "stock_id", 0); tree.AppendColumn (col); TreeViewColumn FrameCol = new TreeViewColumn (); FrameCol.Title = GettextCatalog.GetString ("Name"); refresh = new CellRendererIcon (); refresh.Pixbuf = ImageService.GetPixbuf (Gtk.Stock.Refresh).ScaleSimple (12, 12, Gdk.InterpType.Hyper); FrameCol.PackStart (refresh, false); FrameCol.AddAttribute (refresh, "visible", 8); FrameCol.PackStart (tree.TextRenderer, true); FrameCol.AddAttribute (tree.TextRenderer, "text", 1); FrameCol.AddAttribute (tree.TextRenderer, "foreground", 5); FrameCol.AddAttribute (tree.TextRenderer, "style", 6); FrameCol.Resizable = true; FrameCol.Alignment = 0.0f; tree.AppendColumn (FrameCol); col = new TreeViewColumn (); col.Title = GettextCatalog.GetString ("File"); col.PackStart (tree.TextRenderer, false); col.AddAttribute (tree.TextRenderer, "text", 2); col.AddAttribute (tree.TextRenderer, "foreground", 5); tree.AppendColumn (col); col = new TreeViewColumn (); col.Title = GettextCatalog.GetString ("Language"); col.PackStart (tree.TextRenderer, false); col.AddAttribute (tree.TextRenderer, "text", 3); col.AddAttribute (tree.TextRenderer, "foreground", 5); tree.AppendColumn (col); col = new TreeViewColumn (); col.Title = GettextCatalog.GetString ("Address"); col.PackStart (tree.TextRenderer, false); col.AddAttribute (tree.TextRenderer, "text", 4); col.AddAttribute (tree.TextRenderer, "foreground", 5); tree.AppendColumn (col); Add (tree); ShowAll (); current_backtrace = DebuggingService.CurrentCallStack; UpdateDisplay (); DebuggingService.CallStackChanged += (EventHandler) DispatchService.GuiDispatch (new EventHandler (OnClassStackChanged)); DebuggingService.CurrentFrameChanged += (EventHandler) DispatchService.GuiDispatch (new EventHandler (OnFrameChanged)); tree.RowActivated += OnRowActivated; }
public OptionsDialog (Gtk.Window parentWindow, object dataObject, string extensionPath, bool removeEmptySections) { this.Build(); this.removeEmptySections = removeEmptySections; extensionContext = AddinManager.CreateExtensionContext (); this.mainDataObject = dataObject; this.extensionPath = extensionPath; if (parentWindow != null) TransientFor = parentWindow; store = new TreeStore (typeof(OptionsDialogSection), typeof(string), typeof(string), typeof(bool), typeof(string)); tree.Model = store; tree.HeadersVisible = false; TreeViewColumn col = new TreeViewColumn (); CellRendererIcon crp = new CellRendererIcon (); crp.StockSize = (uint) IconSize.Menu; col.PackStart (crp, false); col.AddAttribute (crp, "stock-id", 1); col.AddAttribute (crp, "visible", 3); col.AddAttribute (crp, "cell-background", 4); CellRendererText crt = new CellRendererText (); col.PackStart (crt, true); col.AddAttribute (crt, "markup", 2); col.AddAttribute (crt, "cell-background", 4); tree.AppendColumn (col); tree.Selection.Changed += OnSelectionChanged; Child.ShowAll (); InitializeContext (extensionContext); FillTree (); ExpandCategories (); this.DefaultResponse = Gtk.ResponseType.Ok; }
void Init () { main = new VBox(false, 6); widget = main; buttonCommit = new Gtk.Button () { Image = new Gtk.Image ("vc-commit", Gtk.IconSize.Menu), Label = GettextCatalog.GetString ("Commit...") }; buttonCommit.Image.Show (); buttonRevert = new Gtk.Button () { Image = new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), Label = GettextCatalog.GetString ("Revert") }; buttonRevert.Image.Show (); showRemoteStatus = new Gtk.Button () { Image = new Gtk.Image ("vc-remote-status", Gtk.IconSize.Menu), 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; CellRendererToggle cellToggle = new CellRendererToggle(); cellToggle.Toggled += new ToggledHandler(OnCommitToggledHandler); var crc = new CellRendererIcon (); crc.StockId = "vc-comment"; colCommit = new TreeViewColumn (); colCommit.Spacing = 2; colCommit.Widget = new Gtk.Image ("vc-commit", Gtk.IconSize.Menu); 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 CellRendererPixbuf (); TreeViewColumn colStatus = new TreeViewColumn (); colStatus.Title = GettextCatalog.GetString ("Status"); colStatus.PackStart (crp, false); colStatus.PackStart (crt, true); colStatus.AddAttribute (crp, "pixbuf", ColIcon); colStatus.AddAttribute (crp, "visible", ColShowStatus); colStatus.AddAttribute (crt, "text", ColStatus); colStatus.AddAttribute (crt, "foreground", ColStatusColor); TreeViewColumn colFile = new TreeViewColumn (); colFile.Title = GettextCatalog.GetString ("File"); colFile.Spacing = 2; crp = new CellRendererPixbuf (); diffRenderer = new CellRendererDiff (); colFile.PackStart (crp, false); colFile.PackStart (diffRenderer, true); colFile.AddAttribute (crp, "pixbuf", ColIconFile); colFile.AddAttribute (crp, "visible", ColShowStatus); colFile.SetCellDataFunc (diffRenderer, new TreeCellDataFunc (SetDiffCellData)); crt = new CellRendererText(); crp = new CellRendererPixbuf (); colRemote = new TreeViewColumn (); colRemote.Title = GettextCatalog.GetString ("Remote Status"); colRemote.PackStart (crp, false); colRemote.PackStart (crt, true); colRemote.AddAttribute (crp, "pixbuf", 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 (Gdk.Pixbuf), typeof (string), typeof (string[]), typeof (string), typeof(bool), typeof(bool), typeof(string), typeof(bool), typeof (bool), typeof(Gdk.Pixbuf), typeof(bool), typeof (Gdk.Pixbuf), 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 Gtk.Image ("vc-comment", Gtk.IconSize.Menu), 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(); }
public StatusView (string filepath, Repository vc) : base(Path.GetFileName(filepath) + " Status") { this.vc = vc; this.filepath = filepath; changeSet = vc.CreateChangeSet (filepath); main = new VBox(false, 6); widget = main; commandbar = new Toolbar (); commandbar.ToolbarStyle = Gtk.ToolbarStyle.BothHoriz; commandbar.IconSize = Gtk.IconSize.Menu; main.PackStart (commandbar, false, false, 0); buttonCommit = new Gtk.ToolButton (new Gtk.Image ("vc-commit", Gtk.IconSize.Menu), GettextCatalog.GetString ("Commit...")); buttonCommit.IsImportant = true; buttonCommit.Clicked += new EventHandler (OnCommitClicked); commandbar.Insert (buttonCommit, -1); Gtk.ToolButton btnRefresh = new Gtk.ToolButton (new Gtk.Image (Gtk.Stock.Refresh, IconSize.Menu), GettextCatalog.GetString ("Refresh")); btnRefresh.IsImportant = true; btnRefresh.Clicked += new EventHandler (OnRefresh); commandbar.Insert (btnRefresh, -1); buttonRevert = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert")); buttonRevert.IsImportant = true; buttonRevert.Clicked += new EventHandler (OnRevert); commandbar.Insert (buttonRevert, -1); showRemoteStatus = new Gtk.ToolButton (new Gtk.Image ("vc-remote-status", Gtk.IconSize.Menu), GettextCatalog.GetString ("Show Remote Status")); showRemoteStatus.IsImportant = true; showRemoteStatus.Clicked += new EventHandler(OnShowRemoteStatusClicked); commandbar.Insert (showRemoteStatus, -1); Gtk.ToolButton btnCreatePatch = new Gtk.ToolButton (new Gtk.Image ("vc-diff", Gtk.IconSize.Menu), GettextCatalog.GetString ("Create Patch")); btnCreatePatch.IsImportant = true; btnCreatePatch.Clicked += new EventHandler (OnCreatePatch); commandbar.Insert (btnCreatePatch, -1); commandbar.Insert (new Gtk.SeparatorToolItem (), -1); Gtk.ToolButton btnOpen = new Gtk.ToolButton (new Gtk.Image (Gtk.Stock.Open, IconSize.Menu), GettextCatalog.GetString ("Open")); btnOpen.IsImportant = true; btnOpen.Clicked += new EventHandler (OnOpen); commandbar.Insert (btnOpen, -1); commandbar.Insert (new Gtk.SeparatorToolItem (), -1); Gtk.ToolButton btnExpand = new Gtk.ToolButton (null, GettextCatalog.GetString ("Expand All")); btnExpand.IsImportant = true; btnExpand.Clicked += new EventHandler (OnExpandAll); commandbar.Insert (btnExpand, -1); Gtk.ToolButton btnCollapse = new Gtk.ToolButton (null, GettextCatalog.GetString ("Collapse All")); btnCollapse.IsImportant = true; btnCollapse.Clicked += new EventHandler (OnCollapseAll); commandbar.Insert (btnCollapse, -1); commandbar.Insert (new Gtk.SeparatorToolItem (), -1); Gtk.ToolButton btnSelectAll = new Gtk.ToolButton (null, GettextCatalog.GetString ("Select All")); btnSelectAll.IsImportant = true; btnSelectAll.Clicked += new EventHandler (OnSelectAll); commandbar.Insert (btnSelectAll, -1); Gtk.ToolButton btnSelectNone = new Gtk.ToolButton (null, GettextCatalog.GetString ("Select None")); btnSelectNone.IsImportant = true; btnSelectNone.Clicked += new EventHandler (OnSelectNone); commandbar.Insert (btnSelectNone, -1); status = new Label(""); main.PackStart(status, false, false, 0); scroller = new ScrolledWindow(); scroller.ShadowType = Gtk.ShadowType.In; 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; CellRendererToggle cellToggle = new CellRendererToggle(); cellToggle.Toggled += new ToggledHandler(OnCommitToggledHandler); var crc = new CellRendererIcon (); crc.StockId = "vc-comment"; colCommit = new TreeViewColumn (); colCommit.Spacing = 2; colCommit.Widget = new Gtk.Image ("vc-commit", Gtk.IconSize.Menu); 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 CellRendererPixbuf (); TreeViewColumn colStatus = new TreeViewColumn (); colStatus.Title = GettextCatalog.GetString ("Status"); colStatus.PackStart (crp, false); colStatus.PackStart (crt, true); colStatus.AddAttribute (crp, "pixbuf", ColIcon); colStatus.AddAttribute (crp, "visible", ColShowStatus); colStatus.AddAttribute (crt, "text", ColStatus); colStatus.AddAttribute (crt, "foreground", ColStatusColor); TreeViewColumn colFile = new TreeViewColumn (); colFile.Title = GettextCatalog.GetString ("File"); colFile.Spacing = 2; crp = new CellRendererPixbuf (); diffRenderer = new CellRendererDiff (); colFile.PackStart (crp, false); colFile.PackStart (diffRenderer, true); colFile.AddAttribute (crp, "pixbuf", ColIconFile); colFile.AddAttribute (crp, "visible", ColShowStatus); colFile.SetCellDataFunc (diffRenderer, new TreeCellDataFunc (SetDiffCellData)); crt = new CellRendererText(); crp = new CellRendererPixbuf (); colRemote = new TreeViewColumn (); colRemote.Title = GettextCatalog.GetString ("Remote Status"); colRemote.PackStart (crp, false); colRemote.PackStart (crt, true); colRemote.AddAttribute (crp, "pixbuf", 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 (Gdk.Pixbuf), typeof (string), typeof (string[]), typeof (string), typeof(bool), typeof(bool), typeof(string), typeof(bool), typeof (bool), typeof(Gdk.Pixbuf), typeof(bool), typeof (Gdk.Pixbuf), typeof(string), typeof(bool), typeof(bool)); filelist.Model = filestore; filelist.TestExpandRow += new Gtk.TestExpandRowHandler (OnTestExpandRow); commitBox = new VBox (); HBox labBox = new HBox (); labelCommit = new Gtk.Label (GettextCatalog.GetString ("Commit message:")); labelCommit.Xalign = 0; labBox.PackStart (new Gtk.Image ("vc-comment", Gtk.IconSize.Menu), false, false, 0); labBox.PackStart (labelCommit, true, true, 3); commitBox.PackStart (labBox, false, false, 0); Gtk.ScrolledWindow frame = new Gtk.ScrolledWindow (); frame.ShadowType = ShadowType.In; commitText = new TextView (); commitText.WrapMode = WrapMode.WordChar; commitText.Buffer.Changed += OnCommitTextChanged; frame.Add (commitText); commitBox.PackStart (frame, true, true, 6); VPaned paned = new VPaned (); 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(); }
public ChangeSetView () { ShadowType = Gtk.ShadowType.In; filelist = new FileTreeView(); filelist.Selection.Mode = SelectionMode.Multiple; Add (filelist); HscrollbarPolicy = PolicyType.Automatic; VscrollbarPolicy = PolicyType.Automatic; filelist.RowActivated += OnRowActivated; filelist.DiffLineActivated += OnDiffLineActivated; CellRendererToggle cellToggle = new CellRendererToggle(); // cellToggle.Toggled += new ToggledHandler(OnCommitToggledHandler); var crc = new CellRendererIcon (); crc.StockId = "vc-comment"; colCommit = new TreeViewColumn (); colCommit.Spacing = 2; colCommit.Widget = new Gtk.Image ("vc-commit", Gtk.IconSize.Menu); 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); colCommit.Visible = false; CellRendererText crt = new CellRendererText(); var crp = new CellRendererPixbuf (); TreeViewColumn colStatus = new TreeViewColumn (); colStatus.Title = GettextCatalog.GetString ("Status"); colStatus.PackStart (crp, false); colStatus.PackStart (crt, true); colStatus.AddAttribute (crp, "pixbuf", ColIcon); colStatus.AddAttribute (crp, "visible", ColShowStatus); colStatus.AddAttribute (crt, "text", ColStatus); colStatus.AddAttribute (crt, "foreground", ColStatusColor); TreeViewColumn colFile = new TreeViewColumn (); colFile.Title = GettextCatalog.GetString ("File"); colFile.Spacing = 2; crp = new CellRendererPixbuf (); diffRenderer = new CellRendererDiff (); colFile.PackStart (crp, false); colFile.PackStart (diffRenderer, true); colFile.AddAttribute (crp, "pixbuf", ColIconFile); colFile.AddAttribute (crp, "visible", ColShowStatus); colFile.SetCellDataFunc (diffRenderer, new TreeCellDataFunc (SetDiffCellData)); filelist.AppendColumn(colStatus); filelist.AppendColumn(colCommit); filelist.AppendColumn(colFile); filestore = new TreeStore (typeof (Gdk.Pixbuf), typeof (string), typeof (string[]), typeof(bool), typeof(bool), typeof(string), typeof(bool), typeof (bool), typeof(Gdk.Pixbuf), typeof(bool), typeof(string)); filelist.Model = filestore; filelist.TestExpandRow += new Gtk.TestExpandRowHandler (OnTestExpandRow); ShowAll(); filelist.Selection.Changed += new EventHandler(OnCursorChanged); filelist.HeadersClickable = true; filestore.SetSortFunc (0, CompareNodes); colStatus.SortColumnId = 0; filestore.SetSortFunc (1, CompareNodes); colCommit.SortColumnId = 1; filestore.SetSortFunc (2, CompareNodes); colFile.SortColumnId = 2; filestore.SetSortColumnId (2, Gtk.SortType.Ascending); }
public KeyBindingsPanel () { this.Build (); keyStore = new TreeStore (typeof (Command), typeof (string), typeof (string), typeof (string), typeof (int), typeof(string), typeof(bool), typeof (bool)); keyTreeView.Model = filterModel = new TreeModelFilter (keyStore, null); filterModel.VisibleColumn = visibleCol; TreeViewColumn col = new TreeViewColumn (); col.Title = GettextCatalog.GetString ("Command"); col.Spacing = 4; CellRendererIcon crp = new CellRendererIcon (); col.PackStart (crp, false); col.AddAttribute (crp, "stock-id", iconCol); col.AddAttribute (crp, "visible", iconVisibleCol); CellRendererText crt = new CellRendererText (); col.PackStart (crt, true); col.AddAttribute (crt, "text", labelCol); col.AddAttribute (crt, "weight", boldCol); keyTreeView.AppendColumn (col); TreeViewColumn bindingTVCol = new TreeViewColumn (); bindingTVCol.Title = GettextCatalog.GetString ("Key Binding"); CellRendererText bindingRenderer = new CellRendererText (); bindingTVCol.PackStart (bindingRenderer, false); bindingTVCol.SetCellDataFunc (bindingRenderer, delegate (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter) { string binding = (model.GetValue (iter, bindingCol) as string) ?? ""; ((CellRendererText)cell).Text = binding.Length > 0 ? KeyBindingManager.BindingToDisplayLabel (binding, false) : binding; }); keyTreeView.AppendColumn (bindingTVCol); keyTreeView.AppendColumn (GettextCatalog.GetString ("Description"), new CellRendererText (), "text", descCol); keyTreeView.Selection.Changed += OnKeysTreeViewSelectionChange; accelEntry.KeyPressEvent += OnAccelEntryKeyPress; accelEntry.KeyReleaseEvent += OnAccelEntryKeyRelease; accelEntry.Changed += delegate { UpdateWarningLabel (); }; updateButton.Clicked += OnUpdateButtonClick; currentBindings = KeyBindingService.CurrentKeyBindingSet.Clone (); schemes = new List<KeyBindingScheme> (KeyBindingService.Schemes); schemeCombo.AppendText (GettextCatalog.GetString ("Custom")); foreach (KeyBindingScheme s in schemes) schemeCombo.AppendText (s.Name); SelectCurrentScheme (); schemeCombo.Changed += OnKeyBindingSchemeChanged; searchEntry.Changed += delegate { processedFilterTerms = searchEntry.Text.Split (new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) .Select (s => s.ToLower ()).ToArray ();; filterChanged = true; if (!filterTimeoutRunning) { filterTimeoutRunning = true; GLib.Timeout.Add (300, delegate { if (!filterChanged) { if (filterTimeoutRunning) Refilter (); filterTimeoutRunning = false; return false; } filterChanged = false; return true; }); }; }; clearFilterButton.Clicked += ClearFilter; //HACK: workaround for MD Bug 608021: Stetic loses values assigned to "new" properties of custom widget conflicButton.Label = GettextCatalog.GetString ("_View Conflicts"); conflicButton.UseUnderline = true; }
public StackTracePad () { this.ShadowType = ShadowType.None; ActionCommand gotoCmd = new ActionCommand ("StackTracePad.ActivateFrame", GettextCatalog.GetString ("Activate Stack Frame")); menuSet = new CommandEntrySet (); menuSet.Add (gotoCmd); menuSet.AddSeparator (); menuSet.AddItem (EditCommands.SelectAll); menuSet.AddItem (EditCommands.Copy); store = new ListStore (typeof(string), typeof (string), typeof(string), typeof(string), typeof(string), typeof(string), typeof (Pango.Style)); tree = new MonoDevelop.Ide.Gui.Components.PadTreeView (store); tree.RulesHint = true; tree.HeadersVisible = true; tree.Selection.Mode = SelectionMode.Multiple; tree.DoPopupMenu = ShowPopup; TreeViewColumn col = new TreeViewColumn (); CellRenderer crp = new CellRendererIcon (); col.PackStart (crp, false); col.AddAttribute (crp, "stock_id", 0); tree.AppendColumn (col); TreeViewColumn FrameCol = new TreeViewColumn (); FrameCol.Title = GettextCatalog.GetString ("Name"); FrameCol.PackStart (tree.TextRenderer, true); FrameCol.AddAttribute (tree.TextRenderer, "text", 1); FrameCol.AddAttribute (tree.TextRenderer, "foreground", 5); FrameCol.AddAttribute (tree.TextRenderer, "style", 6); FrameCol.Resizable = true; FrameCol.Alignment = 0.0f; tree.AppendColumn (FrameCol); col = new TreeViewColumn (); col.Title = GettextCatalog.GetString ("File"); col.PackStart (tree.TextRenderer, false); col.AddAttribute (tree.TextRenderer, "text", 2); col.AddAttribute (tree.TextRenderer, "foreground", 5); tree.AppendColumn (col); col = new TreeViewColumn (); col.Title = GettextCatalog.GetString ("Language"); col.PackStart (tree.TextRenderer, false); col.AddAttribute (tree.TextRenderer, "text", 3); col.AddAttribute (tree.TextRenderer, "foreground", 5); tree.AppendColumn (col); col = new TreeViewColumn (); col.Title = GettextCatalog.GetString ("Address"); col.PackStart (tree.TextRenderer, false); col.AddAttribute (tree.TextRenderer, "text", 4); col.AddAttribute (tree.TextRenderer, "foreground", 5); tree.AppendColumn (col); Add (tree); ShowAll (); current_backtrace = DebuggingService.CurrentCallStack; UpdateDisplay (); DebuggingService.CallStackChanged += (EventHandler) DispatchService.GuiDispatch (new EventHandler (OnClassStackChanged)); DebuggingService.CurrentFrameChanged += (EventHandler) DispatchService.GuiDispatch (new EventHandler (OnFrameChanged)); tree.RowActivated += OnRowActivated; }
public TemplateTreeView () { HeadersVisible = false; templateStore = new ListStore (typeof(string), typeof(string), typeof(TemplateItem)); Model = templateStore; TreeViewColumn col = new TreeViewColumn (); CellRendererIcon crp = new CellRendererIcon (); crp.StockSize = (uint) Gtk.IconSize.Dnd; crp.Ypad = 2; col.PackStart (crp, false); col.AddAttribute (crp, "stock-id", 0); CellRendererText crt = new CellRendererText (); col.PackStart (crt, false); col.AddAttribute (crt, "markup", 1); AppendColumn (col); ShowAll (); }
public TemplateTreeView () { HeadersVisible = false; templateStore = new ListStore (typeof(TemplateItem)); Model = filterModel = new TreeModelFilter (templateStore, null); filterModel.VisibleFunc = FilterFuncWrapper; var col = new TreeViewColumn (); var crp = new CellRendererIcon () { StockSize = (uint) Gtk.IconSize.Dnd, Ypad = 2, }; col.PackStart (crp, false); col.SetCellDataFunc (crp, CellDataFuncIcon); var crt = new CellRendererText (); col.PackStart (crt, false); col.SetCellDataFunc (crt, CellDataFuncText); AppendColumn (col); ShowAll (); }