[banshee] [ThickClient] Clean up SourceView



commit 4b2e33e84d5c42897ba452bdcaa50b0e148f0292
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Fri Oct 8 16:04:08 2010 -0500

    [ThickClient] Clean up SourceView
    
    Change the horizontal separators to header rows, decrease the icon size,
    and hide counts for music and video libraries.

 po/POTFILES.in                                     |    2 +
 .../Banshee.Library/LibrarySource.cs               |    1 +
 .../Banshee.Sources/SourceManager.cs               |    6 +-
 .../Banshee.Sources.Gui/SourceModel.cs             |   36 ++----
 .../Banshee.Sources.Gui/SourceRowRenderer.cs       |  130 +++++++++++++-------
 .../Banshee.Sources.Gui/SourceView.cs              |  106 +++++++++++-----
 src/Dap/Banshee.Dap/Banshee.Dap/DapService.cs      |    2 +-
 .../Banshee.InternetRadio/InternetRadioSource.cs   |    1 +
 .../Banshee.Podcasting.Data/PodcastSource.cs       |    1 +
 9 files changed, 180 insertions(+), 105 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 57fed0d..dc775e8 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -85,6 +85,7 @@ src/Core/Banshee.Services/Banshee.Sources/DurationStatusFormatters.cs
 src/Core/Banshee.Services/Banshee.Sources/ErrorSource.cs
 src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs
 src/Core/Banshee.Services/Banshee.Sources/Source.cs
+src/Core/Banshee.Services/Banshee.Sources/SourceManager.cs
 src/Core/Banshee.Services/Banshee.Streaming/RadioTrackInfo.cs
 src/Core/Banshee.Services/Banshee.Web/Browser.cs
 src/Core/Banshee.ThickClient/Banshee.Addins.Gui/AddinView.cs
@@ -154,6 +155,7 @@ src/Core/Banshee.Widgets/Banshee.Widgets/VolumeButton.cs
 src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
 src/Dap/Banshee.Dap/Banshee.Dap.addin.xml
 src/Dap/Banshee.Dap/Banshee.Dap/DapLibrarySync.cs
+src/Dap/Banshee.Dap/Banshee.Dap/DapService.cs
 src/Dap/Banshee.Dap/Banshee.Dap/DapSource.cs
 src/Dap/Banshee.Dap/Banshee.Dap/DapSync.cs
 src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapActions.cs
diff --git a/src/Core/Banshee.Services/Banshee.Library/LibrarySource.cs b/src/Core/Banshee.Services/Banshee.Library/LibrarySource.cs
index 4f573c0..6298b2f 100644
--- a/src/Core/Banshee.Services/Banshee.Library/LibrarySource.cs
+++ b/src/Core/Banshee.Services/Banshee.Library/LibrarySource.cs
@@ -56,6 +56,7 @@ namespace Banshee.Library
         {
             Properties.SetString ("GtkActionPath", "/LibraryContextMenu");
             Properties.SetString ("RemoveTracksActionLabel", Catalog.GetString ("Remove From Library"));
+            Properties.Set<bool> ("SourceView.HideCount", true);
             IsLocal = true;
             base_dir_schema = CreateSchema<string> ("library-location", null, "The base directory under which files for this library are stored", null);
             AfterInitialized ();
diff --git a/src/Core/Banshee.Services/Banshee.Sources/SourceManager.cs b/src/Core/Banshee.Services/Banshee.Sources/SourceManager.cs
index 542c43f..d50210c 100644
--- a/src/Core/Banshee.Services/Banshee.Sources/SourceManager.cs
+++ b/src/Core/Banshee.Services/Banshee.Sources/SourceManager.cs
@@ -29,6 +29,7 @@
 using System;
 using System.Collections.Generic;
 
+using Mono.Unix;
 using Mono.Addins;
 
 using Hyena;
@@ -80,9 +81,8 @@ namespace Banshee.Sources
             // things that depend on being loaded before the music library is added.
             //AddSource (music_library = new MusicLibrarySource (), true);
             //AddSource (video_library = new VideoLibrarySource (), false);
-            AddSource (new GroupSource ("Library", 39));
-            AddSource (new GroupSource ("Online Media", 60));
-            //AddSource (new GroupSource ("Devices", 400));
+            AddSource (new GroupSource (Catalog.GetString ("Libraries"), 39));
+            AddSource (new GroupSource (Catalog.GetString ("Online Media"), 60));
         }
 
         internal void LoadExtensionSources ()
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceModel.cs b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceModel.cs
index d9996ed..8c729f9 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceModel.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceModel.cs
@@ -75,7 +75,7 @@ namespace Banshee.Sources.Gui
 
         protected SourceModel (IntPtr ptr) : base (ptr) {}
 
