Skip to content

Commit

Permalink
Mac: Updated project after changes on other platforms.
Browse files Browse the repository at this point in the history
Related to issue #422.
  • Loading branch information
ycastonguay committed Oct 10, 2013
1 parent 161e37c commit 50e7d31
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions MPfm/MPfm.Mac/Classes/Controls/MPfmButton.cs
Expand Up @@ -54,6 +54,7 @@ public MPfmButton(IntPtr handle) : base (handle)

private void Initialize()
{
//Layer.CornerRadius = 8; // Crashes the app. Bug in MonoMac?
TextColor = GlobalTheme.ButtonTextColor;
BackgroundColor = GlobalTheme.ButtonBackgroundColor;
BackgroundMouseDownColor = GlobalTheme.ButtonBackgroundMouseDownColor;
Expand Down
Expand Up @@ -79,20 +79,20 @@ public NSView GetViewForItem(NSOutlineView outlineView, NSTableColumn tableColum
view.TextField.StringValue = libraryBrowserItem.Entity.Title;

// Check icon
if (libraryBrowserItem.Entity.Type == LibraryBrowserEntityType.AllSongs)
if (libraryBrowserItem.Entity.EntityType == LibraryBrowserEntityType.AllSongs)
{
view.ImageView.Image = ImageResources.images16x16.FirstOrDefault(x => x.Name == "16_icomoon_cabinet");
}
else if (libraryBrowserItem.Entity.Type == LibraryBrowserEntityType.Artists)
else if (libraryBrowserItem.Entity.EntityType == LibraryBrowserEntityType.Artists)
{
view.ImageView.Image = ImageResources.images16x16.FirstOrDefault(x => x.Name == "16_icomoon_users");
}
else if (libraryBrowserItem.Entity.Type == LibraryBrowserEntityType.Album ||
libraryBrowserItem.Entity.Type == LibraryBrowserEntityType.Albums)
else if (libraryBrowserItem.Entity.EntityType == LibraryBrowserEntityType.Album ||
libraryBrowserItem.Entity.EntityType == LibraryBrowserEntityType.Albums)
{
view.ImageView.Image = ImageResources.images16x16.FirstOrDefault(x => x.Name == "16_custom_vinyl");
}
else if (libraryBrowserItem.Entity.Type == LibraryBrowserEntityType.Artist)
else if (libraryBrowserItem.Entity.EntityType == LibraryBrowserEntityType.Artist)
{
view.ImageView.Image = ImageResources.images16x16.FirstOrDefault(x => x.Name == "16_icomoon_user");
}
Expand Down
6 changes: 6 additions & 0 deletions MPfm/MPfm.Mac/Classes/MacSyncDeviceSpecifications.cs
Expand Up @@ -21,6 +21,7 @@
using MPfm.Library.Services;
using MonoMac.Foundation;
using System.IO;
using System.Collections.Generic;

namespace MPfm.Mac
{
Expand Down Expand Up @@ -69,6 +70,11 @@ public string GetMusicFolderPath()
return Environment.GetFolderPath(Environment.SpecialFolder.MyMusic);
}

public List<string> GetRootFolderPaths()
{
return new List<string>();
}

public void ReportNetworkStateChange(NetworkState networkState)
{
if (OnNetworkStateChanged != null)
Expand Down
2 changes: 1 addition & 1 deletion MPfm/MPfm.Mac/Windows/Controllers/MainWindowController.cs
Expand Up @@ -594,7 +594,7 @@ public void ItemDidExpand(NSNotification notification)
{
// Check for dummy nodes
var item = (LibraryBrowserItem)notification.UserInfo["NSObject"];
if (item.SubItems.Count > 0 && item.SubItems[0].Entity.Type == LibraryBrowserEntityType.Dummy)
if (item.SubItems.Count > 0 && item.SubItems[0].Entity.EntityType == LibraryBrowserEntityType.Dummy)
{
IEnumerable<LibraryBrowserEntity> entities = OnTreeNodeExpandable(item.Entity);
//Console.WriteLine("MainWindowController - ItemDidExpand - dummy node - entities.Count: {0}", entities.Count());
Expand Down

0 comments on commit 50e7d31

Please sign in to comment.