[banshee] ThickClient: refactor BaseClientWindow



commit 058413c399e518c2008a450f2090b7e612a0a11f
Author: Andrés G. Aragoneses <knocte gmail com>
Date:   Sat Jun 28 15:54:17 2014 +0200

    ThickClient: refactor BaseClientWindow
    
    * No need for a ctor of an abstract class to be public.
    * Remove unneeded 'using' clauses.
    * The ConfigureWindow() method was protected virtual but:
    - Nobody was overriding it.
    - Nobody was calling it.
    So now it can be private and non-virtual, and we can encapsulate
    some logic in it related to window configuration (previously it
    was empty).

 .../Banshee.Gui/BaseClientWindow.cs                |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui/BaseClientWindow.cs 
b/src/Core/Banshee.ThickClient/Banshee.Gui/BaseClientWindow.cs
index a801c2f..51a8a0c 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui/BaseClientWindow.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui/BaseClientWindow.cs
@@ -32,11 +32,9 @@ using Mono.Unix;
 
 using Hyena;
 
-using Banshee.Base;
 using Banshee.ServiceStack;
 using Banshee.MediaEngine;
 using Banshee.Collection;
-using Banshee.Configuration;
 
 namespace Banshee.Gui
 {
@@ -61,15 +59,12 @@ namespace Banshee.Gui
         {
         }
 
-        public BaseClientWindow (string title, WindowConfiguration windowConfiguration) : base (title)
+        protected BaseClientWindow (string title, WindowConfiguration windowConfiguration) : base (title)
         {
             elements_service = ServiceManager.Get<GtkElementsService> ();
             action_service = ServiceManager.Get<InterfaceActionService> ();
 
-            ConfigureWindow ();
-
-            window_controller = new PersistentWindowController (this, windowConfiguration, 
WindowPersistOptions.All);
-            window_controller.Restore ();
+            ConfigureWindow (windowConfiguration);
 
             elements_service.PrimaryWindow = this;
 
@@ -156,8 +151,10 @@ namespace Banshee.Gui
             UpdateTitle ();
         }
 
-        protected virtual void ConfigureWindow ()
+        private void ConfigureWindow (WindowConfiguration windowConfiguration)
         {
+            window_controller = new PersistentWindowController (this, windowConfiguration, 
WindowPersistOptions.All);
+            window_controller.Restore ();
         }
 
         protected override bool OnDeleteEvent (Gdk.Event evnt)


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