[banshee] [osx] avoid NRE in BaseClientWindow, enable quit



commit 0f58bedbd811fb175291ee5a785e96acaa61c964
Author: Aaron Bockover <abockover novell com>
Date:   Tue Jan 19 19:25:21 2010 -0500

    [osx] avoid NRE in BaseClientWindow, enable quit
    
    This fixes the crasher for me when quitting from the OS X dock,
    so I've enabled this functionality. Yay.

 .../Banshee.Osx/Banshee.OsxBackend/OsxService.cs   |    5 +----
 .../Banshee.Gui/BaseClientWindow.cs                |    6 ++++--
 2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/Backends/Banshee.Osx/Banshee.OsxBackend/OsxService.cs b/src/Backends/Banshee.Osx/Banshee.OsxBackend/OsxService.cs
index 84351ed..7413bc4 100644
--- a/src/Backends/Banshee.Osx/Banshee.OsxBackend/OsxService.cs
+++ b/src/Backends/Banshee.Osx/Banshee.OsxBackend/OsxService.cs
@@ -131,10 +131,7 @@ namespace Banshee.OsxBackend
 
         private void OnDockQuitActivated (object o, System.EventArgs args)
         {
-            // FIXME: disabled due to issue with intermitant throwing of exception
-            // while quitting via the dock item.. need to figure out where exactly
-            // the issue is..
-            //Banshee.ServiceStack.Application.Shutdown ();
+            Banshee.ServiceStack.Application.Shutdown ();
         }
 
         private void BindMenuBar ()
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui/BaseClientWindow.cs b/src/Core/Banshee.ThickClient/Banshee.Gui/BaseClientWindow.cs
index f83af17..b848be0 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui/BaseClientWindow.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui/BaseClientWindow.cs
@@ -169,8 +169,10 @@ namespace Banshee.Gui
 
         protected override bool OnWindowStateEvent (Gdk.EventWindowState evnt)
         {
-            ToggleAction fullscreen_action = (ToggleAction) ServiceManager.Get<InterfaceActionService> ().ViewActions["FullScreenAction"];
-            fullscreen_action.Active = (evnt.NewWindowState & Gdk.WindowState.Fullscreen) != 0;
+            var action_service = ServiceManager.Get<InterfaceActionService> ();
+            if (action_service != null) {
+                ((ToggleAction)action_service.ViewActions["FullScreenAction"]).Active = (evnt.NewWindowState & Gdk.WindowState.Fullscreen) != 0;
+            }
 
             if ((evnt.NewWindowState & Gdk.WindowState.Withdrawn) == 0) {
                 window_controller.Save ();



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