[banshee] Remove all references to Hyena.PlatformDetection.IsMeeGo



commit f2235091f4cd97b1217f8e064eaf38c3bf157118
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Sat Oct 19 20:40:17 2013 +0200

    Remove all references to Hyena.PlatformDetection.IsMeeGo
    
    PlatformDetection.IsMeeGo is only true if the file /etc/meego-release
    exists, and it is only used for UI customisation that where specific to
    MeeGo, and not useful for the MediaPanel UI.

 .../GConfConfigurationClient.cs                    |    3 -
 src/Clients/Booter/Booter/Entry.cs                 |    6 +-
 src/Clients/Nereid/Nereid/PlayerInterface.cs       |   84 +++----------------
 src/Clients/Nereid/Nereid/ViewContainer.cs         |    5 -
 .../Banshee.Sources.Gui/SourceView.cs              |    4 -
 5 files changed, 15 insertions(+), 87 deletions(-)
---
diff --git a/src/Backends/Banshee.Gnome/Banshee.GnomeBackend/GConfConfigurationClient.cs 
b/src/Backends/Banshee.Gnome/Banshee.GnomeBackend/GConfConfigurationClient.cs
index 72af89f..25bbd21 100644
--- a/src/Backends/Banshee.Gnome/Banshee.GnomeBackend/GConfConfigurationClient.cs
+++ b/src/Backends/Banshee.Gnome/Banshee.GnomeBackend/GConfConfigurationClient.cs
@@ -72,9 +72,6 @@ namespace Banshee.GnomeBackend
 
         public GConfConfigurationClient ()
         {
-            if (Hyena.PlatformDetection.IsMeeGo) {
-                throw new InvalidOperationException ("GConf is not supported on MeeGo");
-            }
         }
 
         private string CreateKey (string @namespace, string part)
diff --git a/src/Clients/Booter/Booter/Entry.cs b/src/Clients/Booter/Booter/Entry.cs
index a003a5e..3157e13 100644
--- a/src/Clients/Booter/Booter/Entry.cs
+++ b/src/Clients/Booter/Booter/Entry.cs
@@ -99,11 +99,7 @@ namespace Booter
             } else if (ApplicationContext.CommandLine.Contains ("client")) {
                 BootClient (Path.GetFileNameWithoutExtension (ApplicationContext.CommandLine["client"]));
             } else {
-                if (PlatformDetection.IsMeeGo) {
-                    BootClient ("MeeGo");
-                } else {
-                    BootClient ("Nereid");
-                }
+                BootClient ("Nereid");
             }
         }
 
diff --git a/src/Clients/Nereid/Nereid/PlayerInterface.cs b/src/Clients/Nereid/Nereid/PlayerInterface.cs
index c5d162c..68b4cd6 100644
--- a/src/Clients/Nereid/Nereid/PlayerInterface.cs
+++ b/src/Clients/Nereid/Nereid/PlayerInterface.cs
@@ -115,9 +115,6 @@ namespace Nereid
             base (Catalog.GetString ("Banshee Media Player"),
                   new WindowConfiguration (WidthSchema, HeightSchema, XPosSchema, YPosSchema, 
MaximizedSchema))
         {
-            // if (PlatformDetection.IsMeeGo) {
-            //     Gdk.Window.AddFilterForAll (OnGdkEventFilter);
-            // }
         }
 
         protected override void Initialize ()
@@ -137,11 +134,6 @@ namespace Nereid
             interface_constructed = true;
             uint timer = Log.DebugTimerStart ();
 
-            if (PlatformDetection.IsMeeGo) {
-                Decorated = false;
-                Maximize ();
-            }
-
             BuildPrimaryLayout ();
             ConnectEvents ();
 
@@ -217,7 +209,7 @@ namespace Nereid
 
             main_menu = new MainMenu ();
 
