Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
This commit is contained in:
commit
3efc6f0005
File diff suppressed because it is too large
Load Diff
|
@ -21,6 +21,8 @@ using Microsoft.Win32;
|
||||||
using MonoMac.AppKit;
|
using MonoMac.AppKit;
|
||||||
using MonoMac.Foundation;
|
using MonoMac.Foundation;
|
||||||
using MonoMac.ObjCRuntime;
|
using MonoMac.ObjCRuntime;
|
||||||
|
using CommonIO;
|
||||||
|
using MediaBrowser.Server.Implementations.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Mac
|
namespace MediaBrowser.Server.Mac
|
||||||
{
|
{
|
||||||
|
@ -89,7 +91,7 @@ namespace MediaBrowser.Server.Mac
|
||||||
// Allow all https requests
|
// Allow all https requests
|
||||||
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; });
|
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; });
|
||||||
|
|
||||||
var fileSystem = new CommonFileSystem(logManager.GetLogger("FileSystem"), false, true);
|
var fileSystem = new ManagedFileSystem(new PatternsLogger(logManager.GetLogger("FileSystem")), false, true);
|
||||||
|
|
||||||
var nativeApp = new NativeApp();
|
var nativeApp = new NativeApp();
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,7 @@ namespace MediaBrowser.Server.Mac
|
||||||
{
|
{
|
||||||
private NSMenuItem browseMenuItem;
|
private NSMenuItem browseMenuItem;
|
||||||
private NSMenuItem configureMenuItem;
|
private NSMenuItem configureMenuItem;
|
||||||
private NSMenuItem developerMenuItem;
|
|
||||||
private NSMenuItem quitMenuItem;
|
private NSMenuItem quitMenuItem;
|
||||||
private NSMenuItem githubMenuItem;
|
|
||||||
private NSMenuItem apiMenuItem;
|
|
||||||
private NSMenuItem communityMenuItem;
|
private NSMenuItem communityMenuItem;
|
||||||
|
|
||||||
public static MenuBarIcon Instance;
|
public static MenuBarIcon Instance;
|
||||||
|
@ -71,22 +68,6 @@ namespace MediaBrowser.Server.Mac
|
||||||
});
|
});
|
||||||
menu.AddItem (configureMenuItem);
|
menu.AddItem (configureMenuItem);
|
||||||
|
|
||||||
developerMenuItem = new NSMenuItem ("Developer Resources");
|
|
||||||
menu.AddItem (developerMenuItem);
|
|
||||||
|
|
||||||
var developerMenu = new NSMenu ();
|
|
||||||
developerMenuItem.Submenu = developerMenu;
|
|
||||||
|
|
||||||
apiMenuItem = new NSMenuItem ("Api Documentation", "a", delegate {
|
|
||||||
ApiDocs (NSApplication.SharedApplication);
|
|
||||||
});
|
|
||||||
developerMenu.AddItem (apiMenuItem);
|
|
||||||
|
|
||||||
githubMenuItem = new NSMenuItem ("Github", "g", delegate {
|
|
||||||
Github (NSApplication.SharedApplication);
|
|
||||||
});
|
|
||||||
developerMenu.AddItem (githubMenuItem);
|
|
||||||
|
|
||||||
communityMenuItem = new NSMenuItem ("Visit Community", "v", delegate {
|
communityMenuItem = new NSMenuItem ("Visit Community", "v", delegate {
|
||||||
Community (NSApplication.SharedApplication);
|
Community (NSApplication.SharedApplication);
|
||||||
});
|
});
|
||||||
|
@ -120,16 +101,6 @@ namespace MediaBrowser.Server.Mac
|
||||||
BrowserLauncher.OpenWebClient(MainClass.AppHost, Logger);
|
BrowserLauncher.OpenWebClient(MainClass.AppHost, Logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Github(NSObject sender)
|
|
||||||
{
|
|
||||||
BrowserLauncher.OpenGithub(Logger);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ApiDocs(NSObject sender)
|
|
||||||
{
|
|
||||||
BrowserLauncher.OpenSwagger(MainClass.AppHost, Logger);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Terminate()
|
public void Terminate()
|
||||||
{
|
{
|
||||||
NSApplication.SharedApplication.InvokeOnMainThread (() => NSApplication.SharedApplication.Terminate(NSApplication.SharedApplication));
|
NSApplication.SharedApplication.InvokeOnMainThread (() => NSApplication.SharedApplication.Terminate(NSApplication.SharedApplication));
|
||||||
|
@ -167,9 +138,6 @@ namespace MediaBrowser.Server.Mac
|
||||||
|
|
||||||
quitMenuItem.Title = localization.GetLocalizedString("LabelExit");
|
quitMenuItem.Title = localization.GetLocalizedString("LabelExit");
|
||||||
communityMenuItem.Title = localization.GetLocalizedString("LabelVisitCommunity");
|
communityMenuItem.Title = localization.GetLocalizedString("LabelVisitCommunity");
|
||||||
githubMenuItem.Title = localization.GetLocalizedString("LabelGithub");
|
|
||||||
apiMenuItem.Title = localization.GetLocalizedString("LabelApiDocumentation");
|
|
||||||
developerMenuItem.Title = localization.GetLocalizedString("LabelDeveloperResources");
|
|
||||||
browseMenuItem.Title = localization.GetLocalizedString("LabelBrowseLibrary");
|
browseMenuItem.Title = localization.GetLocalizedString("LabelBrowseLibrary");
|
||||||
configureMenuItem.Title = localization.GetLocalizedString("LabelConfigureMediaBrowser");
|
configureMenuItem.Title = localization.GetLocalizedString("LabelConfigureMediaBrowser");
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,14 @@ namespace MediaBrowser.Server.Mac
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual bool SupportsLibraryMonitor
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether this instance can self update.
|
/// Gets a value indicating whether this instance can self update.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user