[libvirt] [PATCH C#] Don't add a column per item in the Mono virConnectOpenAuth example

Matthias Bolte matthias.bolte at googlemail.com
Thu Oct 28 10:38:51 UTC 2010


---
 .../MonoDevelop/virConnectOpenAuth/MainWindow.cs   |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/examples/MonoDevelop/virConnectOpenAuth/MainWindow.cs b/examples/MonoDevelop/virConnectOpenAuth/MainWindow.cs
index d02acd4..4a3411d 100644
--- a/examples/MonoDevelop/virConnectOpenAuth/MainWindow.cs
+++ b/examples/MonoDevelop/virConnectOpenAuth/MainWindow.cs
@@ -36,6 +36,10 @@ public partial class MainWindow : Gtk.Window
 		treeview1.AppendColumn(tvcDomains);
 		
 		treeview1.Model = domainListStore;
+
+		CellRendererText crtDomainCell = new CellRendererText();
+		tvcDomains.PackStart(crtDomainCell, true);
+		tvcDomains.AddAttribute(crtDomainCell, "text", 0);
 	}
 
 	protected void OnDeleteEvent (object sender, DeleteEventArgs a)
@@ -137,9 +141,6 @@ public partial class MainWindow : Gtk.Window
 	private void AddDomainInTreeView(string domainName)
 	{
 		domainListStore.AppendValues(domainName);
-		CellRendererText crtDomainCell = new CellRendererText();
-		tvcDomains.PackStart(crtDomainCell, true);
-		tvcDomains.AddAttribute(crtDomainCell, "text", 0);
 	}
 	
     private static int AuthCallback(ref ConnectCredential[] creds, IntPtr cbdata)
-- 
1.7.0.4




More information about the libvir-list mailing list