-            if (!PlatformDetection.IsMac && !PlatformDetection.IsMeeGo) {
+            if (!PlatformDetection.IsMac) {
                 main_menu.Show ();
                 header_table.Attach (main_menu, 0, 1, 0, 1,
                     AttachOptions.Expand | AttachOptions.Fill,
@@ -225,19 +217,14 @@ namespace Nereid
             }
 
             Alignment toolbar_alignment = new Alignment (0.0f, 0.0f, 1.0f, 1.0f);
-            toolbar_alignment.TopPadding = PlatformDetection.IsMeeGo ? 0u : 3u;
-            toolbar_alignment.BottomPadding = PlatformDetection.IsMeeGo ? 0u : 3u;
+            toolbar_alignment.TopPadding = 3u;
+            toolbar_alignment.BottomPadding = 3u;
 
             header_toolbar = (Toolbar)ActionService.UIManager.GetWidget ("/HeaderToolbar");
             header_toolbar.ShowArrow = false;
             header_toolbar.ToolbarStyle = ToolbarStyle.BothHoriz;
             header_toolbar.Show ();
 
-            if (PlatformDetection.IsMeeGo) {
-                header_toolbar.IconSize = IconSize.LargeToolbar;
-                header_toolbar.Name = "meego-toolbar";
-            }
-
             toolbar_alignment.Add (header_toolbar);
             toolbar_alignment.Show ();
 
@@ -245,7 +232,7 @@ namespace Nereid
                 AttachOptions.Expand | AttachOptions.Fill,
                 AttachOptions.Shrink, 0, 0);
 
-            var next_button = new NextButton (ActionService, PlatformDetection.IsMeeGo);
+            var next_button = new NextButton (ActionService);
             next_button.Show ();
             ActionService.PopulateToolbarPlaceholder (header_toolbar, "/HeaderToolbar/NextArrowButton", 
next_button);
 
@@ -263,35 +250,9 @@ namespace Nereid
             track_info_container.Show ();
             ActionService.PopulateToolbarPlaceholder (header_toolbar, "/HeaderToolbar/TrackInfoDisplay", 
track_info_container, true);
 
-            if (PlatformDetection.IsMeeGo) {
-                track_info_display.ArtworkSpacing = 5;
-                seek_slider.LeftPadding = 20;
-                seek_slider.RightPadding = 20;
-
-                var menu = (Menu)(ActionService.UIManager.GetWidget ("/ToolbarMenu"));
-                var menu_button = new Hyena.Widgets.MenuButton (new Image (Stock.Preferences, 
IconSize.LargeToolbar), menu, true);
-                menu_button.Show ();
-                ActionService.PopulateToolbarPlaceholder (header_toolbar, 
"/HeaderToolbar/ToolbarMenuPlaceholder", menu_button);
-
-                var close_button = new Button (Image.NewFromIconName ("window-close", 
IconSize.LargeToolbar)) {
-                    TooltipText = Catalog.GetString ("Close")
-                };
-
-                close_button.Clicked += (o, e) => {
-                    if (ServiceManager.PlayerEngine.IsPlaying () &&
-                       (ServiceManager.PlayerEngine.CurrentState != PlayerState.Paused)  &&
-                        ServiceManager.PlayerEngine.CurrentTrack.HasAttribute 
(TrackMediaAttributes.VideoStream)) {
-                        ServiceManager.PlayerEngine.Pause ();
-                    }
-                    Hide ();
-                };
-                close_button.ShowAll ();
-                ActionService.PopulateToolbarPlaceholder (header_toolbar, "/HeaderToolbar/ClosePlaceholder", 
close_button);
-            } else {
-                var volume_button = new ConnectedVolumeButton ();
-                volume_button.Show ();
-                ActionService.PopulateToolbarPlaceholder (header_toolbar, "/HeaderToolbar/VolumeButton", 
volume_button);
-            }
+            var volume_button = new ConnectedVolumeButton ();
+            volume_button.Show ();
+            ActionService.PopulateToolbarPlaceholder (header_toolbar, "/HeaderToolbar/VolumeButton", 
volume_button);
         }
 
         private void BuildViews ()
@@ -306,29 +267,16 @@ namespace Nereid
             composite_view = new CompositeTrackSourceContents ();
 
             Container source_scroll;
-            if (PlatformDetection.IsMeeGo) {
-                source_scroll = new Gtk.ScrolledWindow () {
-                    HscrollbarPolicy = PolicyType.Never,
-                    VscrollbarPolicy = PolicyType.Automatic,
-                    ShadowType = ShadowType.None
-                };
-                source_scroll.Add (source_view);
-
-                var color = new Gdk.RGBA ();
-                color.Parse ("e6e6e6");
-                source_view.OverrideBackgroundColor (StateFlags.Normal, color);
+            Hyena.Widgets.ScrolledWindow window;
+            if (ApplicationContext.CommandLine.Contains ("smooth-scroll")) {
+                window = new Hyena.Widgets.SmoothScrolledWindow ();
             } else {
-                Hyena.Widgets.ScrolledWindow window;
-                if (ApplicationContext.CommandLine.Contains ("smooth-scroll")) {
-                    window = new Hyena.Widgets.SmoothScrolledWindow ();
-                } else {
-                    window = new Hyena.Widgets.ScrolledWindow ();
-                }
-
-                window.AddWithFrame (source_view);
-                source_scroll = window;
+                window = new Hyena.Widgets.ScrolledWindow ();
             }
 
+            window.AddWithFrame (source_view);
+            source_scroll = window;
+
             composite_view.TrackView.HeaderVisible = false;
             view_container.Content = composite_view;
 
@@ -376,10 +324,6 @@ namespace Nereid
 
         private void BuildFooter ()
         {
-            if (PlatformDetection.IsMeeGo) {
-                return;
-            }
-
             footer_toolbar = new HBox () { BorderWidth = 2 };
 
             task_status = new Banshee.Gui.Widgets.TaskStatusIcon ();
diff --git a/src/Clients/Nereid/Nereid/ViewContainer.cs b/src/Clients/Nereid/Nereid/ViewContainer.cs
index d2affa5..d6fd0be 100644
--- a/src/Clients/Nereid/Nereid/ViewContainer.cs
+++ b/src/Clients/Nereid/Nereid/ViewContainer.cs
@@ -68,11 +68,6 @@ namespace Nereid
                 NoShowAll = true
             };
 
-            if (Hyena.PlatformDetection.IsMeeGo) {
-                source_actions_align.RightPadding = 5;
-                source_actions_align.TopPadding = 5;
-            }
-
             footer = new VBox ();
 
             source_actions_box = new EventBox () { Visible = true };
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs 
b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
index f4e6bb9..0b52d0b 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
@@ -359,10 +359,6 @@ namespace Banshee.Sources.Gui
             }
 
             base.OnDrawn (cr);
-            if (Hyena.PlatformDetection.IsMeeGo) {
-                theme.DrawFrameBorder (cr, new Gdk.Rectangle (0, 0,
-                    Allocation.Width, Allocation.Height));
-            }
             return true;
         }
 


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