banshee r3062 - in trunk/banshee/src/Core: Banshee.Services/Banshee.Library Banshee.ThickClient/Banshee.Collection.Gui



Author: abock
Date: Mon Jan 28 01:58:14 2008
New Revision: 3062
URL: http://svn.gnome.org/viewvc/banshee?rev=3062&view=rev

Log:
Partly fix the importing mess

Modified:
   trunk/banshee/src/Core/Banshee.Services/Banshee.Library/LibraryImportManager.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Library/LibraryImportManager.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Library/LibraryImportManager.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Library/LibraryImportManager.cs	Mon Jan 28 01:58:14 2008
@@ -96,16 +96,17 @@
                 SafeUri uri = new SafeUri (path);
 
                 LibraryTrackInfo track = null;
-                ThreadAssist.ProxyToMain (delegate {
-                    if (LibraryTrackInfo.ContainsUri (uri)) {
-                        IncrementProcessedCount (null);
-                        return;
-                    }
-
-                    TagLib.File file = StreamTagger.ProcessUri (uri);
-                    track = new LibraryTrackInfo ();
-                    StreamTagger.TrackInfoMerge (track, file);
+                
+                /*if (LibraryTrackInfo.ContainsUri (uri)) {
+                    IncrementProcessedCount (null);
+                    return;
+                }*/
+
+                TagLib.File file = StreamTagger.ProcessUri (uri);
+                track = new LibraryTrackInfo ();
+                StreamTagger.TrackInfoMerge (track, file);
 
+                ThreadAssist.ProxyToMain (delegate {
                     track.DateAdded = DateTime.Now;
                     LibraryArtistInfo artist = new LibraryArtistInfo (track.ArtistName);
                     track.ArtistId = artist.DbId;
@@ -116,10 +117,10 @@
                     (ServiceManager.SourceManager.DefaultSource as LibrarySource).Reload ();
 
                 });
+                
                 if (track != null && track.DbId > 0) {
                     IncrementProcessedCount (String.Format ("{0} - {1}", track.DisplayArtistName, track.DisplayTrackTitle));
                 }
-
             } catch (Exception e) {
                 LogError (path, e);
                 IncrementProcessedCount (null);

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs	Mon Jan 28 01:58:14 2008
@@ -93,6 +93,7 @@
             
             first_line_layout.FontDescription.Weight = Pango.Weight.Bold;
             second_line_layout.FontDescription.Size = (int)(second_line_layout.FontDescription.Size * Pango.Scale.Small);
+            second_line_layout.FontDescription.Style = Pango.Style.Italic;
             
             first_line_layout.SetText (album.Title);
             first_line_layout.GetPixelSize (out fl_width, out fl_height);
@@ -109,11 +110,26 @@
                 context.Area, context.Widget, "text",
                 context.Area.X + x, context.Area.Y + y, first_line_layout);
             
-            if (album.ArtistName != null) {
-                Style.PaintLayout (context.Widget.Style, context.Drawable, state, true, 
-                    context.Area, context.Widget, "text",
-                    context.Area.X + x, context.Area.Y + y + fl_height, second_line_layout);
+            if (album.ArtistName == null) {
+                return;
+            }
+            
+            Gdk.GC gc = context.Widget.Style.TextGC (state);
+                
+            if (!state.Equals (StateType.Selected)) {
+                gc = new Gdk.GC (context.Drawable);
+                gc.Copy (context.Widget.Style.TextGC (state));
+                Gdk.Color fgcolor = context.Widget.Style.Foreground (state);
+                Gdk.Color bgcolor = context.Widget.Style.Background (state);
+                gc.RgbFgColor = Hyena.Gui.GtkUtilities.ColorBlend (fgcolor, bgcolor);
+                gc.RgbBgColor = fgcolor;
             }
+            
+            context.Drawable.DrawLayout (gc, context.Area.X + x, context.Area.Y + y + fl_height, second_line_layout);
+            
+            // Style.PaintLayout (context.Widget.Style, context.Drawable, state, true,
+            //    context.Area, context.Widget, "text",
+            //    context.Area.X + x, context.Area.Y + y + fl_height, second_line_layout);
         }
     }
 }



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