-        public SourceModel () : base (typeof (Source), typeof (int), typeof (bool))
+        public SourceModel () : base (typeof (Source), typeof (int), typeof (EntryType))
         {
             SetSortColumnId (1, SortType.Ascending);
             ChangeSortColumn ();
@@ -182,28 +182,6 @@ namespace Banshee.Sources.Gui
             } while (IterNext (ref iter));
         }
 
-        /*private void AddRowSeparator (int order)
-        {
-            TreeIter iter = InsertNode (order);
-
-            SetValue (iter, 0, null);
-            SetValue (iter, 1, order);
-            SetValue (iter, 2, true);
-        }
-
-        private void ClearRowSeparators ()
-        {
-            Queue<TreeIter> to_remove = new Queue<TreeIter> ();
-            foreach (TreeIter iter in FindInModel (2, true)) {
-                to_remove.Enqueue (iter);
-            }
-
-            while (to_remove.Count > 0) {
-                TreeIter iter = to_remove.Dequeue ();
-                Remove (ref iter);
-            }
-        }*/
-
 #endregion
 
 
@@ -239,7 +217,7 @@ namespace Banshee.Sources.Gui
 
                 SetValue (iter, 0, source);
                 SetValue (iter, 1, source.Order);
-                SetValue (iter, 2, source is SourceManager.GroupSource);
+                SetValue (iter, 2, source is SourceManager.GroupSource ? EntryType.Group : EntryType.Source);
 
                 lock (source.Children) {
                     foreach (Source child in source.Children) {
@@ -293,5 +271,15 @@ namespace Banshee.Sources.Gui
 
 #endregion
 
+        public enum Columns : int {
+            Source,
+            Order,
+            Type
+        }
+
+        public enum EntryType {
+            Source,
+            Group
+        }
     }
 }
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs
index ea4696c..3faeb3b 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs
@@ -45,12 +45,17 @@ namespace Banshee.Sources.Gui
         public static void CellDataHandler (CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter)
         {
             SourceRowRenderer renderer = cell as SourceRowRenderer;
-            Source source = model.GetValue (iter, 0) as Source;
-
             if (renderer == null) {
                 return;
             }
 
+            var type = (SourceModel.EntryType) model.GetValue (iter, (int)SourceModel.Columns.Type);
+            if (type != SourceModel.EntryType.Source) {
+                renderer.Visible = false;
+                return;
+            }
+
+            Source source = model.GetValue (iter, 0) as Source;
             renderer.Source = source;
             renderer.Iter = iter;
 
@@ -58,6 +63,7 @@ namespace Banshee.Sources.Gui
                 return;
             }
 
+            renderer.Visible = true;
             renderer.Text = source.Name;
             renderer.Sensitive = source.CanActivate;
         }
@@ -82,12 +88,6 @@ namespace Banshee.Sources.Gui
             set { iter = value; }
         }
 
-        private int padding;
-        public int Padding {
-            get { return padding; }
-            set { padding = value; }
-        }
-
         private int row_height = 22;
         public int RowHeight {
             get { return row_height; }
@@ -114,6 +114,12 @@ namespace Banshee.Sources.Gui
             }
         }
 
+        private int Depth {
+            get {
+                return Source.Parent != null ? 1 : 0;
+            }
+        }
+
         public override void GetSize (Widget widget, ref Gdk.Rectangle cell_area,
             out int x_offset, out int y_offset, out int width, out int height)
         {
@@ -130,13 +136,19 @@ namespace Banshee.Sources.Gui
                 width = 0;
             }
 
