[banshee] [Nereid] Add a few Moblin/OSX specific tweaks



commit 869cae1b5d0ba5f817ac458ff65870460ba9bc56
Author: Aaron Bockover <abockover novell com>
Date:   Sun Feb 7 13:14:25 2010 -0500

    [Nereid] Add a few Moblin/OSX specific tweaks
    
    On Moblin, don't override the toolbar's expose event, since
    we actually want the toolbar to be painted as a toolbar.
    
    On OS X, don't show/attach the main menu, since it will be
    proxied to the global menu bar.

 src/Clients/Nereid/Nereid/PlayerInterface.cs |   32 +++++++++++--------------
 1 files changed, 14 insertions(+), 18 deletions(-)
---
diff --git a/src/Clients/Nereid/Nereid/PlayerInterface.cs b/src/Clients/Nereid/Nereid/PlayerInterface.cs
index 85a814c..86dd915 100644
--- a/src/Clients/Nereid/Nereid/PlayerInterface.cs
+++ b/src/Clients/Nereid/Nereid/PlayerInterface.cs
@@ -141,11 +141,13 @@ namespace Nereid
             primary_vbox.PackStart (header_table, false, false, 0);
 
             main_menu = new MainMenu ();
-            main_menu.Show ();
 
-            header_table.Attach (main_menu, 0, 1, 0, 1,
-                AttachOptions.Expand | AttachOptions.Fill,
-                AttachOptions.Shrink, 0, 0);
+            if (!PlatformDetection.IsMac) {
+                main_menu.Show ();
+                header_table.Attach (main_menu, 0, 1, 0, 1,
+                    AttachOptions.Expand | AttachOptions.Fill,
+                    AttachOptions.Shrink, 0, 0);
+            }
 
             Alignment toolbar_alignment = new Alignment (0.0f, 0.0f, 1.0f, 1.0f);
             toolbar_alignment.TopPadding = 3;
@@ -176,9 +178,11 @@ namespace Nereid
             editable.Show ();
             ActionService.PopulateToolbarPlaceholder (header_toolbar, "/HeaderToolbar/TrackInfoDisplay", editable, true);
 
-            ConnectedVolumeButton volume_button = new ConnectedVolumeButton ();
-            volume_button.Show ();
-            ActionService.PopulateToolbarPlaceholder (header_toolbar, "/HeaderToolbar/VolumeButton", volume_button);
+            if (!PlatformDetection.IsMoblin) {
+                var volume_button = new ConnectedVolumeButton ();
+                volume_button.Show ();
+                ActionService.PopulateToolbarPlaceholder (header_toolbar, "/HeaderToolbar/VolumeButton", volume_button);
+            }
         }
 
         private void BuildViews ()
@@ -320,17 +324,9 @@ namespace Nereid
                 }
             };
 
-            header_toolbar.ExposeEvent += OnToolbarExposeEvent;
-        }
-
-        // Hack method for the Moblin extension to disable the custom
-        // theme overriding of the header toolbar rendering; we should
-        // probably just do away with it altogether, but it needs
-        // further evaluation.
-
-        public void DisableHeaderToolbarExposeEvent ()
-        {
-            header_toolbar.ExposeEvent -= OnToolbarExposeEvent;
+            if (!PlatformDetection.IsMoblin) {
+                header_toolbar.ExposeEvent += OnToolbarExposeEvent;
+            }
         }
 
 #endregion



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