[banter-list] [PATCH] UI : show groupwindow on l-click on trayicon



Show groupwindow on a l-click on trayicon.

Patch attached.

- Johnny

-- 
johnnyjacob.org
Index: Application.cs
===================================================================
--- Application.cs	(revision 217)
+++ Application.cs	(working copy)
@@ -20,6 +20,7 @@
 // **********************************************************************
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Net;
 using System.IO;
@@ -244,7 +245,18 @@
 				return;
 				
 			if (args.Event.Button == 1) {
-				Logger.Debug ("left button clicked");
+				if (groupWindows.Count <= 0) {
+				        GroupWindow gw = new GroupWindow();
+					groupWindows [gw] = gw;
+					gw.DeleteEvent += OnGroupWindowDeleted;
+					gw.ShowAll ();
+				} else {
+				        IDictionaryEnumerator ie = groupWindows.GetEnumerator ();
+					ie.MoveNext();
+					GroupWindow gw = (GroupWindow) ie.Value;
+					gw.Present();
+				}
+				    
 			} else if (args.Event.Button == 3) //right click
    			{
    				// FIXME: Eventually get all these into UIManagerLayout.xml file
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 242)
+++ ChangeLog	(working copy)
@@ -1,3 +1,7 @@
+2007-08-04  Johnny Jacob  <jjohnny novell com>
+
+	* Application.cs : Open/Show GroupWindow on left click on trayicon
+	
 2007-04-24  Calvin Gaisford <calvinrg gmail com> 
 
 	* Utilities.cs, Defines.cs, Avatar.cs, Logger.cs, PreferencesDialog.cs,


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