-            height = (int)Math.Max (RowHeight, text_h) + Padding;
+            height = (int)Math.Max (RowHeight, text_h);
+        }
+
+        private int expander_right_x;
+        public bool InExpander (int x)
+        {
+            return x < expander_right_x;
         }
 
         protected override void Render (Gdk.Drawable drawable, Widget widget, Gdk.Rectangle background_area,
             Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, CellRendererState flags)
         {
-            if (source == null) {
+            if (source == null || source is SourceManager.GroupSource) {
                 return;
             }
 
@@ -150,8 +162,34 @@ namespace Banshee.Sources.Gui
             int count_layout_width = 0, count_layout_height = 0;
             int max_title_layout_width;
 
-            bool hide_counts = source.EnabledCount <= 0;
+            int img_padding = 6;
+            int expander_icon_spacing = 3;
+            int x = cell_area.X;
+            bool np_etc = (source.Order + Depth * 100) < 40;
+            if (!np_etc) {
+                x += Depth * img_padding + (int)Xpad;
+            } else {
+                // Don't indent NowPlaying and Play Queue as much
+                x += Math.Max (0, (int)Xpad - 2);
+            }
+
+            Gdk.GC main_gc = widget.Style.TextGC (state);
+
+            // Draw the expander if the source has children
+            double exp_h = (cell_area.Height - 2.0*Ypad) / 3.2;
+            double exp_w = exp_h * 1.6;
+            if (view != null && view.Cr != null && source.Children.Count > 0) {
+                var r = new Gdk.Rectangle (x, cell_area.Y + (int)((cell_area.Height - exp_h) / 2.0), (int)exp_w, (int)exp_h);
+                view.Theme.DrawArrow (view.Cr, r, source.Expanded ? Math.PI/2.0 : 0.0);
+            }
 
+            if (!np_etc) {
+                x += (int) exp_w;
+                x += 2; // a little spacing after the expander
+                expander_right_x = x;
+            }
+
+            // Draw icon
             Pixbuf icon = SourceIconResolver.ResolveIcon (source, RowHeight);
 
             bool dispose_icon = false;
@@ -170,6 +208,21 @@ namespace Banshee.Sources.Gui
                 icon_source.Dispose ();
             }
 
+            if (icon != null) {
+                x += expander_icon_spacing;
+                drawable.DrawPixbuf (main_gc, icon, 0, 0,
+                    x, Middle (cell_area, icon.Height),
+                    icon.Width, icon.Height, RgbDither.None, 0, 0);
+
+                x += icon.Width;
+
+                if (dispose_icon) {
+                    icon.Dispose ();
+                }
+            }
+
+            // Setup font info for the title/count, and see if we should show the count
+            bool hide_count = source.EnabledCount <= 0 || source.Properties.Get<bool> ("SourceView.HideCount");
             FontDescription fd = widget.PangoContext.FontDescription.Copy ();
             fd.Weight = (ISource)ServiceManager.PlaybackController.NextSource == (ISource)source
                 ? Pango.Weight.Bold
@@ -177,67 +230,54 @@ namespace Banshee.Sources.Gui
 
             if (view != null && source == view.NewPlaylistSource) {
                 fd.Style = Pango.Style.Italic;
-                hide_counts = true;
+                hide_count = true;
             }
 
             Pango.Layout title_layout = new Pango.Layout (widget.PangoContext);
             Pango.Layout count_layout = null;
 
-            if (!hide_counts) {
+            // If we have a count to draw, setup its fonts and see how wide it is to see if we have room
+            if (!hide_count) {
                 count_layout = new Pango.Layout (widget.PangoContext);
                 count_layout.FontDescription = fd;
                 count_layout.SetMarkup (String.Format ("<span size=\"small\">{0}</span>", source.EnabledCount));
                 count_layout.GetPixelSize (out count_layout_width, out count_layout_height);
             }
 
+            // Hide the count if the title has no space
             max_title_layout_width = cell_area.Width - (icon == null ? 0 : icon.Width) - count_layout_width - 10;
-
-            if (!hide_counts && max_title_layout_width < 0) {
-                hide_counts = true;
+            if (!hide_count && max_title_layout_width < 0) {
+                hide_count = true;
             }
 
+            // Draw the source Name
             title_layout.FontDescription = fd;
             title_layout.Width = (int)(max_title_layout_width * Pango.Scale.PangoScale);
             title_layout.Ellipsize = EllipsizeMode.End;
             title_layout.SetText (source.Name);
             title_layout.GetPixelSize (out title_layout_width, out title_layout_height);
 
-            Gdk.GC main_gc = widget.Style.TextGC (state);
-
-            drawable.DrawLayout (main_gc,
-                cell_area.X + (icon == null ? 0 : icon.Width) + 6,
-                Middle (cell_area, title_layout_height),
-                title_layout);
+            x += img_padding;
+            drawable.DrawLayout (main_gc, x, Middle (cell_area, title_layout_height), title_layout);
 
             title_layout.Dispose ();
 
-            if (icon != null) {
-                drawable.DrawPixbuf (main_gc, icon, 0, 0,
-                    cell_area.X, Middle (cell_area, icon.Height),
-                    icon.Width, icon.Height, RgbDither.None, 0, 0);
-
-                if (dispose_icon) {
-                    icon.Dispose ();
+            // Draw the count
+            if (!hide_count) {
+                if (view != null && view.Cr != null) {
+                    view.Cr.Color = state == StateType.Normal || (view != null && state == StateType.Prelight)
+                        ? view.Theme.TextMidColor
+                        : view.Theme.Colors.GetWidgetColor (GtkColorClass.Text, state);
+
+                    view.Cr.MoveTo (
+                        cell_area.X + cell_area.Width - count_layout_width - 2,
+                        cell_area.Y + 0.5 + (double)(cell_area.Height - count_layout_height) / 2.0);
+                    PangoCairoHelper.ShowLayout (view.Cr, count_layout);
                 }
-            }
-
-            if (hide_counts) {
-                fd.Dispose ();
-                return;
-            }
-
-            if (view != null && view.Cr != null) {
-                view.Cr.Color = state == StateType.Normal || (view != null && state == StateType.Prelight)
-                    ? view.Theme.TextMidColor
-                    : view.Theme.Colors.GetWidgetColor (GtkColorClass.Text, state);
 
-                view.Cr.MoveTo (
-                    cell_area.X + cell_area.Width - count_layout_width - 2,
-                    cell_area.Y + 0.5 + (double)(cell_area.Height - count_layout_height) / 2.0);
-                PangoCairoHelper.ShowLayout (view.Cr, count_layout);
+                count_layout.Dispose ();
             }
 
-            count_layout.Dispose ();
             fd.Dispose ();
         }
 
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
index c869034..749c525 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
@@ -54,13 +54,14 @@ namespace Banshee.Sources.Gui
 
     public partial class SourceView : TreeView
     {
-        private SourceRowRenderer renderer;
+        private TreeViewColumn source_column;
+        private SourceRowRenderer source_renderer;
+        private CellRendererText header_renderer;
         private Theme theme;
         private Cairo.Context cr;
 
         private Stage<TreeIter> notify_stage = new Stage<TreeIter> (2000);
 
-        private TreeViewColumn focus_column;
         private TreeIter highlight_iter = TreeIter.Zero;
         private SourceModel store;
         private int current_timeout = -1;
@@ -71,6 +72,7 @@ namespace Banshee.Sources.Gui
 
         public SourceView ()
         {
+            FixedHeightMode = false;
             BuildColumns ();
 
             store = new SourceModel ();
@@ -80,12 +82,13 @@ namespace Banshee.Sources.Gui
             Model = store;
             EnableSearch = false;
 
+            ShowExpanders = false;
+            LevelIndentation = 6;
+
             ConfigureDragAndDrop ();
             store.Refresh ();
             ConnectEvents ();
 
-            RowSeparatorFunc = RowSeparatorHandler;
-
             ResetSelection ();
         }
 
@@ -99,13 +102,48 @@ namespace Banshee.Sources.Gui
             AppendColumn (col);
             ExpanderColumn = col;
 
-            focus_column = new TreeViewColumn ();
-            renderer = new SourceRowRenderer ();
-            renderer.RowHeight = RowHeight.Get ();
-            renderer.Padding = RowPadding.Get ();
-            focus_column.PackStart (renderer, true);
-            focus_column.SetCellDataFunc (renderer, new CellLayoutDataFunc (SourceRowRenderer.CellDataHandler));
-            AppendColumn (focus_column);
+            source_column = new TreeViewColumn ();
+            source_column.Sizing = TreeViewColumnSizing.Autosize;
+
+            uint xpad = 2;
+
+            // Special renderer for header rows; hidden for normal source rows
+            header_renderer = new CellRendererText () {
+                Xpad = xpad,
+                Ypad = 4,
+                Ellipsize = Pango.EllipsizeMode.End,
+                Weight = (int)Pango.Weight.Bold,
+                Variant = Pango.Variant.SmallCaps
+            };
+
+            // Renderer for source rows; hidden for header rows
+            source_renderer = new SourceRowRenderer ();
+            source_renderer.Xpad = xpad;
+
+            source_column.PackStart (header_renderer, true);
+            source_column.SetCellDataFunc (header_renderer, new Gtk.CellLayoutDataFunc ((layout, cell, model, iter) => {
+                var type = (SourceModel.EntryType) model.GetValue (iter, (int)SourceModel.Columns.Type);
+                header_renderer.Visible = type == SourceModel.EntryType.Group;
+                source_renderer.Visible = type == SourceModel.EntryType.Source;
+                if (type == SourceModel.EntryType.Group) {
+                    var source = model.GetValue (iter, (int)SourceModel.Columns.Source) as Source;
+                    header_renderer.Visible = true;
+                    header_renderer.Text = source.Name;
+                } else {
+                    header_renderer.Visible = false;
+                }
+            }));
+
+            int width, height;
+            Gtk.Icon.SizeLookup (IconSize.Menu, out width, out height);
+            source_renderer.RowHeight = RowHeight.Get ();
+            source_renderer.RowHeight = height;
+
+            source_renderer.Ypad = (uint)RowPadding.Get ();
+            source_renderer.Ypad = 2;
+            source_column.PackStart (source_renderer, true);
+            source_column.SetCellDataFunc (source_renderer, new CellLayoutDataFunc (SourceRowRenderer.CellDataHandler));
+            AppendColumn (source_column);
 
             HeadersVisible = false;
         }
@@ -143,7 +181,7 @@ namespace Banshee.Sources.Gui
                 }
 
                 using (var path = store.GetPath (actor.Target) ) {
-                    Gdk.Rectangle rect = GetBackgroundArea (path, focus_column);
+                    Gdk.Rectangle rect = GetBackgroundArea (path, source_column);
                     QueueDrawArea (rect.X, rect.Y, rect.Width, rect.Height);
                 }
                 return true;
@@ -162,6 +200,9 @@ namespace Banshee.Sources.Gui
         {
             base.OnStyleSet (old_style);
             theme = Hyena.Gui.Theming.ThemeEngine.CreateTheme (this);
+
+            var light_text = Hyena.Gui.Theming.GtkTheme.GetCairoTextMidColor (this);
+            header_renderer.Foreground = CairoExtensions.ColorGetHex (light_text, false);
         }
 
         protected override bool OnButtonPressEvent (Gdk.EventButton press)
@@ -180,19 +221,23 @@ namespace Banshee.Sources.Gui
 
             Source source = store.GetSource (path);
 
+            if (source == null || source is SourceManager.GroupSource)
+                return false;
+
             // From F-Spot's SaneTreeView class
-            int expander_size = (int)StyleGetProperty ("expander-size");
-            int horizontal_separator = (int)StyleGetProperty ("horizontal-separator");
-            bool on_expander = press.X <= horizontal_separator * 2 + path.Depth * expander_size;
+            if (source_renderer.InExpander ((int)press.X)) {
+                if (!source.Expanded) {
+                    ExpandRow (path, false);
+                } else {
+                    CollapseRow (path);
+                }
 
-            if (on_expander) {
-                bool ret = base.OnButtonPressEvent (press);
                 // If the active source is a child of this source, and we are about to collapse it, switch
                 // the active source to the parent.
                 if (source == ServiceManager.SourceManager.ActiveSource.Parent && GetRowExpanded (path)) {
                     ServiceManager.SourceManager.SetActiveSource (source);
                 }
-                return ret;
+                return true;
             }
 
             // For Sources that can't be activated, when they're clicked just
@@ -252,8 +297,10 @@ namespace Banshee.Sources.Gui
                 // errors about corrupting the TreeView's internal state.
                 foreach (Source dsource in ServiceManager.SourceManager.Sources) {
                     TreeIter iter = store.FindSource (dsource);
-                    if (!TreeIter.Zero.Equals (iter) && (int)store.GetValue (iter, 1) != dsource.Order) {
-                        store.SetValue (iter, 1, dsource.Order);
+                    if (!TreeIter.Zero.Equals (iter) &&
+                        (int)store.GetValue (iter, (int)SourceModel.Columns.Order) != dsource.Order)
+                    {
+                        store.SetValue (iter, (int)SourceModel.Columns.Order, dsource.Order);
                     }
                 }
                 QueueDraw ();
@@ -307,7 +354,7 @@ namespace Banshee.Sources.Gui
                 return false;
             }
 
-            Source new_source = store.GetValue (iter, 0) as Source;
+            Source new_source = store.GetValue (iter, (int)SourceModel.Columns.Source) as Source;
             if (ServiceManager.SourceManager.ActiveSource == new_source) {
                 return false;
             }
@@ -319,11 +366,6 @@ namespace Banshee.Sources.Gui
             return false;
         }
 
-        private bool RowSeparatorHandler (TreeModel model, TreeIter iter)
-        {
-            return (bool)store.GetValue (iter, 2);
-        }
-
 #endregion
 
 #region Add/Remove Sources / SourceManager interaction
@@ -396,7 +438,7 @@ namespace Banshee.Sources.Gui
                 }
 
                 if (store.IterNChildren (iter) > 0) {
-                    ExpanderColumn = Columns[1];
+                    ExpanderColumn = source_column;
                     return true;
                 }
             }
@@ -413,7 +455,7 @@ namespace Banshee.Sources.Gui
                 return;
             }
 
