Skip to content

Commit 7f6551b

Browse files
committed
Minor formatting and cosmetic changes, bumping to v5.6.0 in documentation
1 parent dd87783 commit 7f6551b

11 files changed

Lines changed: 28 additions & 41 deletions

File tree

Application/IconController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ - (IBAction)switchIcons:(id)sender {
183183

184184
- (void)updateIcnsStatus {
185185
// Show question mark if icon file is missing
186-
if ([self hasIconFile] && [FILEMGR fileExistsAtPath:_icnsFilePath] == FALSE) {
186+
if ([self hasIconFile] && [FILEMGR fileExistsAtPath:_icnsFilePath] == NO) {
187187
NSImage *qmarkIcon = [WORKSPACE iconForFileType:NSFileTypeForHFSTypeCode(kQuestionMarkIcon)];
188188
[qmarkIcon setSize:NSMakeSize(128, 128)];
189189
[iconImageView setImage:qmarkIcon];

Application/PlatypusWindowController.m

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,8 @@ - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filenam
195195
NSString *fileType = [WORKSPACE typeOfFile:filename error:nil];
196196
if ([filename hasSuffix:PROGRAM_PROFILE_SUFFIX] || [WORKSPACE type:fileType conformsToType:PROGRAM_PROFILE_UTI]) {
197197
return [profilesController loadProfileAtPath:filename];
198-
} else {
199-
[self loadScript:filename];
200198
}
199+
[self loadScript:filename];
201200
return YES;
202201
}
203202

@@ -237,7 +236,7 @@ - (NSString *)createNewScript:(NSString *)scriptText {
237236
if ([appName isEqualToString:@""]) {
238237
appName = NEW_SCRIPT_FILENAME;
239238
}
240-
239+
241240
NSString *tmpScriptPath = [NSString stringWithFormat:@"%@%@%@", PROGRAM_TEMPDIR_PATH, appName, suffix];
242241

243242
// Increment digit appended to script name until no script with that name exists at path
@@ -354,9 +353,7 @@ - (IBAction)createButtonPressed:(id)sender {
354353
[sPanel setPrompt:@"Create"];
355354
[sPanel setAccessoryView:debugSaveOptionView];
356355
[sPanel setNameFieldStringValue:defaultAppBundleName];
357-
358-
// Configure controls in the accessory view
359-
356+
360357
// Optimize nib is on by default if ibtool is present
361358
BOOL ibtoolInstalled = [FILEMGR fileExistsAtPath:IBTOOL_PATH];
362359
if ([[DEFAULTS objectForKey:DefaultsKey_StripNib] boolValue] == YES && ibtoolInstalled == NO) {
@@ -734,7 +731,6 @@ - (void)loadScript:(NSString *)scriptPath {
734731
#pragma mark - Interface actions
735732

736733
- (void)controlTextDidChange:(NSNotification *)aNotification {
737-
738734
// App name or script path was changed
739735
if (aNotification == nil || [aNotification object] == nil || [aNotification object] == appNameTextField || [aNotification object] == scriptPathTextField) {
740736

Application/Resources/Platypus-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@
445445
<key>CFBundleSignature</key>
446446
<string>????</string>
447447
<key>CFBundleVersion</key>
448-
<string>1345</string>
448+
<string>1347</string>
449449
<key>LSApplicationCategoryType</key>
450450
<string>public.app-category.developer-tools</string>
451451
<key>LSMinimumSystemVersion</key>

Application/SettingsController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ - (void)setIconForEditorMenuItemAtIndex:(NSInteger)index {
102102
NSImage *icon = [[NSApp applicationIconImage] copy];
103103
[icon setSize:smallIconSize];
104104
[menuItem setImage:icon];
105-
} else if ([[menuItem title] isEqualToString:@"Select..."] == FALSE) {
105+
} else if ([[menuItem title] isEqualToString:@"Select..."] == NO) {
106106
NSImage *icon;
107107
NSString *appPath = [WORKSPACE fullPathForApplication:[menuItem title]];
108108
if (appPath) {

Application/UniformTypeListController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ - (BOOL)tableView:(NSTableView *)tv acceptDrop:(id <NSDraggingInfo> )info row:(N
5656
for (NSString *filePath in draggedFiles) {
5757
BOOL isDir;
5858
[[NSFileManager defaultManager] fileExistsAtPath:filePath isDirectory:&isDir];
59-
if (isDir && ([WORKSPACE isFilePackageAtPath:filePath] == FALSE)) {
59+
if (isDir && ([WORKSPACE isFilePackageAtPath:filePath] == NO)) {
6060
[self addItem:(NSString *)kUTTypeFolder];
6161
} else {
6262
NSString *uti = [WORKSPACE typeOfFile:filePath error:nil];

CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Platypus Version History
22

3-
### For 5.6.0 - 25/03/2026
3+
### For 5.6.0 - 28/04/2026
44

55
* Various minor bug fixes
66

CLT/platypus_clt.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ int main(int argc, const char *argv[]) {
269269

270270
// warn if file doesn't seem to be icns
271271
NSString *fileType = [ws typeOfFile:iconPath error:nil];
272-
if ([ws type:fileType conformsToType:(NSString *)kUTTypeAppleICNS] == FALSE) {
272+
if ([ws type:fileType conformsToType:(NSString *)kUTTypeAppleICNS] == NO) {
273273
NSPrintErr(@"Warning: '%@' does not appear to be an Apple .icns file.", iconPath);
274274
}
275275
}
@@ -293,7 +293,7 @@ int main(int argc, const char *argv[]) {
293293

294294
// warn if file doesn't seem to be icns
295295
NSString *fileType = [ws typeOfFile:iconPath error:nil];
296-
if ([ws type:fileType conformsToType:(NSString *)kUTTypeAppleICNS] == FALSE) {
296+
if ([ws type:fileType conformsToType:(NSString *)kUTTypeAppleICNS] == NO) {
297297
NSPrintErr(@"Warning: '%@' is not an .icns file.", iconPath);
298298
}
299299
}

Documentation/Documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<img style="float: right; margin-left: 30px; margin-bottom: 20px;" width="128" height="128" src="images/platypus.png" align="right">
22

3-
# Documentation for Platypus 5.5.0
3+
# Documentation for Platypus 5.6.0
44

55
Last updated on November 27th, 2025 by [Sveinbjorn Thordarson](mailto:sveinbjorn@sveinbjorn.org). The latest version of this document can be found [here](https://sveinbjorn.org/platypus_documentation).
66

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Platypus is free, open source software and has been continuously developed
5050
and maintained for over 20 years. **If you find this program useful,
5151
please [make a donation](https://sveinbjorn.org/donations).**
5252

53-
* **[⬇ Download Platypus 5.5.0](https://sveinbjorn.org/files/software/platypus.zip)**
53+
* **[⬇ Download Platypus 5.6.0](https://sveinbjorn.org/files/software/platypus.zip)**
5454
(~3.5 MB, Universal ARM/Intel 64-bit app, macOS 11 or later, Developer ID signed and notarized)
5555

5656
## Links
@@ -99,8 +99,8 @@ The resulting application bundle is created in the `products` directory.
9999
## Installing command line tool in CI environment
100100

101101
```bash
102-
curl -L -O https://github.com/sveinbjornt/Platypus/releases/download/v5.5.0/platypus5.5.0.zip
103-
unzip -q platypus5.5.0.zip
102+
curl -L -O https://github.com/sveinbjornt/Platypus/releases/download/v5.6.0/platypus5.6.0.zip
103+
unzip -q platypus5.6.0.zip
104104
cd Platypus.app/Contents/Resources
105105
sudo bash InstallCommandLineTool.sh
106106
```

ScriptExec/SEController.m

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ - (void)awakeFromNib {
176176
forEventClass:kInternetEventClass
177177
andEventID:kAEGetURL];
178178

179-
180179
// Listen for terminate notification
181180
NSString *notificationName = NSTaskDidTerminateNotification;
182181
if (execStyle == PlatypusExecStyle_Authenticated) {
@@ -365,17 +364,17 @@ - (void)loadAppSettings {
365364
if (acceptsFiles || acceptsText) {
366365
isDroppable = TRUE;
367366
}
368-
367+
369368
acceptAnyDroppedItem = NO;
370369
acceptDroppedFolders = NO;
371-
370+
372371
// If app is droppable, the AppSettings.plist contains list of accepted file types / suffixes
373372
// We use them later as a criterion for drop acceptance
374373
if (acceptsFiles) {
375374
// Get list of accepted suffixes
376375
droppableSuffixes = [NSArray array];
377376
droppableUniformTypes = [NSArray array];
378-
377+
379378
if (appSettings[AppSpecKey_Suffixes]) {
380379
droppableSuffixes = [appSettings[AppSpecKey_Suffixes] copy];
381380
}
@@ -460,7 +459,7 @@ - (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentN
460459
- (void)application:(NSApplication *)theApplication openFiles:(NSArray *)filenames {
461460
DLog(@"Received openFiles event for files: %@", [filenames description]);
462461

463-
if (hasTaskRun == FALSE && commandLineArguments != nil) {
462+
if (hasTaskRun == NO && commandLineArguments != nil) {
464463
for (NSString *filePath in filenames) {
465464
if ([commandLineArguments containsObject:filePath]) {
466465
return;
@@ -530,7 +529,6 @@ - (void)windowWillClose:(NSNotification *)notification {
530529

531530
// Set up any menu items, windows, controls at application launch
532531
- (void)initialiseInterface {
533-
534532
// Put application name into the relevant menu items
535533
[quitMenuItem setTitle:[NSString stringWithFormat:@"Quit %@", appName]];
536534
[aboutMenuItem setTitle:[NSString stringWithFormat:@"About %@", appName]];
@@ -551,8 +549,8 @@ - (void)initialiseInterface {
551549
// Script output will be dumped in outputTextView
552550
// By default this is the Text Window text view
553551
outputTextView = textWindowTextView;
554-
555-
if (runInBackground == TRUE) {
552+
553+
if (runInBackground == YES) {
556554
// Old Carbon way
557555
// ProcessSerialNumber process;
558556
// GetCurrentProcess(&process);
@@ -746,13 +744,11 @@ - (void)prepareInterfaceForExecution {
746744
[dropletMessageTextField setStringValue:@"Processing..."];
747745
}
748746
break;
749-
750747
}
751748
}
752749

753750
// Adjust controls, windows, etc. once script is done executing
754751
- (void)cleanupInterface {
755-
756752
// if there are any remnants, we append them to output
757753
if (remnants != nil) {
758754
[self appendString:remnants];
@@ -767,7 +763,7 @@ - (void)cleanupInterface {
767763

768764
}
769765
break;
770-
766+
771767
case PlatypusInterfaceType_TextWindow:
772768
{
773769
// Update controls for text window
@@ -822,7 +818,6 @@ - (void)cleanupInterface {
822818

823819
// Construct arguments list etc. before actually running the script
824820
- (void)prepareForExecution {
825-
826821
// Clear arguments list and reconstruct it
827822
[arguments removeAllObjects];
828823

@@ -849,7 +844,7 @@ - (void)prepareForExecution {
849844
// Finally, dequeue job and add arguments
850845
if ([jobQueue count] > 0) {
851846
SEJob *job = jobQueue[0];
852-
847+
853848
// We have files in the queue, to append as arguments
854849
// We take the first job's arguments and put them into the arg list
855850
if ([job arguments]) {
@@ -884,7 +879,6 @@ - (void)executeScript {
884879
}
885880

886881
- (NSString *)executeScriptForStatusMenu {
887-
888882
[self prepareForExecution];
889883
[self prepareInterfaceForExecution];
890884

@@ -893,7 +887,7 @@ - (NSString *)executeScriptForStatusMenu {
893887
[task setLaunchPath:interpreterPath];
894888
[task setCurrentDirectoryPath:[[NSBundle mainBundle] resourcePath]];
895889
[task setArguments:arguments];
896-
890+
897891
outputPipe = [NSPipe pipe];
898892
[task setStandardOutput:outputPipe];
899893
[task setStandardError:outputPipe];
@@ -911,7 +905,6 @@ - (NSString *)executeScriptForStatusMenu {
911905

912906
// Launch regular user-privileged process using NSTask
913907
- (void)executeScriptWithoutPrivileges {
914-
915908
// Create task and apply settings
916909
task = [[NSTask alloc] init];
917910
[task setLaunchPath:interpreterPath];
@@ -1200,7 +1193,7 @@ - (void)clearOutputBuffer {
12001193

12011194
- (void)appendString:(NSString *)string {
12021195
DLog(@"Appending output: \"%@\"", string);
1203-
1196+
12041197
if (interfaceType == PlatypusInterfaceType_None) {
12051198
fprintf(stderr, "%s\n", [string cStringUsingEncoding:DEFAULT_TEXT_ENCODING]);
12061199
return;
@@ -1222,7 +1215,6 @@ - (void)appendString:(NSString *)string {
12221215

12231216
// Run open panel, made available to apps that accept files
12241217
- (IBAction)openFiles:(id)sender {
1225-
12261218
// Create open panel
12271219
NSOpenPanel *oPanel = [NSOpenPanel openPanel];
12281220
[oPanel setAllowsMultipleSelection:YES];
@@ -1320,7 +1312,6 @@ - (IBAction)saveToFile:(id)sender {
13201312
}
13211313

13221314
- (BOOL)validateMenuItem:(NSMenuItem *)anItem {
1323-
13241315
// Status item menus are always enabled
13251316
if (interfaceType == PlatypusInterfaceType_StatusMenu) {
13261317
return YES;
@@ -1486,7 +1477,6 @@ - (BOOL)addMenuItemSelectedJob:(NSString *)menuItemTitle {
14861477
*********************************************/
14871478

14881479
- (BOOL)isAcceptableFileType:(NSString *)file {
1489-
14901480
// Check if it's a folder. If so, we only accept it if folders are accepted
14911481
BOOL isDir;
14921482
BOOL exists = [FILEMGR fileExistsAtPath:file isDirectory:&isDir];
@@ -1659,7 +1649,6 @@ - (NSImage *)imageForMenuItemFromString:(NSString *)str {
16591649
**************************************************/
16601650

16611651
- (void)menuNeedsUpdate:(NSMenu *)menu {
1662-
16631652
// Run script and wait until we've received all output
16641653
NSString *outputStr = [self executeScriptForStatusMenu];
16651654

0 commit comments

Comments
 (0)