[banshee] ThickClient: simplify CompositeTrackSourceContents artistview init



commit a57e7145f8b71fd1d99e44e0e6c23cc4ae00e2a0
Author: Tomasz Maczynski <tmtimon gmail com>
Date:   Fri Aug 9 12:10:39 2013 +0200

    ThickClient: simplify CompositeTrackSourceContents artistview init
    
    Simplify CompositeTrackSourceContents artist view initializations,
    by refactoring 4 "new" allocations into 2, making the code a bit
    more readable.
    
    No change of behaviour in this commit.
    
    Signed-off-by: Andrés G. Aragoneses <knocte gmail com>

 .../CompositeTrackSourceContents.cs                |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/CompositeTrackSourceContents.cs 
b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/CompositeTrackSourceContents.cs
index 658b377..492a546 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/CompositeTrackSourceContents.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/CompositeTrackSourceContents.cs
@@ -231,18 +231,18 @@ namespace Banshee.Sources.Gui
                 genre_view_widget.Parent.Visible = GenreFilterVisible.Get ();
             };
 
+            artist_view = new ArtistListView ();
+            albumartist_view = new ArtistListView ();
             if (ArtistFilterType.Get ().Equals ("artist")) {
-                SetupFilterView (artist_view = new ArtistListView ());
+                SetupFilterView (artist_view);
                 artist_view.Parent.Shown += delegate {
                     artist_view.Parent.Visible = ArtistFilterVisible.Get ();
                 };
-                albumartist_view = new ArtistListView ();
             } else {
-                SetupFilterView (albumartist_view = new ArtistListView ());
+                SetupFilterView (albumartist_view);
                 albumartist_view.Parent.Shown += delegate {
                     albumartist_view.Parent.Visible = ArtistFilterVisible.Get ();
                 };
-                artist_view = new ArtistListView ();
             }
 
             SetupFilterView (year_view = new YearListView ());


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