Commit ac39a256 authored by Marvin Scholz's avatar Marvin Scholz

macosx: More translations improvements for VLCStatusBarIcon

parent cdffc0fe
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10102" systemVersion="15D21" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9532" systemVersion="14F27" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment identifier="macosx"/>
<development version="7000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10102"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9532"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="VLCStatusBarIcon">
<connections>
<outlet property="nextItem" destination="GhQ-VQ-jtu" id="45X-b4-mHv"/>
<outlet property="playPauseItem" destination="9kC-yJ-Gy5" id="laU-MV-Il1"/>
<outlet property="prevItem" destination="iHu-rd-8KL" id="IzO-1Q-rtv"/>
<outlet property="quitItem" destination="539" id="xuy-Vl-Ami"/>
<outlet property="randItem" destination="lPi-EL-hoN" id="dOE-ib-n98"/>
<outlet property="showMainWindowItem" destination="08C-TA-yqu" id="qQR-Ah-T0b"/>
<outlet property="stopItem" destination="4Sh-MJ-bSf" id="qBc-qg-d9R"/>
<outlet property="vlcStatusBarIconMenu" destination="534" id="O0F-8Q-FgA"/>
</connections>
</customObject>
......@@ -16,7 +23,7 @@
<customObject id="420" customClass="NSFontManager"/>
<menu id="534" userLabel="vlcStatusBarIconMenu">
<items>
<menuItem title="Show Main WIndow" toolTip="Restore main window" id="08C-TA-yqu">
<menuItem title="Show Main Window" toolTip="Restore main window" id="08C-TA-yqu">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="restoreMainWindow:" target="-2" id="2Uq-Pa-toi"/>
......
......@@ -46,6 +46,14 @@
{
NSMenuItem *_vlcStatusBarMenuItem;
IBOutlet NSMenuItem *showMainWindowItem;
IBOutlet NSMenuItem *playPauseItem;
IBOutlet NSMenuItem *stopItem;
IBOutlet NSMenuItem *nextItem;
IBOutlet NSMenuItem *prevItem;
IBOutlet NSMenuItem *randItem;
IBOutlet NSMenuItem *quitItem;
NSString *_nameToDisplay;
NSString *_timeToDisplay;
NSString *_durationToDisplay;
......@@ -77,6 +85,15 @@
[self enableMenuIcon];
// Populate menu items with localized strings
[showMainWindowItem setTitle:_NS("Show Main Window")];
[playPauseItem setTitle:_NS("Play")];
[stopItem setTitle:_NS("Stop")];
[nextItem setTitle:_NS("Next")];
[prevItem setTitle:_NS("Previous")];
[randItem setTitle:_NS("Random")];
[quitItem setTitle:_NS("Quit")];
// add the top menu item for dynamic data
_vlcStatusBarMenuItem = [[NSMenuItem alloc] initWithTitle:_NS("URL/Path Options") action:@selector(updateMenuItemContent:) keyEquivalent:@""];
......@@ -179,6 +196,7 @@
// Make sure the b/w statusItem icon is inverted on dark/light mode
menuIcon.template = YES;
[_statusItem setImage:menuIcon];
[_statusItem setLength:24];
// Attach pull-down menu
[_statusItem setMenu:_vlcStatusBarIconMenu];
......@@ -262,10 +280,10 @@
} else {
if ([_urlToDisplay hasPrefix:@"file://"]) {
// offer to show 'file://' in finder
menuString = [NSString stringWithString:_NS("Select File In Finder")];
menuString = _NS("Select File In Finder");
} else {
// offer to copy URL to clipboard
menuString = [NSString stringWithString:_NS("Copy URL to clipboard")];
menuString = _NS("Copy URL to clipboard");
}
}
......@@ -311,14 +329,12 @@
//
- (void)updateMenuItemPlayPause
{
NSMenuItem* menuItemToChange = [_vlcStatusBarIconMenu itemWithTag:playPauseMenuItemTag];
if ([self vlcPlayingStatus] == PLAYLIST_RUNNING) {
[menuItemToChange setTitle:_NS("Pause")];
[menuItemToChange setImage:_menuImagePause];
[playPauseItem setTitle:_NS("Pause")];
[playPauseItem setImage:_menuImagePause];
} else {
[menuItemToChange setTitle:_NS("Play")];
[menuItemToChange setImage:_menuImagePlay];
[playPauseItem setTitle:_NS("Play")];
[playPauseItem setImage:_menuImagePlay];
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment