mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 13:23:24 -07:00
Rename system tray to menu bar on MacOS
This commit is contained in:
parent
4d241fac48
commit
451feda86b
4 changed files with 10 additions and 7 deletions
|
@ -7,7 +7,7 @@
|
|||
* Python 2 is still supported for the time being, but it is recommended to upgrade to Python 3.
|
||||
* UI:
|
||||
* New: Windows and MacOS setting to enable Tautulli to start automatically when you login.
|
||||
* New: Added system tray icon for MacOS.
|
||||
* New: Added menu bar icon for MacOS.
|
||||
* New: Ability to import a Tautulli database in the settings.
|
||||
* New: Added Tautulli news area on the settings page.
|
||||
* Other:
|
||||
|
|
|
@ -262,11 +262,11 @@ def main():
|
|||
import Foundation
|
||||
except ImportError:
|
||||
logger.warn("The pyobjc module is missing. Install this "
|
||||
"module to enable the system tray icon.")
|
||||
"module to enable the menu bar icon.")
|
||||
plexpy.CONFIG.SYS_TRAY_ICON = False
|
||||
|
||||
if plexpy.CONFIG.SYS_TRAY_ICON and macos.has_rumps:
|
||||
# MacOS system tray icon must be run on the main thread and is blocking
|
||||
# MacOS menu bar icon must be run on the main thread and is blocking
|
||||
# Start the rest of Tautulli on a new thread
|
||||
threading.Thread(target=wait).start()
|
||||
plexpy.MAC_SYS_TRAY_ICON = macos.MacOSSystemTray()
|
||||
|
|
|
@ -458,11 +458,14 @@
|
|||
|
||||
<p class="help-block">Note: Web interface changes require a restart.</p>
|
||||
% if common.PLATFORM in ('Windows', 'Darwin'):
|
||||
<%
|
||||
tray = {'Windows': 'System Tray', 'Darwin': 'Menu Bar'}
|
||||
%>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" class="http-settings" name="sys_tray_icon" id="sys_tray_icon" value="1" ${config['sys_tray_icon']}> Enable System Tray Icon
|
||||
<input type="checkbox" class="http-settings" name="sys_tray_icon" id="sys_tray_icon" value="1" ${config['sys_tray_icon']}> Enable ${tray[common.PLATFORM]} Icon
|
||||
</label>
|
||||
<p class="help-block">Show Tautulli shortcut in the system tray.</p>
|
||||
<p class="help-block">Show Tautulli shortcut in the ${tray[common.PLATFORM].lower()}.</p>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
|
|
|
@ -64,11 +64,11 @@ class MacOSSystemTray(object):
|
|||
self.tray_icon = rumps.App(common.PRODUCT, icon=self.icon, menu=self.menu, quit_button=None)
|
||||
|
||||
def start(self):
|
||||
logger.info("Launching MacOS system tray icon.")
|
||||
logger.info("Launching MacOS menu bar icon.")
|
||||
try:
|
||||
self.tray_icon.run()
|
||||
except Exception as e:
|
||||
logger.error("Unable to launch system tray icon: %s." % e)
|
||||
logger.error("Unable to launch menu bar icon: %s." % e)
|
||||
|
||||
def shutdown(self):
|
||||
rumps.quit_application()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue