public ExtensionEditorWidget()
		{
			this.Build();
			
			pixAddin = ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Addin, IconSize.Menu);
			pixLocalAddin = ImageService.GetPixbuf ("md-addinauthoring-current-addin", IconSize.Menu);
			pixExtensionPoint = ImageService.GetPixbuf ("md-extension-point", IconSize.Menu);
			pixExtensionNode = ImageService.GetPixbuf ("md-extension-node", IconSize.Menu);
			
			store = new TreeStore (typeof(string), typeof(string), typeof(Extension), typeof(ExtensionNodeDescription), typeof(Gdk.Pixbuf), typeof(bool), typeof(ExtensionPoint));
			state = new TreeViewState (tree, 0);

			TreeViewColumn col = new TreeViewColumn ();
			CellRendererPixbuf cpix = new CellRendererPixbuf ();
			col.PackStart (cpix, false);
			col.AddAttribute (cpix, "pixbuf", ColIcon);
			col.AddAttribute (cpix, "visible", ColShowIcon);
			
			CellRendererExtension crt = new CellRendererExtension ();
			crt.Yalign = 0;
			col.PackStart (crt, true);
			col.AddAttribute (crt, "markup", ColLabel);
			
			tree.AppendColumn (col);
			tree.Model = store;
			tree.HeadersVisible = false;
			
			tree.Selection.Changed += OnSelectionChanged;
			
			IdeApp.ProjectOperations.EndBuild += OnEndBuild;
		}
		public ExceptionsDialog()
		{
			this.Build();

			storeExceptions = new ListStore (typeof(String));
			treeExceptions.Selection.Mode = SelectionMode.Multiple;
			treeExceptions.Model = storeExceptions;
			treeExceptions.AppendColumn ("", new CellRendererText (), "text", 0);
			tstateExc = new TreeViewState (treeExceptions, 0);
			storeExceptions.SetSortColumnId (0, SortType.Ascending);

			storeSelection = new ListStore (typeof(String));
			treeSelected.Selection.Mode = SelectionMode.Multiple;
			treeSelected.Model = storeSelection;
			treeSelected.AppendColumn ("", new CellRendererText (), "text", 0);
			tstateSel = new TreeViewState (treeSelected, 0);
			storeSelection.SetSortColumnId (0, SortType.Ascending);
			
			foreach (Catchpoint cp in DebuggingService.Breakpoints.GetCatchpoints ())
				selectedClasses.Add (cp.ExceptionName);
			
			LoadExceptions ();

			FillSelection ();
			FillExceptions ();
		}
		public AttachToProcessDialog()
		{
			this.Build();

			store = new Gtk.ListStore (typeof(ProcessInfo), typeof(string), typeof(string));
			tree.Model = store;
			tree.AppendColumn ("PID", new Gtk.CellRendererText (), "text", 1);
			tree.AppendColumn (GettextCatalog.GetString ("Process Name"), new Gtk.CellRendererText (), "text", 2);
			tree.RowActivated += OnRowActivated;

			state = new TreeViewState (tree, 1);

			Refresh ();

			comboDebs.Sensitive = false;
			buttonOk.Sensitive = false;
			tree.Selection.UnselectAll ();
			tree.Selection.Changed += OnSelectionChanged;

			Gtk.TreeIter it;
			if (store.GetIterFirst (out it))
				tree.Selection.SelectIter (it);

			timeoutHandler = GLib.Timeout.Add (3000, Refresh);
		}
		void Fill ()
		{
			TreeViewState tvs = new TreeViewState (list, 0);
			tvs.Save ();
			store.Clear ();
			foreach (var s in stashes)
				store.AppendValues (s, s.DateTime.LocalDateTime.ToString (), s.Comment);
			tvs.Load ();
		}
		void FillBranches ()
		{
			TreeViewState state = new TreeViewState (listBranches, 3);
			state.Save ();
			storeBranches.Clear ();
			string currentBranch = repo.GetCurrentBranch ();
			foreach (Branch branch in repo.GetBranches ()) {
				string text = branch.Name == currentBranch ? "<b>" + branch.Name + "</b>" : branch.Name;
				storeBranches.AppendValues (branch, text, branch.Tracking, branch.Name);
			}
			state.Load ();
		}
