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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 .../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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]