-            Source source = store.GetValue (iter, 0) as Source;
+            Source source = store.GetValue (iter, (int)SourceModel.Columns.Source) as Source;
             source.Rename (text);
         }
 
@@ -424,11 +466,11 @@ namespace Banshee.Sources.Gui
                 return;
             }
 
-            renderer.Editable = true;
+            source_renderer.Editable = true;
             using (var path = store.GetPath (iter)) {
-                SetCursor (path, focus_column, true);
+                SetCursor (path, source_column, true);
             }
-            renderer.Editable = false;
+            source_renderer.Editable = false;
         }
 
         private void ResetSelection ()
@@ -462,7 +504,7 @@ namespace Banshee.Sources.Gui
                     return null;
                 }
 
-                return store.GetValue (highlight_iter, 0) as Source;
+                return store.GetValue (highlight_iter, (int)SourceModel.Columns.Source) as Source;
             }
         }
 
diff --git a/src/Dap/Banshee.Dap/Banshee.Dap/DapService.cs b/src/Dap/Banshee.Dap/Banshee.Dap/DapService.cs
index 1d6b723..b3bb1e0 100644
--- a/src/Dap/Banshee.Dap/Banshee.Dap/DapService.cs
+++ b/src/Dap/Banshee.Dap/Banshee.Dap/DapService.cs
@@ -60,7 +60,7 @@ namespace Banshee.Dap
             // This group source gives us a seperator for DAPs in the source view.
             // We add it when we get our first dap source, and then remove it when
             //we lose the last one.