Beispiel #6
0
		public ThreadsPad ()
		{
			this.ShadowType = ShadowType.None;

			store = new TreeStore (typeof(string), typeof (string), typeof(string), typeof(object), typeof(int), typeof(string));

			tree = new PadTreeView (store);
			tree.RulesHint = true;
			tree.HeadersVisible = true;
			treeViewState = new TreeViewState (tree, (int)Columns.Object);
			
			TreeViewColumn col = new TreeViewColumn ();
			CellRenderer crp = new CellRendererImage ();
			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 SelectRepositoryDialog (string selection)
		{
			this.Build();
			
			store = new ListStore (typeof(string), typeof(string), typeof(RegistryInfo));
			tree.AppendColumn (AddinManager.CurrentLocalizer.GetString ("Application"), new CellRendererText (), "text", 0);
			tree.AppendColumn (AddinManager.CurrentLocalizer.GetString ("Description"), new CellRendererText (), "text", 1);
			tree.Model = store;
			state = new TreeViewState (tree, 0);
			
			Fill (selection);
			
			tree.Selection.Changed += delegate {
				UpdateButtons ();
			};
		}
		void Fill ()
		{
			var tvs = new TreeViewState (list, 0);
			tvs.Save ();
			store.Clear ();
			foreach (var s in stashes) {
				string name = s.FriendlyName;
				string branch = GitRepository.GetStashBranchName (name);
				if (branch != null) {
					if (branch == "_tmp_")
						name = GettextCatalog.GetString ("Temporary stash created by {0}", BrandingService.ApplicationName);
					else
						name = GettextCatalog.GetString ("Local changes of branch '{0}'", branch);
				}
				store.AppendValues (s, s.Index.Author.When.LocalDateTime.ToString (), name);
			}
			tvs.Load ();
		}
		void Fill ()
		{
			TreeViewState tvs = new TreeViewState (list, 0);
			tvs.Save ();
			store.Clear ();
			foreach (var s in stashes) {
				string name = s.Comment;
				string branch = GitRepository.GetStashBranchName (name);
				if (branch != null) {
					if (branch == "_tmp_")
						name = GettextCatalog.GetString ("Temporary stash created by MonoDevelop");
					else
						name = GettextCatalog.GetString ("Local changes of branch '{0}'", branch);
				}
				store.AppendValues (s, s.DateTime.LocalDateTime.ToString (), name);
			}
			tvs.Load ();
		}
		void FillRemotes ()
		{
			TreeViewState state = new TreeViewState (treeRemotes, 4);
			state.Save ();
			storeRemotes.Clear ();
			string currentRemote = repo.GetCurrentRemote ();
			foreach (RemoteSource remote in repo.GetRemotes ()) {
				string text = remote.Name == currentRemote ? "<b>" + remote.Name + "</b>" : remote.Name;
				string url;
				if (remote.FetchUrl == remote.PushUrl)
					url = remote.FetchUrl;
				else
					url = remote.FetchUrl + " (fetch)\n" + remote.PushUrl + " (push)";
				TreeIter it = storeRemotes.AppendValues (remote, text, url, null, remote.Name);
				foreach (string branch in repo.GetRemoteBranches (remote.Name))
					storeRemotes.AppendValues (it, null, branch, null, branch, remote.Name + "/" + branch);
			}
			state.Load ();
		}
		public AttachToProcessDialog()
		{
			this.Build();
			
			store = new Gtk.ListStore (typeof(ProcessInfo), typeof(string), typeof(string));
			tree.Model = store;
			tree.AppendColumn ("PID", new Gtk.CellRendererText (), "text", 1);
			tree.AppendColumn ("Process Name", new Gtk.CellRendererText (), "text", 2);
			
			DebuggerEngine[] debEngines = DebuggingService.GetDebuggerEngines ();
			foreach (DebuggerEngine de in debEngines) {
				if ((de.SupportedFeatures & DebuggerFeatures.Attaching) == 0)
					continue;
				try {
					foreach (ProcessInfo pi in de.GetAttachableProcesses ()) {
						List<DebuggerEngine> engs;
						if (!procEngines.TryGetValue (pi.Id, out engs)) {
							engs = new List<DebuggerEngine> ();
							procEngines [pi.Id] = engs;
							procs.Add (pi);
						}
						engs.Add (de);
					}
				} catch (Exception ex) {
					LoggingService.LogError ("Could not get attachablbe processes.", ex);
				}
				comboDebs.AppendText (de.Name);
			}
			
			state = new TreeViewState (tree, 1);
			
			FillList ();
			
			comboDebs.Sensitive = false;
			buttonOk.Sensitive = false;
			tree.Selection.Changed += OnSelectionChanged;
			
			Gtk.TreeIter it;
			if (store.GetIterFirst (out it))
				tree.Selection.SelectIter (it);

			OnSelectionChanged (null, null);
		}
		public ExtensionPointsEditorWidget ()
		{
			this.Build();
			
			store = new ListStore (typeof(ExtensionPoint), typeof(string), typeof(string));
			tree.Model = store;
			
			TreeViewColumn col = new TreeViewColumn ();
			CellRendererPixbuf cpix = new CellRendererPixbuf ();
			cpix.Yalign = 0;
			col.PackStart (cpix, false);
			col.AddAttribute (cpix, "stock-id", 1);
			CellRendererText crt = new CellRendererText ();
			col.PackStart (crt, true);
			col.AddAttribute (crt, "markup", 2);
			tree.AppendColumn (col);
			
			state = new TreeViewState (tree, 2);
			tree.Selection.Changed += OnSelectionChanged;
		}
		public CustomExecutionModeManagerDialog (CommandExecutionContext ctx)
		{
			this.Build ();
			
			this.ctx = ctx;
			
			store = new Gtk.ListStore (typeof(CustomExecutionMode), typeof(string), typeof(string), typeof(string), typeof(string));
			listModes.Model = store;
			
			Gtk.CellRendererText crt = new Gtk.CellRendererText ();
			listModes.AppendColumn (GettextCatalog.GetString ("Name"), crt, "text", 1);
			listModes.AppendColumn (GettextCatalog.GetString ("Execution Mode"), crt, "text", 2);
			listModes.AppendColumn (GettextCatalog.GetString ("Available for"), crt, "text", 3);
			
			listModes.Selection.Changed += delegate {
				UpdateButtons ();
			};
			
			treeState = new TreeViewState (listModes, 4);
			
			Fill ();
		}
Beispiel #14
0
		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 ();
		}
