nemo r65 - in trunk: gtk gtk-gui uicommon



Author: arj
Date: Thu Jan 10 14:26:19 2008
New Revision: 65
URL: http://svn.gnome.org/viewvc/nemo?rev=65&view=rev

Log:
Don't display all labels double in search popup



Modified:
   trunk/gtk-gui/MainWindow.cs
   trunk/gtk/MainWindow.cs
   trunk/gtk/SearchPopup.cs
   trunk/uicommon/Item.cs

Modified: trunk/gtk-gui/MainWindow.cs
==============================================================================
--- trunk/gtk-gui/MainWindow.cs	(original)
+++ trunk/gtk-gui/MainWindow.cs	Thu Jan 10 14:26:19 2008
@@ -237,14 +237,14 @@
         this.prev_button.UseUnderline = true;
         // Container child prev_button.Gtk.Container+ContainerChild
         Gtk.Alignment w22 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
-        // Container child GtkAlignment.Gtk.Container+ContainerChild
+        // Container child GtkAlignment1.Gtk.Container+ContainerChild
         Gtk.HBox w23 = new Gtk.HBox();
         w23.Spacing = 2;
-        // Container child GtkHBox.Gtk.Container+ContainerChild
+        // Container child GtkHBox1.Gtk.Container+ContainerChild
         Gtk.Image w24 = new Gtk.Image();
         w24.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-go-back", Gtk.IconSize.Menu, 16);
         w23.Add(w24);
-        // Container child GtkHBox.Gtk.Container+ContainerChild
+        // Container child GtkHBox1.Gtk.Container+ContainerChild
         Gtk.Label w26 = new Gtk.Label();
         w26.LabelProp = "";
         w23.Add(w26);
@@ -262,14 +262,14 @@
         this.next_button.UseUnderline = true;
         // Container child next_button.Gtk.Container+ContainerChild
         Gtk.Alignment w31 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
-        // Container child GtkAlignment.Gtk.Container+ContainerChild
+        // Container child GtkAlignment2.Gtk.Container+ContainerChild
         Gtk.HBox w32 = new Gtk.HBox();
         w32.Spacing = 2;
-        // Container child GtkHBox.Gtk.Container+ContainerChild
+        // Container child GtkHBox2.Gtk.Container+ContainerChild
         Gtk.Image w33 = new Gtk.Image();
         w33.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-go-forward", Gtk.IconSize.Menu, 16);
         w32.Add(w33);
-        // Container child GtkHBox.Gtk.Container+ContainerChild
+        // Container child GtkHBox2.Gtk.Container+ContainerChild
         Gtk.Label w35 = new Gtk.Label();
         w35.LabelProp = "";
         w32.Add(w35);

Modified: trunk/gtk/MainWindow.cs
==============================================================================
--- trunk/gtk/MainWindow.cs	(original)
+++ trunk/gtk/MainWindow.cs	Thu Jan 10 14:26:19 2008
@@ -332,8 +332,6 @@
 				item.mime_type = result.first[0];
 			}
 			
-			item.set_file(result.second);
-
 			item.search_func = do_search;
 
 			items.Add(item);

Modified: trunk/gtk/SearchPopup.cs
==============================================================================
--- trunk/gtk/SearchPopup.cs	(original)
+++ trunk/gtk/SearchPopup.cs	Thu Jan 10 14:26:19 2008
@@ -301,7 +301,10 @@
 
 			label_links.PackStart(bubbles, false, false, 0);
 
-			item.on_labels_callback = delegate() {  
+			item.on_labels_callback = delegate() {
+				foreach (Widget w in bubbles)
+					w.Destroy();
+			
 				foreach (UserLabel label in item.labels)
 					bubbles.Add(label.dot());
 					

Modified: trunk/uicommon/Item.cs
==============================================================================
--- trunk/uicommon/Item.cs	(original)
+++ trunk/uicommon/Item.cs	Thu Jan 10 14:26:19 2008
@@ -101,24 +101,6 @@
 			display_item.set_labels();
 		}
 
-		public void set_file(File file)
-		{
-			this.file = file;
-
-			if (file.labels == null) {
-				System.Console.WriteLine("path {0} not found in metadata store!", path);
-				return;
-			}
-
-			foreach (MetaLabel label in file.labels)
-				labels.Add(new UserLabel(label));
-
-			display_item.set_labels();
-
-			if (on_labels_callback != null)
-				on_labels_callback();
-		}
-
 		private void setup(string path)
 		{
 			// internal variables



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