mirror of
https://github.com/arsenetar/dupeguru-cocoa.git
synced 2026-01-22 14:41:40 +00:00
Un-xibless-ify IgnoreListDialog
Along with all the work around making localizations work.
This commit is contained in:
95
cocoa/Base.lproj/IgnoreListDialog.xib
Normal file
95
cocoa/Base.lproj/IgnoreListDialog.xib
Normal file
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="IgnoreListDialog">
|
||||
<connections>
|
||||
<outlet property="ignoreListTableView" destination="8" id="30"/>
|
||||
<outlet property="window" destination="1" id="22"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<window title="Ignore List" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="1">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="477" y="306" width="574" height="347"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1058"/>
|
||||
<view key="contentView" id="2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="574" height="347"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="5">
|
||||
<rect key="frame" x="20" y="60" width="534" height="267"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<clipView key="contentView" id="xl9-0g-I6O">
|
||||
<rect key="frame" x="1" y="0.0" width="532" height="266"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" autosaveColumns="NO" typeSelect="NO" headerView="9" id="8">
|
||||
<rect key="frame" x="0.0" y="0.0" width="532" height="243"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<size key="intercellSpacing" width="3" height="2"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
|
||||
</tableView>
|
||||
</subviews>
|
||||
</clipView>
|
||||
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="7">
|
||||
<rect key="frame" x="1" y="154" width="438" height="15"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="6">
|
||||
<rect key="frame" x="224" y="17" width="15" height="102"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<tableHeaderView key="headerView" id="9">
|
||||
<rect key="frame" x="0.0" y="0.0" width="532" height="23"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</tableHeaderView>
|
||||
</scrollView>
|
||||
<button verticalHuggingPriority="750" imageHugsTitle="YES" id="18">
|
||||
<rect key="frame" x="464" y="12" width="96" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<buttonCell key="cell" type="push" title="Close" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="19">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<string key="keyEquivalent" base64-UTF8="YES">
|
||||
DQ
|
||||
</string>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="performClose:" target="1" id="25"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" imageHugsTitle="YES" id="20">
|
||||
<rect key="frame" x="14" y="12" width="154" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<buttonCell key="cell" type="push" title="Remove Selected" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="21">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="removeSelected:" target="-2" id="31"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" imageHugsTitle="YES" id="27">
|
||||
<rect key="frame" x="162" y="12" width="154" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<buttonCell key="cell" type="push" title="Clear" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="28">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="clear:" target="-2" id="32"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</view>
|
||||
</window>
|
||||
</objects>
|
||||
</document>
|
||||
15
cocoa/Base.lproj/cocoalib.strings
Normal file
15
cocoa/Base.lproj/cocoalib.strings
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
"Cancel" = "Cancel";
|
||||
"Clear List" = "Clear List";
|
||||
"Close" = "Close";
|
||||
"Error Report" = "Error Report";
|
||||
"Error reports should be reported as Github issues. You can copy the error traceback above and paste it in a new issue (bonus point if you run a search to make sure the issue doesn't already exist). What usually really helps is if you add a description of how you got the error. Thanks!\n\nAlthough the application should continue to run after this error, it may be in an unstable state, so it is recommended that you restart the application." = "Error reports should be reported as Github issues. You can copy the error traceback above and paste it in a new issue (bonus point if you run a search to make sure the issue doesn't already exist). What usually really helps is if you add a description of how you got the error. Thanks!\n\nAlthough the application should continue to run after this error, it may be in an unstable state, so it is recommended that you restart the application.";
|
||||
"Go to Github" = "Go to Github";
|
||||
"No" = "No";
|
||||
"OK" = "OK";
|
||||
"Please wait..." = "Please wait...";
|
||||
"Something went wrong. How about reporting the error?" = "Something went wrong. How about reporting the error?";
|
||||
"Status: Working..." = "Status: Working...";
|
||||
"Work in progress, please wait." = "Work in progress, please wait.";
|
||||
"Work in progress..." = "Work in progress...";
|
||||
"Yes" = "Yes";
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||
Copyright 2017 Virgil Dupras
|
||||
|
||||
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||
which should be included with this package. The terms are also available at
|
||||
@@ -12,9 +12,10 @@ http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
@interface IgnoreListDialog : NSWindowController
|
||||
{
|
||||
IBOutlet NSTableView *ignoreListTableView;
|
||||
|
||||
PyIgnoreListDialog *model;
|
||||
HSTable *ignoreListTable;
|
||||
NSTableView *ignoreListTableView;
|
||||
}
|
||||
|
||||
@property (readwrite, retain) PyIgnoreListDialog *model;
|
||||
@@ -22,4 +23,6 @@ http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
- (id)initWithPyRef:(PyObject *)aPyRef;
|
||||
- (void)initializeColumns;
|
||||
- (IBAction)removeSelected:(id)sender;
|
||||
- (IBAction)clear:(id)sender;
|
||||
@end
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||
Copyright 2017 Virgil Dupras
|
||||
|
||||
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||
which should be included with this package. The terms are also available at
|
||||
@@ -7,7 +7,6 @@ http://www.gnu.org/licenses/gpl-3.0.html
|
||||
*/
|
||||
|
||||
#import "IgnoreListDialog.h"
|
||||
#import "IgnoreListDialog_UI.h"
|
||||
#import "HSPyUtil.h"
|
||||
|
||||
@implementation IgnoreListDialog
|
||||
@@ -17,10 +16,10 @@ http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
- (id)initWithPyRef:(PyObject *)aPyRef
|
||||
{
|
||||
self = [super initWithWindow:nil];
|
||||
self = [super initWithWindowNibName:@"IgnoreListDialog"];
|
||||
[self window]; //So the detailsTable is initialized.
|
||||
self.model = [[[PyIgnoreListDialog alloc] initWithModel:aPyRef] autorelease];
|
||||
[self.model bindCallback:createCallback(@"IgnoreListDialogView", self)];
|
||||
[self setWindow:createIgnoreListDialog_UI(self)];
|
||||
ignoreListTable = [[HSTable alloc] initWithPyRef:[model ignoreListTable] tableView:ignoreListTableView];
|
||||
[self initializeColumns];
|
||||
return self;
|
||||
@@ -43,6 +42,16 @@ http://www.gnu.org/licenses/gpl-3.0.html
|
||||
[[ignoreListTable columns] setColumnsAsReadOnly];
|
||||
}
|
||||
|
||||
- (IBAction)removeSelected:(id)sender
|
||||
{
|
||||
[model removeSelected];
|
||||
}
|
||||
|
||||
- (IBAction)clear:(id)sender
|
||||
{
|
||||
[model clear];
|
||||
}
|
||||
|
||||
/* model --> view */
|
||||
- (void)show
|
||||
{
|
||||
|
||||
12
cocoa/en.lproj/IgnoreListDialog.strings
Normal file
12
cocoa/en.lproj/IgnoreListDialog.strings
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
/* Class = "NSWindow"; title = "Ignore List"; ObjectID = "1"; */
|
||||
"1.title" = "Ignore List";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Close"; ObjectID = "19"; */
|
||||
"19.title" = "Close";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Remove Selected"; ObjectID = "21"; */
|
||||
"21.title" = "Remove Selected";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Clear"; ObjectID = "28"; */
|
||||
"28.title" = "Clear";
|
||||
Reference in New Issue
Block a user