Beispiel #15
0
		protected override void Initialize (IPadWindow window)
		{
			Id = "MonoDevelop.Debugger.BreakpointPad";
			// Toolbar and menu definitions
			
			ActionCommand gotoCmd = new ActionCommand (LocalCommands.GoToFile, GettextCatalog.GetString ("Go to File"));
			ActionCommand propertiesCmd = new ActionCommand (LocalCommands.Properties, GettextCatalog.GetString ("Edit Breakpoint…"), Stock.Properties);
			
			menuSet = new CommandEntrySet ();
			menuSet.Add (propertiesCmd);
			menuSet.Add (gotoCmd);
			menuSet.AddSeparator ();
			menuSet.AddItem (DebugCommands.EnableDisableBreakpoint);
			menuSet.AddItem (DebugCommands.DisableAllBreakpoints);
			menuSet.AddSeparator ();
			menuSet.AddItem (EditCommands.DeleteKey);
			menuSet.AddItem (DebugCommands.ClearAllBreakpoints);
			
			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);
			toolbarSet.AddSeparator ();
			toolbarSet.Add (new CommandEntry (DebugCommands.NewFunctionBreakpoint){ DisplayType = CommandEntryDisplayType.IconAndText });
			toolbarSet.Add (new CommandEntry (DebugCommands.NewCatchpoint){ DisplayType = CommandEntryDisplayType.IconAndText });
			
			// The breakpoint list
			
			store = new TreeStore (typeof(string), typeof (bool), typeof(string), typeof(object), typeof(string), typeof(string), typeof(string), typeof(string));
			SemanticModelAttribute modelAttr = new SemanticModelAttribute ("store__Icon", "store__Selected","store_FileName",
				"store_Breakpoint", "store_Condition", "store_TraceExp", "store_HitCount", "store_LastTrace");
			TypeDescriptor.AddAttributes (store, modelAttr);

			tree = new PadTreeView ();
			tree.Model = store;
			tree.RulesHint = true;
			tree.HeadersVisible = true;
			tree.DoPopupMenu = ShowPopup;
			tree.KeyPressEvent += OnKeyPressEvent;
			tree.Selection.Mode = SelectionMode.Multiple;
			
			treeState = new TreeViewState (tree, (int) Columns.Breakpoint);
							
			TreeViewColumn col = new TreeViewColumn ();
			CellRenderer crp = new CellRendererImage ();
			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 ();
			
			breakpoints = DebuggingService.Breakpoints;
			
			UpdateDisplay ();

			breakpoints.BreakpointAdded += OnBreakpointAdded;
			breakpoints.BreakpointRemoved += OnBreakpointRemoved;
			breakpoints.Changed += OnBreakpointChanged;
			breakpoints.BreakpointUpdated += OnBreakpointUpdated;
			
			DebuggingService.PausedEvent += OnDebuggerStatusCheck;
			DebuggingService.ResumedEvent += OnDebuggerStatusCheck;
			DebuggingService.StoppedEvent += OnDebuggerStatusCheck;
			
			tree.RowActivated += OnRowActivated;
			
			DockItemToolbar toolbar = window.GetToolbar (DockPositionType.Top);
			toolbar.Add (toolbarSet, sw);
			toolbar.ShowAll ();
		}
        private PadTreeView CreateTree(TreeStore store)
        {
            var tree = new PadTreeView ();
            tree.Model = store;
            tree.RulesHint = true;
            tree.HeadersVisible = true;
            tree.DoPopupMenu = ShowPopup;

            treeState = new TreeViewState (tree, (int)Columns.Bookmark);

            TreeViewColumn col = new TreeViewColumn ();
            CellRenderer crp = new CellRendererBookmark ();
            col.PackStart (crp, true);
            col.AddAttribute (crp, "stock-id", (int)Columns.Icon);
            tree.AppendColumn (col);

            col = new TreeViewColumn ();
            CellRenderer crt = tree.TextRenderer;
            col.Title = GettextCatalog.GetString ("Name");
            col.PackStart (crt, true);
            col.AddAttribute (crt, "text", (int)Columns.FileName);
            col.Resizable = true;
            //col.Expand = true;
            col.Alignment = 0.0f;

            tree.AppendColumn (col);
            col = tree.AppendColumn (GettextCatalog.GetString ("Line Number"), crt, "text", (int)Columns.LineNumber);
            col.Resizable = true;

            col = tree.AppendColumn (GettextCatalog.GetString ("Line Content"), crt, "text", (int)Columns.LineContent);
            col.Resizable = true;
            tree.RowActivated += (o, args) => GoToBookmark ();
            return tree;
        }
		void FillTags ()
		{
			TreeViewState state = new TreeViewState (listTags, 1);
			state.Save ();
			storeTags.Clear ();
			foreach (string tag in repo.GetTags ()) {
				storeTags.AppendValues (tag);
			}
			state.Load ();
		}
		public void Fill ()
		{
			TreeViewState s = new TreeViewState (treeView, 1);
			s.Save ();
			store.Clear ();
			
			if (checkShowCats.Active) {
				foreach (CounterCategory cat in App.Service.GetCategories ())
					AppendCategory (cat);
			} else {
				foreach (Counter c in App.Service.GetCounters ()) {
					if (c is TimerCounter)
						AppendCounter (TreeIter.Zero, (TimerCounter) c);
				}
			}
		}
 void FillRemotes()
 {
     TreeViewState state = new TreeViewState (treeRemotes, 4);
     state.Save ();
     storeRemotes.Clear ();
     string currentRemote = repo.GetCurrentRemote ();
     foreach (var remote in repo.GetRemotes ()) {
         string text = remote.Name == currentRemote ? "<b>" + remote.Name + "</b>" : remote.Name;
         string url = remote.Path;
         TreeIter it = storeRemotes.AppendValues (remote, text, url, null, remote.Name);
         foreach (string branch in repo.GetRemoteBranches (remote.Name))
             storeRemotes.AppendValues (it, null, branch, null, branch, remote.Name + "/" + branch);
     }
     state.Load ();
 }
		void FillRemotes ()
		{
			var state = new TreeViewState (treeRemotes, 4);
			state.Save ();
			storeRemotes.Clear ();
			string currentRemote = repo.GetCurrentRemote ();
			foreach (Remote remote in repo.GetRemotes ()) {
				// Take into account fetch/push ref specs.
				string text = remote.Name == currentRemote ? "<b>" + remote.Name + "</b>" : remote.Name;
				string url = remote.Url;
				TreeIter it = storeRemotes.AppendValues (remote, text, url, null, remote.Name);
				foreach (string branch in repo.GetRemoteBranches (remote.Name))
					storeRemotes.AppendValues (it, null, branch, null, branch, remote.Name + "/" + branch);
			}
			state.Load ();
		}