diff --git a/Classes/PropertyView/Base.lproj/MultiSelectView.xib b/Classes/PropertyView/Base.lproj/MultiSelectView.xib
new file mode 100644
index 0000000..f6bd858
--- /dev/null
+++ b/Classes/PropertyView/Base.lproj/MultiSelectView.xib
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Classes/PropertyView/SBMultiSelectViewController.h b/Classes/PropertyView/SBMultiSelectViewController.h
new file mode 100644
index 0000000..bc0c5ae
--- /dev/null
+++ b/Classes/PropertyView/SBMultiSelectViewController.h
@@ -0,0 +1,15 @@
+//
+// PropertyViewController.h
+// Subler
+//
+// Created by Damiano Galassi on 06/02/09.
+// Copyright 2009 Damiano Galassi. All rights reserved.
+//
+
+#import
+
+@interface SBMultiSelectViewController : NSViewController
+
+@property (nonatomic, readwrite) NSUInteger numberOfTracks;
+
+@end
diff --git a/Classes/PropertyView/it.lproj/EmptyView.strings b/Classes/PropertyView/it.lproj/EmptyView.strings
index b532a8a..dc62739 100644
--- a/Classes/PropertyView/it.lproj/EmptyView.strings
+++ b/Classes/PropertyView/it.lproj/EmptyView.strings
@@ -1,6 +1 @@
-/* Class = "NSTextFieldCell"; title = "Nothing to see here"; ObjectID = "3"; */
-"3.title" = "Nessuna traccia selezionata";
-
-/* Class = "NSTabViewItem"; label = "Empty"; ObjectID = "6"; */
-"6.label" = "Vuoto";
-
+/* No Localized Strings */
\ No newline at end of file
diff --git a/Classes/PropertyView/it.lproj/MultiSelectView.strings b/Classes/PropertyView/it.lproj/MultiSelectView.strings
new file mode 100644
index 0000000..67c6709
--- /dev/null
+++ b/Classes/PropertyView/it.lproj/MultiSelectView.strings
@@ -0,0 +1,3 @@
+/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "Mo5-ii-LsO"; */
+"Mo5-ii-LsO.title" = "";
+
diff --git a/Classes/SBDocument.m b/Classes/SBDocument.m
index 7ec1297..be45ca5 100644
--- a/Classes/SBDocument.m
+++ b/Classes/SBDocument.m
@@ -19,6 +19,7 @@
#import "SBVideoViewController.h"
#import "SBSoundViewController.h"
#import "SBChapterViewController.h"
+#import "SBMultiSelectViewController.h"
#import "SBMetadataSearchController.h"
#import "SBArtworkSelector.h"
@@ -702,12 +703,16 @@ static NSDictionary *_detailMonospacedAttr;
}
NSInteger row = self.tracksTable.selectedRow;
+ NSUInteger numberOfSelectedRows = [self.tracksTable numberOfSelectedRows];
id controller = nil;
BOOL metadataRow = (row == -1 || row == 0);
- id track = !metadataRow && [self.tracksTable numberOfSelectedRows] == 1 ? [self trackAtAtTableRow:row] : nil;
+ id track = !metadataRow && numberOfSelectedRows == 1 ? [self trackAtAtTableRow:row] : nil;
- if (metadataRow) {
+ if (numberOfSelectedRows > 1) {
+ controller = [[SBMultiSelectViewController alloc] initWithNibName:@"MultiSelectView" bundle:nil];
+ [(SBMultiSelectViewController *)controller setNumberOfTracks:numberOfSelectedRows];
+ } else if (metadataRow) {
controller = [[SBMovieViewController alloc] initWithNibName:@"MovieView" bundle:nil];
[(SBMovieViewController *)controller setMetadata:self.mp4.metadata];
} else if ([track isMemberOfClass:[MP42ChapterTrack class]]) {
diff --git a/SBMultiSelectViewController.m b/SBMultiSelectViewController.m
new file mode 100644
index 0000000..d8f5619
--- /dev/null
+++ b/SBMultiSelectViewController.m
@@ -0,0 +1,32 @@
+//
+// PropertyViewController.m
+// Subler
+//
+// Created by Damiano Galassi on 06/02/09.
+// Copyright 2009 Damiano Galassi. All rights reserved.
+//
+
+#import "SBMultiSelectViewController.h"
+
+@implementation SBMultiSelectViewController {
+ IBOutlet NSTextField *label;
+}
+
+- (void)loadView
+{
+ [super loadView];
+
+ if (self.numberOfTracks == 1) {
+ label.stringValue = [NSString stringWithFormat:NSLocalizedString(@"1 track selected", nil)];
+ } else {
+ label.stringValue = [NSString stringWithFormat:NSLocalizedString(@"%lu tracks selected", nil) , self.numberOfTracks];
+ }
+
+}
+
+- (void)setNumberOfTracks:(NSUInteger) numberOfTracks
+{
+ _numberOfTracks = numberOfTracks;
+}
+
+@end
diff --git a/Subler.xcodeproj/project.pbxproj b/Subler.xcodeproj/project.pbxproj
index 7f4edcd..3cf4b1b 100644
--- a/Subler.xcodeproj/project.pbxproj
+++ b/Subler.xcodeproj/project.pbxproj
@@ -8,6 +8,8 @@
/* Begin PBXBuildFile section */
1DDD582D0DA1D0D100B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD582A0DA1D0D100B32029 /* MainMenu.xib */; };
+ 61CEC0CE1E7569E4000FECC1 /* MultiSelectView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61CEC0CC1E7569E4000FECC1 /* MultiSelectView.xib */; };
+ 61CEC0D31E756ADA000FECC1 /* SBMultiSelectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61CEC0D21E756ADA000FECC1 /* SBMultiSelectViewController.m */; };
8D15AC2C0486D014006FF6A4 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */; };
8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165FFE840EACC02AAC07 /* InfoPlist.strings */; };
8D15AC320486D014006FF6A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
@@ -158,6 +160,10 @@
2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
32DBCF750370BD2300C91783 /* Subler_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Subler_Prefix.pch; sourceTree = ""; };
+ 610362271E76D66A000DAE60 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = Classes/PropertyView/it.lproj/MultiSelectView.strings; sourceTree = ""; };
+ 61CEC0CD1E7569E4000FECC1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Classes/PropertyView/Base.lproj/MultiSelectView.xib; sourceTree = ""; };
+ 61CEC0D11E756ACC000FECC1 /* SBMultiSelectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBMultiSelectViewController.h; path = Classes/PropertyView/SBMultiSelectViewController.h; sourceTree = ""; };
+ 61CEC0D21E756ADA000FECC1 /* SBMultiSelectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBMultiSelectViewController.m; sourceTree = ""; };
8D15AC360486D014006FF6A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
8D15AC370486D014006FF6A4 /* Subler.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Subler.app; sourceTree = BUILT_PRODUCTS_DIR; };
948058B5106E07990037A911 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = ""; };
@@ -412,7 +418,6 @@
A9FAC5FE1BAC3BAC00525E42 /* Document */,
A9AF6A7818D0537F00FAAB08 /* Queue */,
A961476113F567E10068F161 /* SBPresetManager.h */,
- A961476213F567E10068F161 /* SBPresetManager.m */,
A9AB484717F0AEA2000AA72E /* SBAppDelegate.h */,
A9AB484817F0AEA2000AA72E /* SBAppDelegate.m */,
A947218D1D49D9F700858DD8 /* Preferences */,
@@ -544,6 +549,7 @@
A9B46AC012B79E230040517A /* SBDocument.xib */,
A9AB485A17F0AEFD000AA72E /* ChapterView.xib */,
A9AB485C17F0AEFD000AA72E /* EmptyView.xib */,
+ 61CEC0CC1E7569E4000FECC1 /* MultiSelectView.xib */,
A9AB485E17F0AEFD000AA72E /* MovieView.xib */,
A9AB486017F0AEFD000AA72E /* SoundView.xib */,
A9AB486217F0AEFD000AA72E /* VideoView.xib */,
@@ -618,12 +624,15 @@
A9AB484D17F0AEAC000AA72E /* SBEmptyViewController.m */,
A9AB484E17F0AEAC000AA72E /* SBMovieViewController.h */,
A9AB484F17F0AEAC000AA72E /* SBMovieViewController.m */,
+ 61CEC0D11E756ACC000FECC1 /* SBMultiSelectViewController.h */,
+ 61CEC0D21E756ADA000FECC1 /* SBMultiSelectViewController.m */,
A9AB485017F0AEAC000AA72E /* SBSoundViewController.h */,
A9AB485117F0AEAC000AA72E /* SBSoundViewController.m */,
A9AB485217F0AEAC000AA72E /* SBVideoViewController.h */,
A9AB485317F0AEAC000AA72E /* SBVideoViewController.m */,
A960E96117D4B00900FC6ED9 /* SBImageBrowserView.h */,
A960E96217D4B00900FC6ED9 /* SBImageBrowserView.m */,
+ A961476213F567E10068F161 /* SBPresetManager.m */,
A9B46A8612B79B240040517A /* SBView.h */,
A9B46A8712B79B240040517A /* SBView.m */,
);
@@ -835,6 +844,7 @@
A9B46AA412B79BB10040517A /* Subler.icns in Resources */,
CD71FEA612F1B62600F0A98D /* MetadataSearch.xib in Resources */,
CD4E6E5D12F744210095C84F /* ArtworkSelector.xib in Resources */,
+ 61CEC0CE1E7569E4000FECC1 /* MultiSelectView.xib in Resources */,
A9BC410818D9ABC000F8C92C /* QueueItem.xib in Resources */,
A9D4B8671C05BD04007845C4 /* SBChapterSearch.xib in Resources */,
A998DABF1BA54CFF004D7969 /* SBMediaTagsController.xib in Resources */,
@@ -909,6 +919,7 @@
A9DA3B9C1B918D5C00F1E40C /* SBApplication.m in Sources */,
CD56963212FAAD680029FADB /* SBArtworkSelector.m in Sources */,
A901C51E1C04F03F00430DC3 /* SBChapterDB.m in Sources */,
+ 61CEC0D31E756ADA000FECC1 /* SBMultiSelectViewController.m in Sources */,
A961476313F567E10068F161 /* SBQueueController.m in Sources */,
A961476413F567E10068F161 /* SBPresetManager.m in Sources */,
A901C51F1C04F03F00430DC3 /* SBChapterImporter.m in Sources */,
@@ -981,6 +992,15 @@
name = Credits.rtf;
sourceTree = "";
};
+ 61CEC0CC1E7569E4000FECC1 /* MultiSelectView.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 61CEC0CD1E7569E4000FECC1 /* Base */,
+ 610362271E76D66A000DAE60 /* it */,
+ );
+ name = MultiSelectView.xib;
+ sourceTree = "";
+ };
A90300CA1DAE72C4008237D8 /* SBSetPrefsViewController.xib */ = {
isa = PBXVariantGroup;
children = (