[vlc-devel] [vlc-commits] macosx/time selection panel: cosmetics

David Fuhrmann david.fuhrmann at gmail.com
Mon Sep 2 23:16:43 CEST 2019



> Am 02.09.2019 um 11:57 schrieb Felix Paul Kühne <git at videolan.org>:
> 
> vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Fri Aug 30 16:14:09 2019 +0200| [adeafd1ad04c3076d7e759b46ae077a13e80afc7] | committer: Felix Paul Kühne
> 
> macosx/time selection panel: cosmetics
> 
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=adeafd1ad04c3076d7e759b46ae077a13e80afc7
> ---
> 
> modules/gui/macosx/UI/TimeSelectionPanel.xib          | 19 ++++++++-----------
> modules/gui/macosx/menus/VLCMainMenu.m                |  4 +++-
> .../macosx/panels/VLCTimeSelectionPanelController.m   |  7 +------
> .../panels/dialogs/VLCCustomCropArWindowController.m  |  2 +-
> 4 files changed, 13 insertions(+), 19 deletions(-)
> 
> diff --git a/modules/gui/macosx/UI/TimeSelectionPanel.xib b/modules/gui/macosx/UI/TimeSelectionPanel.xib
> index b80e70e18f..42f8081c3e 100644
> --- a/modules/gui/macosx/UI/TimeSelectionPanel.xib
> +++ b/modules/gui/macosx/UI/TimeSelectionPanel.xib
> @@ -1,8 +1,8 @@
> <?xml version="1.0" encoding="UTF-8"?>
> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14109" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
>     <dependencies>
>         <deployment identifier="macosx"/>
> -        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14109"/>
> +        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
>         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
>     </dependencies>
>     <objects>
> @@ -11,12 +11,9 @@
>                 <outlet property="cancelButton" destination="C7h-06-Udn" id="vms-H9-Fs6"/>
>                 <outlet property="goToLabel" destination="bB6-Le-Ilg" id="Psy-fF-eTf"/>
>                 <outlet property="hoursLabel" destination="nrO-yt-AnE" id="twB-pr-AtL"/>
> -                <outlet property="hoursTextField" destination="KFt-K5-ogc" id="kqo-Bi-bkG"/>
>                 <outlet property="minsLabel" destination="jTf-bH-u7w" id="e6b-gc-MHz"/>
> -                <outlet property="minsTextField" destination="Smg-Kh-Pjv" id="W3E-YA-Glh"/>
>                 <outlet property="okButton" destination="zrN-B3-Ede" id="TzS-HN-YE3"/>
>                 <outlet property="secsLabel" destination="oMI-0n-rej" id="Heh-nH-7Dv"/>
> -                <outlet property="secsTextField" destination="ovY-qj-fWV" id="hop-7A-B3h"/>
>                 <outlet property="window" destination="Fqe-af-Tt9" id="u4H-rX-p0W"/>
>             </connections>
>         </customObject>
> @@ -26,7 +23,7 @@
>             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
>             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
>             <rect key="contentRect" x="429" y="553" width="265" height="110"/>
> -            <rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/>
> +            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
>             <view key="contentView" id="NrR-3A-NOR">
>                 <rect key="frame" x="0.0" y="0.0" width="265" height="110"/>
>                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
> @@ -43,7 +40,7 @@
>                         <rect key="frame" x="176" y="50" width="33" height="19"/>
>                         <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="right" title="0" drawsBackground="YES" id="qZx-Li-5O2">
>                             <font key="font" metaFont="smallSystem"/>
> -                            <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
> +                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
>                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
>                         </textFieldCell>
>                         <connections>
> @@ -60,7 +57,7 @@
>                         <rect key="frame" x="94" y="50" width="33" height="19"/>
>                         <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="right" title="0" drawsBackground="YES" id="2wj-p0-8uH">
>                             <font key="font" metaFont="smallSystem"/>
> -                            <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
> +                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
>                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
>                         </textFieldCell>
>                         <connections>
> @@ -80,7 +77,7 @@
>                         </constraints>
>                         <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="right" title="0" drawsBackground="YES" id="UWz-WZ-unY">
>                             <font key="font" metaFont="smallSystem"/>
> -                            <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
> +                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
>                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
>                         </textFieldCell>
>                         <connections>
> @@ -142,7 +139,7 @@
>                         </textFieldCell>
>                     </textField>
>                     <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zrN-B3-Ede">
> -                        <rect key="frame" x="208" y="15" width="42" height="28"/>
> +                        <rect key="frame" x="208" y="15" width="42" height="27"/>
>                         <buttonCell key="cell" type="push" title="OK" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="icy-jS-WFH">
>                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
>                             <font key="font" metaFont="smallSystem"/>
> @@ -155,7 +152,7 @@ DQ
>                         </connections>
>                     </button>
>                     <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="C7h-06-Udn">
> -                        <rect key="frame" x="148" y="15" width="62" height="28"/>
> +                        <rect key="frame" x="148" y="15" width="62" height="27"/>
>                         <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" controlSize="small" lineBreakMode="truncatingTail" borderStyle="border" inset="2" id="fXt-nh-exA">
>                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
>                             <font key="font" metaFont="smallSystem"/>
> diff --git a/modules/gui/macosx/menus/VLCMainMenu.m b/modules/gui/macosx/menus/VLCMainMenu.m
> index d869b1a637..4b50934438 100644
> --- a/modules/gui/macosx/menus/VLCMainMenu.m
> +++ b/modules/gui/macosx/menus/VLCMainMenu.m
> @@ -125,7 +125,6 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
> 
> - (void)awakeFromNib
> {
> -    _timeSelectionPanel = [[VLCTimeSelectionPanelController alloc] init];
>     _playlistController = [[VLCMain sharedInstance] playlistController];
>     _playerController = _playlistController.playerController;
> 
> @@ -895,6 +894,9 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
> 
> - (IBAction)goToSpecificTime:(id)sender
> {
> +    if (!_timeSelectionPanel) {
> +        _timeSelectionPanel = [[VLCTimeSelectionPanelController alloc] init];
> +    }
>     vlc_tick_t length = _playerController.length;
>     [_timeSelectionPanel setMaxTime:(int)SEC_FROM_VLC_TICK(length)];
>     vlc_tick_t time = _playerController.time;
> diff --git a/modules/gui/macosx/panels/VLCTimeSelectionPanelController.m b/modules/gui/macosx/panels/VLCTimeSelectionPanelController.m
> index bf4dd7fb58..37a308cb4a 100644
> --- a/modules/gui/macosx/panels/VLCTimeSelectionPanelController.m
> +++ b/modules/gui/macosx/panels/VLCTimeSelectionPanelController.m
> @@ -36,11 +36,9 @@
> - (id)init
> {
>     self = [super initWithWindowNibName:@"TimeSelectionPanel"];
> -
>     return self;
> }
> 
> -
> #pragma mark - UI handling
> 
> - (void)windowDidLoad
> @@ -109,10 +107,7 @@
> 
> - (void)runModalForWindow:(NSWindow *)window completionHandler:(TimeSelectionCompletionHandler)handler
> {
> -    [self window];
> -
> -    _completionHandler = [handler copy];
> -
> +    _completionHandler = handler;

HI Felix,

Are you sure about this change? I think the copy should be kept here, no?

BR. David


>     [window beginSheet:self.window completionHandler:nil];
> }
> 
> diff --git a/modules/gui/macosx/panels/dialogs/VLCCustomCropArWindowController.m b/modules/gui/macosx/panels/dialogs/VLCCustomCropArWindowController.m
> index 026d85563a..db7f177ae8 100644
> --- a/modules/gui/macosx/panels/dialogs/VLCCustomCropArWindowController.m
> +++ b/modules/gui/macosx/panels/dialogs/VLCCustomCropArWindowController.m
> @@ -38,7 +38,7 @@
> 
> - (void)windowDidLoad {
>     [super windowDidLoad];
> -    
> +
>     [_applyButton setTitle:_NS("Apply")];
>     [_cancelButton setTitle:_NS("Cancel")];
>     [_titleLabel setStringValue:self.title];
> 
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits



More information about the vlc-devel mailing list