diff options
author | dynaflash <[email protected]> | 2007-09-14 18:36:34 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2007-09-14 18:36:34 +0000 |
commit | c46f48bd0a2cd5fac81bd3866b3b3191d9060912 (patch) | |
tree | 157e5fbf561b2471bcbdc8d3fa9519d6479edaec | |
parent | f45d2e22f0e02eda4f932632d21401c1b2c64f2a (diff) |
MacGui: Use the parent folder if VIDEO_TS is chosen as a source for display as well as default output movie name.
Move some icon files into Resources/icons folder in the Xcode proj file.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@964 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | macosx/Controller.mm | 32 | ||||
-rw-r--r-- | macosx/HandBrake.xcodeproj/project.pbxproj | 36 |
2 files changed, 37 insertions, 31 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index d92619a82..7a26b88e5 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -1007,11 +1007,23 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It for( int i = 0; i < hb_list_count( list ); i++ ) { title = (hb_title_t *) hb_list_item( list, i ); - /*Set DVD Name at top of window*/ - [fSrcDVD2Field setStringValue:[NSString stringWithUTF8String: title->name]]; - - currentSource = [NSString stringWithUTF8String: title->dvd]; + currentSource = [NSString stringWithUTF8String: title->dvd]; + + /* To get the source name as well as the default output name, first we check to see if + the selected directory is the VIDEO_TS Directory */ + if ([[currentSource lastPathComponent] isEqualToString: @"VIDEO_TS"]) + { + /* If VIDEO_TS Folder is chosen, choose its parent folder for the source display name */ + sourceDisplayName = [NSString stringWithFormat:[[currentSource stringByDeletingLastPathComponent] lastPathComponent]]; + } + else + { + /* if not the VIDEO_TS Folder, we can assume the chosen folder is the source name */ + sourceDisplayName = [NSString stringWithFormat:[currentSource lastPathComponent]]; + } + /*Set DVD Name at top of window*/ + [fSrcDVD2Field setStringValue:[NSString stringWithFormat: @"%@", sourceDisplayName]]; /* Use the dvd name in the default output field here May want to add code to remove blank spaces for some dvd names*/ @@ -1019,14 +1031,12 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It if ([[NSUserDefaults standardUserDefaults] stringForKey:@"LastDestinationDirectory"]) { [fDstFile2Field setStringValue: [NSString stringWithFormat: - @"%@/%@.mp4", [[NSUserDefaults standardUserDefaults] stringForKey:@"LastDestinationDirectory"],[NSString - stringWithUTF8String: title->name]]]; + @"%@/%@.mp4", [[NSUserDefaults standardUserDefaults] stringForKey:@"LastDestinationDirectory"],sourceDisplayName]]; } else { [fDstFile2Field setStringValue: [NSString stringWithFormat: - @"%@/Desktop/%@.mp4", NSHomeDirectory(),[NSString - stringWithUTF8String: title->name]]]; + @"%@/Desktop/%@.mp4", NSHomeDirectory(),sourceDisplayName]]; } @@ -1094,11 +1104,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It SuccessfulScan = 1; [self enableUI: YES]; - /* we record the current source name here in case the next scan is unsuccessful, - then we can replace the scan progress with the old name if necessary */ - sourceDisplayName = [NSString stringWithFormat:[fSrcDVD2Field stringValue]]; - - /* if its the initial successful scan after awakeFromNib */ + /* if its the initial successful scan after awakeFromNib */ if (currentSuccessfulScanCount == 1) { [self selectDefaultPreset: NULL]; diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj index d1c7ee8ce..88725f8bc 100644 --- a/macosx/HandBrake.xcodeproj/project.pbxproj +++ b/macosx/HandBrake.xcodeproj/project.pbxproj @@ -304,15 +304,15 @@ A29E057F0BE1283E000533F5 /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Growl.framework; sourceTree = "<group>"; }; A2A1EC300C76C35E00827E0D /* HBDVDDetector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HBDVDDetector.h; sourceTree = "<group>"; }; A2A1EC390C76C58400827E0D /* HBDVDDetector.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = HBDVDDetector.m; sourceTree = "<group>"; }; - A2D7AD5E0C998AD30082CA33 /* ActivityWindow.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ActivityWindow.tiff; path = icons/ActivityWindow.tiff; sourceTree = "<group>"; }; - A2D7AD5F0C998AD30082CA33 /* AddToQueue.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = AddToQueue.tiff; path = icons/AddToQueue.tiff; sourceTree = "<group>"; }; - A2D7AD600C998AD30082CA33 /* Drawer.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = Drawer.tiff; path = icons/Drawer.tiff; sourceTree = "<group>"; }; - A2D7AD610C998AD30082CA33 /* pref-advanced.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "pref-advanced.tiff"; path = "icons/pref-advanced.tiff"; sourceTree = "<group>"; }; - A2D7AD620C998AD30082CA33 /* pref-audio.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "pref-audio.tiff"; path = "icons/pref-audio.tiff"; sourceTree = "<group>"; }; - A2D7AD630C998AD30082CA33 /* pref-general.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "pref-general.tiff"; path = "icons/pref-general.tiff"; sourceTree = "<group>"; }; - A2D7AD640C998AD30082CA33 /* pref-picture.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "pref-picture.tiff"; path = "icons/pref-picture.tiff"; sourceTree = "<group>"; }; - A2D7AD650C998AD30082CA33 /* Queue.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = Queue.tiff; path = icons/Queue.tiff; sourceTree = "<group>"; }; - A2D7AD660C998AD30082CA33 /* Source.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = Source.tiff; path = icons/Source.tiff; sourceTree = "<group>"; }; + A2D7AD5E0C998AD30082CA33 /* ActivityWindow.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = ActivityWindow.tiff; sourceTree = "<group>"; }; + A2D7AD5F0C998AD30082CA33 /* AddToQueue.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = AddToQueue.tiff; sourceTree = "<group>"; }; + A2D7AD600C998AD30082CA33 /* Drawer.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Drawer.tiff; sourceTree = "<group>"; }; + A2D7AD610C998AD30082CA33 /* pref-advanced.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "pref-advanced.tiff"; sourceTree = "<group>"; }; + A2D7AD620C998AD30082CA33 /* pref-audio.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "pref-audio.tiff"; sourceTree = "<group>"; }; + A2D7AD630C998AD30082CA33 /* pref-general.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "pref-general.tiff"; sourceTree = "<group>"; }; + A2D7AD640C998AD30082CA33 /* pref-picture.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "pref-picture.tiff"; sourceTree = "<group>"; }; + A2D7AD650C998AD30082CA33 /* Queue.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Queue.tiff; sourceTree = "<group>"; }; + A2D7AD660C998AD30082CA33 /* Source.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Source.tiff; sourceTree = "<group>"; }; A2DFC66C0C6196D900E66E89 /* actionWidget.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = actionWidget.png; sourceTree = "<group>"; }; A2DFC66D0C6196D900E66E89 /* actionWidgetPressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = actionWidgetPressed.png; sourceTree = "<group>"; }; A2DFC6740C6197C600E66E89 /* MVMenuButton.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MVMenuButton.h; sourceTree = "<group>"; }; @@ -423,15 +423,6 @@ 29B97314FDCFA39411CA2CEA /* HandBrake */ = { isa = PBXGroup; children = ( - A2D7AD5E0C998AD30082CA33 /* ActivityWindow.tiff */, - A2D7AD5F0C998AD30082CA33 /* AddToQueue.tiff */, - A2D7AD600C998AD30082CA33 /* Drawer.tiff */, - A2D7AD610C998AD30082CA33 /* pref-advanced.tiff */, - A2D7AD620C998AD30082CA33 /* pref-audio.tiff */, - A2D7AD630C998AD30082CA33 /* pref-general.tiff */, - A2D7AD640C998AD30082CA33 /* pref-picture.tiff */, - A2D7AD650C998AD30082CA33 /* Queue.tiff */, - A2D7AD660C998AD30082CA33 /* Source.tiff */, 526FBC940B4CAA310064E04C /* Instant HandBrake Sources */, 526FBC930B4CAA260064E04C /* HandBrake Sources */, 526FBC920B4CAA120064E04C /* HandBrakeCLI Sources */, @@ -586,6 +577,15 @@ A273E0460C57B39A00493A45 /* icons */ = { isa = PBXGroup; children = ( + A2D7AD5E0C998AD30082CA33 /* ActivityWindow.tiff */, + A2D7AD5F0C998AD30082CA33 /* AddToQueue.tiff */, + A2D7AD600C998AD30082CA33 /* Drawer.tiff */, + A2D7AD610C998AD30082CA33 /* pref-advanced.tiff */, + A2D7AD620C998AD30082CA33 /* pref-audio.tiff */, + A2D7AD630C998AD30082CA33 /* pref-general.tiff */, + A2D7AD640C998AD30082CA33 /* pref-picture.tiff */, + A2D7AD650C998AD30082CA33 /* Queue.tiff */, + A2D7AD660C998AD30082CA33 /* Source.tiff */, A91C68A10C967D83003ADAD1 /* pref-audio.png */, A94537550C95E6A300EBB9B1 /* pref-picture.png */, A96041070C96FC5C00CBAB1E /* pref-general.png */, |