Skip to content

Commit

Permalink
Mac: Updated project after changes on other platforms. Added search f…
Browse files Browse the repository at this point in the history
…unctionality to Song Browser.

Related to issue #381.
  • Loading branch information
ycastonguay committed Aug 26, 2013
1 parent fb6b98f commit be634db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion MPfm/MPfm.Mac/Windows/Controllers/MainWindowController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public override void WindowDidLoad()
btnTabActions.OnTabButtonSelected += HandleOnTabButtonSelected;

NSNotificationCenter.DefaultCenter.AddObserver(new NSString("NSOutlineViewItemDidExpandNotification"), ItemDidExpand, outlineLibraryBrowser);
NSNotificationCenter.DefaultCenter.AddObserver(new NSString("NSControlTextDidChangeNotification"), SearchTextDidChange, searchSongBrowser);

OnViewReady.Invoke(this);
}
Expand Down Expand Up @@ -547,6 +548,12 @@ partial void actionContextualMenuPlay(NSObject sender)
{
}

[Export ("controlTextDidChange")]
private void SearchTextDidChange(NSNotification notification)
{
OnSearchTerms(searchSongBrowser.StringValue);
}

[Export ("numberOfRowsInTableView:")]
public int GetRowCount(NSTableView tableView)
{
Expand Down Expand Up @@ -753,7 +760,8 @@ public void PlayerError(Exception ex)
#region ISongBrowserView implementation

public Action<AudioFile> OnTableRowDoubleClicked { get; set; }
public Action<AudioFile> OnSongBrowserEditSongMetadata { get; set; }
public Action<AudioFile> OnSongBrowserEditSongMetadata { get; set; }
public Action<string> OnSearchTerms { get; set; }

public void RefreshSongBrowser(IEnumerable<AudioFile> audioFiles)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ partial void btnSaveLog_Click(NSObject sender)

public Action<UpdateLibraryMode, List<string>, string> OnStartUpdateLibrary { get; set; }
public Action OnCancelUpdateLibrary { get; set; }
public Action<string> OnSaveLog { get; set; }

public void RefreshStatus(UpdateLibraryEntity entity)
{
Expand Down

0 comments on commit be634db

Please sign in to comment.