-            dap_group = new SourceManager.GroupSource ("Device", 400);
+            dap_group = new SourceManager.GroupSource (Catalog.GetString ("Devices"), 400);
         }
 
         public void Initialize ()
diff --git a/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs b/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs
index cebb545..fa2a59b 100644
--- a/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs
+++ b/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs
@@ -72,6 +72,7 @@ namespace Banshee.InternetRadio
 
             Properties.SetString ("ActiveSourceUIResource", "ActiveSourceUI.xml");
             Properties.Set<bool> ("ActiveSourceUIResourcePropagate", true);
+            Properties.Set<bool> ("SourceView.HideCount", true);
             Properties.Set<System.Reflection.Assembly> ("ActiveSourceUIResource.Assembly", typeof(InternetRadioSource).Assembly);
 
             Properties.SetString ("GtkActionPath", "/InternetRadioContextMenu");
diff --git a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs
index 3b13f0b..18b4274 100644
--- a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs
+++ b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs
@@ -220,6 +220,7 @@ namespace Banshee.Podcasting.Gui
 
             Properties.Set<ISourceContents> ("Nereid.SourceContents", new LazyLoadSourceContents<PodcastSourceContents> ());
             Properties.Set<bool> ("Nereid.SourceContentsPropagate", true);
+            Properties.Set<bool> ("SourceView.HideCount", false);
 
             Properties.SetString ("TrackView.ColumnControllerXml", String.Format (@"
                     <column-controller>



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