Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
af404258
Commit
af404258
authored
Mar 17, 2006
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* don't overwrite existing files
parent
0ffd9814
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
15 deletions
+42
-15
extras/MacOSX/Resources/English.lproj/Wizard.nib/classes.nib
extras/MacOSX/Resources/English.lproj/Wizard.nib/classes.nib
+0
-1
extras/MacOSX/Resources/English.lproj/Wizard.nib/info.nib
extras/MacOSX/Resources/English.lproj/Wizard.nib/info.nib
+1
-1
extras/MacOSX/Resources/English.lproj/Wizard.nib/keyedobjects.nib
...acOSX/Resources/English.lproj/Wizard.nib/keyedobjects.nib
+0
-0
modules/gui/macosx/wizard.h
modules/gui/macosx/wizard.h
+0
-1
modules/gui/macosx/wizard.m
modules/gui/macosx/wizard.m
+41
-12
No files found.
extras/MacOSX/Resources/English.lproj/Wizard.nib/classes.nib
View file @
af404258
...
...
@@ -102,7 +102,6 @@
"o_t7_fld_filePath" = id;
"o_t7_text" = id;
"o_t7_title" = id;
"o_t7_txt_note_saveFolderTo" = id;
"o_t7_txt_saveFileTo" = id;
"o_t8_fld_destination" = id;
"o_t8_fld_encapFormat" = id;
...
...
extras/MacOSX/Resources/English.lproj/Wizard.nib/info.nib
View file @
af404258
...
...
@@ -17,6 +17,6 @@
<integer>
6
</integer>
</array>
<key>
IBSystem Version
</key>
<string>
8
G32
</string>
<string>
8
H14
</string>
</dict>
</plist>
extras/MacOSX/Resources/English.lproj/Wizard.nib/keyedobjects.nib
View file @
af404258
No preview for this file type
modules/gui/macosx/wizard.h
View file @
af404258
...
...
@@ -110,7 +110,6 @@
IBOutlet
id
o_t7_text
;
IBOutlet
id
o_t7_title
;
IBOutlet
id
o_t7_txt_saveFileTo
;
IBOutlet
id
o_t7_txt_note_saveFolderTo
;
IBOutlet
id
o_t7_btn_mrInfo_local
;
IBOutlet
id
o_t7_ckb_local
;
...
...
modules/gui/macosx/wizard.m
View file @
af404258
...
...
@@ -453,9 +453,6 @@ static VLCWizard *_o_sharedInstance = nil;
[
o_t7_btn_chooseFile
setTitle
:
_NS
(
"Choose..."
)];
[
o_t7_ckb_local
setTitle
:
_NS
(
"Local playback"
)];
[
o_t7_btn_mrInfo_local
setTitle
:
_NS
(
"More Info"
)];
[
o_t7_txt_note_saveFolderTo
setStringValue
:
_NS
(
"Note that your input "
\
"files will keep their original names when being saved in the folder "
\
"you selected. Existing files may be overwritten."
)];
/* page eight ("Summary") */
[
o_t8_txt_text
setStringValue
:
_NS
(
"This page lists all your selections. "
\
...
...
@@ -1117,13 +1114,11 @@ static VLCWizard *_o_sharedInstance = nil;
{
[
o_t7_txt_saveFileTo
setStringValue
:
_NS
(
"Select the folder to save to"
)];
[
o_t7_txt_note_saveFolderTo
setHidden
:
NO
];
}
else
{
[
o_t7_txt_saveFileTo
setStringValue
:
_NS
(
"Select the file to save to"
)];
[
o_t7_txt_note_saveFolderTo
setHidden
:
YES
];
}
}
}
...
...
@@ -1183,31 +1178,65 @@ static VLCWizard *_o_sharedInstance = nil;
_NS
(
"Enter either a valid path or choose a location "
\
"through the button's dialog-box."
)]);
}
else
{
/* create a string containing the requested suffix for later usage */
NSString
*
theEncapFormat
=
[[
o_encapFormats
objectAtIndex
:
\
[[
o_userSelections
objectForKey
:
@"encapFormat"
]
intValue
]]
\
objectAtIndex
:
0
];
if
(
theEncapFormat
==
@"ps"
)
theEncapFormat
=
@"mpg"
;
/* look whether we need to process multiple items or not.
* choose a faster variant if we just want a single item */
if
(
[[
o_userSelections
objectForKey
:
@"pathToStrm"
]
count
]
>
1
)
{
NSMutableArray
*
tempArray
=
[[
NSMutableArray
alloc
]
init
];
NSString
*
theEncapFormat
=
[[
o_encapFormats
objectAtIndex
:
\
[[
o_userSelections
objectForKey
:
@"encapFormat"
]
intValue
]]
\
objectAtIndex
:
0
];
if
(
theEncapFormat
==
@"ps"
)
theEncapFormat
=
@"mpg"
;
int
x
=
0
;
int
y
=
[[
o_userSelections
objectForKey
:
@"pathToStrm"
]
count
];
NSMutableString
*
tempString
=
[[
NSMutableString
alloc
]
init
];
while
(
x
!=
y
)
{
[
tempArray
addObject
:
[
NSString
stringWithFormat
:
@"%@%@.%@"
,
tempString
=
[
NSString
stringWithFormat
:
@"%@%@.%@"
,
[
o_t7_fld_filePath
stringValue
],
[[
NSFileManager
defaultManager
]
displayNameAtPath
:
[[
o_userSelections
objectForKey
:
@"pathToStrm"
]
objectAtIndex:
x
]],
theEncapFormat
]];
objectAtIndex:
x
]],
theEncapFormat
];
if
(
[[
NSFileManager
defaultManager
]
fileExistsAtPath
:
\
tempString
]
)
{
/* we don't wanna overwrite existing files, so add an
* int to the file-name */
int
additionalInt
=
0
;
while
(
additionalInt
<
100
)
{
tempString
=
[
NSString
stringWithFormat
:
@"%@%@.%i.%@"
,
[
o_t7_fld_filePath
stringValue
],
[[
NSFileManager
defaultManager
]
displayNameAtPath
:
[[
o_userSelections
objectForKey
:
@"pathToStrm"
]
objectAtIndex:
x
]],
additionalInt
,
theEncapFormat
];
if
(
!
[[
NSFileManager
defaultManager
]
\
fileExistsAtPath
:
tempString
]
)
break
;
additionalInt
+=
1
;
}
if
(
additionalInt
>=
100
)
msg_Err
(
VLCIntf
,
"your destination folder is "
\
"cluttered with files with the same name. "
\
"clean up a bit and try again."
);
}
[
tempArray
addObject
:
[
tempString
retain
]];
x
+=
1
;
}
[
o_userSelections
setObject
:
[
NSArray
arrayWithArray
:
tempArray
]
forKey:
@"trnscdFilePath"
];
[
tempArray
release
];
[
tempString
release
];
}
else
{
/* we don't need to check for existing items because Cocoa
* does that already when we are asking the user for a location
* to save her file */
[
o_userSelections
setObject
:
[
NSArray
arrayWithObject
:
\
[
o_t7_fld_filePath
stringValue
]]
forKey
:
@"trnscdFilePath"
];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment