Skip to content

Commit

Permalink
Add support for 10.9 and Blackrock Mountain.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeswang committed Apr 26, 2015
1 parent 184db90 commit 3579700
Show file tree
Hide file tree
Showing 811 changed files with 687 additions and 6,823 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ DerivedData
#
Pods/
.idea/
Carthage/
2 changes: 2 additions & 0 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
github "ReactiveCocoa/ReactiveCocoa"
github "realm/realm-cocoa"
github "SnapKit/Masonry"
2 changes: 2 additions & 0 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
github "SnapKit/Masonry" "v0.6.1"
github "ReactiveCocoa/ReactiveCocoa" "v2.5"
github "realm/realm-cocoa" "v0.91.3"
34 changes: 26 additions & 8 deletions Hearthstone-Deck-Tracker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@
5132FABB1A5FC10300A43A59 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5132FABA1A5FC10300A43A59 /* AppDelegate.m */; };
5132FABD1A5FC10300A43A59 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5132FABC1A5FC10300A43A59 /* main.m */; };
5132FAC21A5FC10300A43A59 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5132FAC11A5FC10300A43A59 /* Images.xcassets */; };
513343BC1AECBA3D0012FC0C /* CardListView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 513343BB1AECBA3D0012FC0C /* CardListView.xib */; };
513343BE1AECC78B0012FC0C /* CardPreviewWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 513343BD1AECC78B0012FC0C /* CardPreviewWindow.xib */; };
5166468C1A621F2900E36F26 /* CardCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5166468B1A621F2900E36F26 /* CardCellView.m */; };
5166468F1A621FF700E36F26 /* CardModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 5166468E1A621FF700E36F26 /* CardModel.m */; };
516646931A6228B700E36F26 /* RealmGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 516646921A6228B700E36F26 /* RealmGenerator.m */; };
51681FF81AECD34100F21320 /* ImportWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 51681FF71AECD34100F21320 /* ImportWindow.xib */; };
51681FFA1AECDA4800F21320 /* SettingLanguageView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 51681FF91AECDA4800F21320 /* SettingLanguageView.xib */; };
51846C6E1A680A87004ED043 /* CardListWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 51846C6D1A680A87004ED043 /* CardListWindowController.m */; };
51846C711A681384004ED043 /* SettingBuilderWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 51846C701A681384004ED043 /* SettingBuilderWindowController.m */; };
51846C741A682571004ED043 /* SettingsBuilderController.m in Sources */ = {isa = PBXBuildFile; fileRef = 51846C731A682571004ED043 /* SettingsBuilderController.m */; };
Expand All @@ -25,15 +29,15 @@
5192D1801A62B09E00B239C5 /* NetEaseCardBuilderImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5192D17F1A62B09E00B239C5 /* NetEaseCardBuilderImporter.m */; };
5192D1831A62B10800B239C5 /* SystemHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 5192D1821A62B10800B239C5 /* SystemHelper.m */; };
5194F5581A6617E8005BBD08 /* libsqlite3.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5194F5571A6617E8005BBD08 /* libsqlite3.0.dylib */; };
519BD72B1A6C00A800AE8123 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 519BD7291A6C00A800AE8123 /* Main.storyboard */; };
519BD72C1A6C00A800AE8123 /* Settings.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 519BD72A1A6C00A800AE8123 /* Settings.storyboard */; };
51AAA16C1A6B6F9D000228A9 /* Card_back-Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 51AAA16B1A6B6F9D000228A9 /* Card_back-Default.png */; };
51B7AF3A1AECB813006D5D6C /* CardListWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 51B7AF391AECB813006D5D6C /* CardListWindow.xib */; };
51B86CDD1A63DBD1001AB7D7 /* LogReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 51B86CDC1A63DBD1001AB7D7 /* LogReader.m */; };
51C72D7E1A6190B4004C374E /* Files in Resources */ = {isa = PBXBuildFile; fileRef = 51C72D7A1A6190B4004C374E /* Files */; };
51C72D7F1A6190B4004C374E /* Images in Resources */ = {isa = PBXBuildFile; fileRef = 51C72D7B1A6190B4004C374E /* Images */; };
51C72D801A6190B4004C374E /* Resources in Resources */ = {isa = PBXBuildFile; fileRef = 51C72D7C1A6190B4004C374E /* Resources */; };
51C72D851A619118004C374E /* CardListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 51C72D841A619118004C374E /* CardListViewController.m */; };
51C72D881A619218004C374E /* DeckManangerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 51C72D871A619218004C374E /* DeckManangerController.m */; };
51CD88431AECAF4A00BF6742 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 51CD88421AECAF4A00BF6742 /* MainMenu.xib */; };
51D1051B1A6A6C8D0074B86A /* CardPreviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 51D1051A1A6A6C8D0074B86A /* CardPreviewController.m */; };
51F7DAD11A625E7000E69120 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F7DAD01A625E7000E69120 /* CoreGraphics.framework */; };
9A3A265DA881CFFFFF4DBA86 /* HoverTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A3A2885AAB381BE68B3572F /* HoverTableCellView.m */; };
Expand All @@ -54,13 +58,17 @@
5132FAC11A5FC10300A43A59 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
5132FACF1A5FC10300A43A59 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5132FAD01A5FC10300A43A59 /* Hearthstone_Deck_TrackerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Hearthstone_Deck_TrackerTests.m; sourceTree = "<group>"; };
513343BB1AECBA3D0012FC0C /* CardListView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CardListView.xib; sourceTree = "<group>"; };
513343BD1AECC78B0012FC0C /* CardPreviewWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CardPreviewWindow.xib; sourceTree = "<group>"; };
51514C3A1A6657B400395567 /* CardJs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = CardJs; path = "Hearthstone-Deck-Tracker/CardJs"; sourceTree = SOURCE_ROOT; };
5166468A1A621F2900E36F26 /* CardCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CardCellView.h; path = Views/CardCellView.h; sourceTree = "<group>"; };
5166468B1A621F2900E36F26 /* CardCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CardCellView.m; path = Views/CardCellView.m; sourceTree = "<group>"; };
5166468D1A621FF700E36F26 /* CardModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CardModel.h; path = Models/CardModel.h; sourceTree = "<group>"; };
5166468E1A621FF700E36F26 /* CardModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CardModel.m; path = Models/CardModel.m; sourceTree = "<group>"; };
516646911A6228B700E36F26 /* RealmGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RealmGenerator.h; path = Utility/RealmGenerator.h; sourceTree = "<group>"; };
516646921A6228B700E36F26 /* RealmGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RealmGenerator.m; path = Utility/RealmGenerator.m; sourceTree = "<group>"; };
51681FF71AECD34100F21320 /* ImportWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ImportWindow.xib; sourceTree = "<group>"; };
51681FF91AECDA4800F21320 /* SettingLanguageView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SettingLanguageView.xib; sourceTree = "<group>"; };
51846C6C1A680A87004ED043 /* CardListWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardListWindowController.h; sourceTree = "<group>"; };
51846C6D1A680A87004ED043 /* CardListWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CardListWindowController.m; sourceTree = "<group>"; };
51846C6F1A681384004ED043 /* SettingBuilderWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingBuilderWindowController.h; sourceTree = "<group>"; };
Expand All @@ -80,9 +88,8 @@
5192D1811A62B10800B239C5 /* SystemHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SystemHelper.h; path = Utility/SystemHelper.h; sourceTree = "<group>"; };
5192D1821A62B10800B239C5 /* SystemHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SystemHelper.m; path = Utility/SystemHelper.m; sourceTree = "<group>"; };
5194F5571A6617E8005BBD08 /* libsqlite3.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.0.dylib; path = usr/lib/libsqlite3.0.dylib; sourceTree = SDKROOT; };
519BD7291A6C00A800AE8123 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
519BD72A1A6C00A800AE8123 /* Settings.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Settings.storyboard; sourceTree = "<group>"; };
51AAA16B1A6B6F9D000228A9 /* Card_back-Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Card_back-Default.png"; sourceTree = "<group>"; };
51B7AF391AECB813006D5D6C /* CardListWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CardListWindow.xib; sourceTree = "<group>"; };
51B86CDB1A63DBD1001AB7D7 /* LogReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LogReader.h; path = LogReader/LogReader.h; sourceTree = "<group>"; };
51B86CDC1A63DBD1001AB7D7 /* LogReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LogReader.m; path = LogReader/LogReader.m; sourceTree = "<group>"; };
51C72D7A1A6190B4004C374E /* Files */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Files; sourceTree = "<group>"; };
Expand All @@ -92,6 +99,7 @@
51C72D841A619118004C374E /* CardListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CardListViewController.m; sourceTree = "<group>"; };
51C72D861A619218004C374E /* DeckManangerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeckManangerController.h; sourceTree = "<group>"; };
51C72D871A619218004C374E /* DeckManangerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeckManangerController.m; sourceTree = "<group>"; };
51CD88421AECAF4A00BF6742 /* MainMenu.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainMenu.xib; sourceTree = "<group>"; };
51D105191A6A6C8D0074B86A /* CardPreviewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardPreviewController.h; sourceTree = "<group>"; };
51D1051A1A6A6C8D0074B86A /* CardPreviewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CardPreviewController.m; sourceTree = "<group>"; };
51F7DAD01A625E7000E69120 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -239,8 +247,12 @@
519BD7281A6C00A800AE8123 /* Storyboards */ = {
isa = PBXGroup;
children = (
519BD7291A6C00A800AE8123 /* Main.storyboard */,
519BD72A1A6C00A800AE8123 /* Settings.storyboard */,
51CD88421AECAF4A00BF6742 /* MainMenu.xib */,
51B7AF391AECB813006D5D6C /* CardListWindow.xib */,
513343BB1AECBA3D0012FC0C /* CardListView.xib */,
513343BD1AECC78B0012FC0C /* CardPreviewWindow.xib */,
51681FF71AECD34100F21320 /* ImportWindow.xib */,
51681FF91AECDA4800F21320 /* SettingLanguageView.xib */,
);
path = Storyboards;
sourceTree = "<group>";
Expand Down Expand Up @@ -366,13 +378,17 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
51681FF81AECD34100F21320 /* ImportWindow.xib in Resources */,
51C72D7F1A6190B4004C374E /* Images in Resources */,
51C72D7E1A6190B4004C374E /* Files in Resources */,
51B7AF3A1AECB813006D5D6C /* CardListWindow.xib in Resources */,
513343BE1AECC78B0012FC0C /* CardPreviewWindow.xib in Resources */,
51C72D801A6190B4004C374E /* Resources in Resources */,
519BD72B1A6C00A800AE8123 /* Main.storyboard in Resources */,
51CD88431AECAF4A00BF6742 /* MainMenu.xib in Resources */,
513343BC1AECBA3D0012FC0C /* CardListView.xib in Resources */,
5132FAC21A5FC10300A43A59 /* Images.xcassets in Resources */,
51681FFA1AECDA4800F21320 /* SettingLanguageView.xib in Resources */,
51AAA16C1A6B6F9D000228A9 /* Card_back-Default.png in Resources */,
519BD72C1A6C00A800AE8123 /* Settings.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -527,6 +543,7 @@
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = "Hearthstone-Deck-Tracker/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.8;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
Expand All @@ -539,6 +556,7 @@
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = "Hearthstone-Deck-Tracker/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.8;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0630"
version = "1.3">
<BuildAction>
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForRunning = "YES">
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5132FAB31A5FC10200A43A59"
Expand All @@ -15,10 +22,25 @@
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug">
<BuildableProductRunnable>
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5132FAB31A5FC10200A43A59"
Expand All @@ -27,5 +49,21 @@
ReferencedContainer = "container:Hearthstone-Deck-Tracker.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
41 changes: 33 additions & 8 deletions Hearthstone-Deck-Tracker/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@
#import "AppDelegate.h"
#import "CardModel.h"
#import "CardListViewController.h"
#import "CardListWindowController.h"
#import "RealmGenerator.h"
#import "NetEaseCardBuilderImporter.h"
#import "Hearthstone.h"
#import "SettingsController.h"
#import "MASPreferencesWindowController.h"

@interface AppDelegate ()
@interface AppDelegate () {
NSWindowController *_preferencesWindowController;
}

@property (nonatomic, weak) IBOutlet NSWindow *window;
@property (nonatomic, weak) IBOutlet NSWindowController *cardListController;
@property (nonatomic) IBOutlet NSWindowController *settingsWindow;
@property (nonatomic, strong) CardListWindowController *cardListController;

@end

@implementation AppDelegate
Expand All @@ -32,6 +38,12 @@ - (instancetype)init {

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
//[RealmGenerator generateCardRealm];

if (self.cardListController == nil)
{
self.cardListController = [[CardListWindowController alloc] initWithWindowNibName:@"CardListWindow"];
}
[self.cardListController showWindow:self];

[[Hearthstone defaultInstance] setStatusDidUpdate:^(BOOL isRunning) {
NSLog(@"Hearthstone is running? %d", isRunning);
Expand All @@ -54,13 +66,26 @@ - (void)updateWithCards:(NSArray *)cards {
}

- (IBAction)openSettings:(id)sender {
if (!self.settingsWindow) {
NSStoryboard *storyboard = [NSStoryboard storyboardWithName:@"Settings" bundle:nil];
self.settingsWindow = [storyboard instantiateInitialController];
}
if (self.settingsWindow) {
[self.settingsWindow showWindow:nil];
[self.preferencesWindowController showWindow:nil];
}

#pragma mark - Public accessors

- (NSWindowController *)preferencesWindowController
{
if (_preferencesWindowController == nil)
{
NSViewController *generalViewController = [[SettingsController alloc] initWithNibName:@"SettingLanguageView" bundle:nil];
NSArray *controllers = [[NSArray alloc] initWithObjects:generalViewController, nil];

// To add a flexible space between General and Advanced preference panes insert [NSNull null]:
// NSArray *controllers = [[NSArray alloc] initWithObjects:generalViewController, [NSNull null], advancedViewController, nil];

NSString *title = NSLocalizedString(@"Preferences", @"Common title for Preferences window");
_preferencesWindowController = [[MASPreferencesWindowController alloc] initWithViewControllers:controllers title:title];
}
return _preferencesWindowController;
}


@end
2 changes: 1 addition & 1 deletion Hearthstone-Deck-Tracker/CardJs/cardsDB.deDE.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Hearthstone-Deck-Tracker/CardJs/cardsDB.enGB.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Hearthstone-Deck-Tracker/CardJs/cardsDB.enUS.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Hearthstone-Deck-Tracker/CardJs/cardsDB.esES.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Hearthstone-Deck-Tracker/CardJs/cardsDB.esMX.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Hearthstone-Deck-Tracker/CardJs/cardsDB.frFR.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Hearthstone-Deck-Tracker/CardJs/cardsDB.itIT.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Hearthstone-Deck-Tracker/CardJs/cardsDB.koKR.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Hearthstone-Deck-Tracker/CardJs/cardsDB.plPL.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Hearthstone-Deck-Tracker/CardJs/cardsDB.ptBR.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Hearthstone-Deck-Tracker/CardJs/cardsDB.ptPT.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Hearthstone-Deck-Tracker/CardJs/cardsDB.ruRU.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Hearthstone-Deck-Tracker/CardJs/cardsDB.zhCN.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Hearthstone-Deck-Tracker/CardJs/cardsDB.zhTW.json

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions Hearthstone-Deck-Tracker/Controllers/CardListViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ @interface CardListViewController()
@property(nonatomic, strong) NSMutableArray *cards;
@property(nonatomic, strong) NSMutableArray *showingCards;

@property(nonatomic, strong) NSWindowController *previewWindowController;
@property(nonatomic, strong) CardPreviewController *previewWindowController;
@property(nonatomic, strong) NSString *currentPreviewCardId;
@end

Expand Down Expand Up @@ -119,15 +119,13 @@ - (void)hidePreviewWindow:(CardCellView *)cell {

- (void)showPreviewWindowBeside:(CardCellView *)cell {
if (_previewWindowController == nil) {
NSStoryboard *sb = [NSStoryboard storyboardWithName:@"Main" bundle:nil];
self.previewWindowController = [sb instantiateControllerWithIdentifier:@"CardPreviewWindowController"];
self.previewWindowController = [[CardPreviewController alloc] initWithWindowNibName:@"CardPreviewWindow"];
[self.previewWindowController.window setOpaque:NO];
[self.previewWindowController.window setBackgroundColor:[NSColor clearColor]];
[self.previewWindowController.window setLevel:NSScreenSaverWindowLevel];
}

CardPreviewController *contentController = (CardPreviewController *)self.previewWindowController.contentViewController;
[contentController loadCardByCardId:cell.card.cardId];
[self.previewWindowController loadCardByCardId:cell.card.cardId];

self.currentPreviewCardId = cell.card.cardId;

Expand Down
Loading

0 comments on commit 3579700

Please sign in to comment.