gnome-scan r820 - in trunk: . lib



Author: bersace
Date: Tue Feb  3 19:26:53 2009
New Revision: 820
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=820&view=rev

Log:
Avoid duplicated item in OptionEnum

Modified:
   trunk/ChangeLog
   trunk/lib/gnome-scan-option.vala

Modified: trunk/lib/gnome-scan-option.vala
==============================================================================
--- trunk/lib/gnome-scan-option.vala	(original)
+++ trunk/lib/gnome-scan-option.vala	Tue Feb  3 19:26:53 2009
@@ -197,6 +197,10 @@
 
 		public virtual void append(Gnome.Scan.EnumValue? value)
 		{
+			foreach(weak Gnome.Scan.EnumValue? val in _values)
+				if (val.label == value.label)
+					return;
+
 			_values.append(value);
 		}
 	}



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