Skip to content

Commit

Permalink
2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alin23 committed Nov 21, 2023
1 parent 2e121ec commit dd8df2b
Show file tree
Hide file tree
Showing 12 changed files with 87 additions and 57 deletions.
32 changes: 16 additions & 16 deletions Clop.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@
CODE_SIGN_ENTITLEMENTS = FinderOptimiser/FinderOptimiser.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.3.1;
CURRENT_PROJECT_VERSION = 2.4.0;
DEVELOPMENT_TEAM = RDDXV84A73;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
Expand All @@ -879,7 +879,7 @@
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 2.3.1;
MARKETING_VERSION = 2.4.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lowtechguys.Clop.FinderOptimiser;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -896,7 +896,7 @@
CODE_SIGN_ENTITLEMENTS = FinderOptimiser/FinderOptimiser.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.3.1;
CURRENT_PROJECT_VERSION = 2.4.0;
DEVELOPMENT_TEAM = RDDXV84A73;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
Expand All @@ -912,7 +912,7 @@
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 2.3.1;
MARKETING_VERSION = 2.4.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lowtechguys.Clop.FinderOptimiser;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -930,7 +930,7 @@
CODE_SIGN_ENTITLEMENTS = Setapp/Setapp.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.3.1;
CURRENT_PROJECT_VERSION = 2.4.0;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Clop/Preview Content\"";
DEVELOPMENT_TEAM = RDDXV84A73;
Expand All @@ -952,7 +952,7 @@
);
LLVM_LTO = YES_THIN;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 2.3.1;
MARKETING_VERSION = 2.4.0;
OTHER_LDFLAGS = (
"-force_load",
"$(BUILT_PRODUCTS_DIR)/libSetapp.a",
Expand All @@ -974,7 +974,7 @@
CODE_SIGN_ENTITLEMENTS = Setapp/Setapp.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.3.1;
CURRENT_PROJECT_VERSION = 2.4.0;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Clop/Preview Content\"";
DEVELOPMENT_TEAM = RDDXV84A73;
Expand All @@ -996,7 +996,7 @@
);
LLVM_LTO = YES;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 2.3.1;
MARKETING_VERSION = 2.4.0;
OTHER_LDFLAGS = (
"-force_load",
"$(BUILT_PRODUCTS_DIR)/libSetapp.a",
Expand All @@ -1016,7 +1016,7 @@
CODE_SIGN_ENTITLEMENTS = "Setapp/FinderOptimiser-setapp.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.3.1;
CURRENT_PROJECT_VERSION = 2.4.0;
DEVELOPMENT_TEAM = RDDXV84A73;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
Expand All @@ -1031,7 +1031,7 @@
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 2.3.1;
MARKETING_VERSION = 2.4.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.lowtechguys.Clop-setapp.FinderOptimiser";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -1048,7 +1048,7 @@
CODE_SIGN_ENTITLEMENTS = "Setapp/FinderOptimiser-setapp.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.3.1;
CURRENT_PROJECT_VERSION = 2.4.0;
DEVELOPMENT_TEAM = RDDXV84A73;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
Expand All @@ -1063,7 +1063,7 @@
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 2.3.1;
MARKETING_VERSION = 2.4.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.lowtechguys.Clop-setapp.FinderOptimiser";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -1294,7 +1294,7 @@
CODE_SIGN_ENTITLEMENTS = Clop/Clop.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.3.1;
CURRENT_PROJECT_VERSION = 2.4.0;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Clop/Preview Content\"";
DEVELOPMENT_TEAM = RDDXV84A73;
Expand All @@ -1315,7 +1315,7 @@
);
LLVM_LTO = YES_THIN;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 2.3.1;
MARKETING_VERSION = 2.4.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lowtechguys.Clop;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand All @@ -1332,7 +1332,7 @@
CODE_SIGN_ENTITLEMENTS = Clop/Clop.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.3.1;
CURRENT_PROJECT_VERSION = 2.4.0;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Clop/Preview Content\"";
DEVELOPMENT_TEAM = RDDXV84A73;
Expand All @@ -1353,7 +1353,7 @@
);
LLVM_LTO = YES;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 2.3.1;
MARKETING_VERSION = 2.4.0;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = com.lowtechguys.Clop;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<VariablesViewState
version = "1.0">
<ContextStates>
<ContextState
contextName = "LowtechWindow.screenCorner.didset:OSDWindow.swift">
<PersistentStrings>
<PersistentString
value = "screenCorner!">
</PersistentString>
</PersistentStrings>
</ContextState>
</ContextStates>
</VariablesViewState>
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<key>ClopCLI-setapp.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
<integer>3</integer>
</dict>
<key>ClopCLI.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>3</integer>
<integer>4</integer>
</dict>
<key>Example (Playground) 1.xcscheme</key>
<dict>
Expand Down Expand Up @@ -95,12 +95,12 @@
<key>FinderOptimiser-setapp.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>5</integer>
<integer>2</integer>
</dict>
<key>FinderOptimiser.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
<integer>5</integer>
</dict>
<key>Setapp.xcscheme_^#shared#^_</key>
<dict>
Expand Down
2 changes: 2 additions & 0 deletions Clop/ActionButtons.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,12 @@ let SHARING_MANAGER = SharingManager()

struct ShareButton: View {
@ObservedObject var optimiser: Optimiser
@Environment(\.preview) var preview

var body: some View {
Button(
action: {
guard !preview else { return }
optimiser.sharing = true
},
label: { SwiftUI.Image(systemName: "square.and.arrow.up").font(.heavy(9)) }
Expand Down
9 changes: 5 additions & 4 deletions Clop/ClopApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ class AppDelegate: AppDelegateParent {
floatingResultsWindow.animateOnResize = true
pub(.floatingResultsCorner)
.sink {
floatingResultsWindow.screenCorner = $0.newValue
floatingResultsWindow.moveToScreen(.withMouse, corner: $0.newValue)
}
.store(in: &observers)
Expand Down Expand Up @@ -521,10 +522,10 @@ class AppDelegate: AppDelegateParent {

#if !DEBUG
#if SETAPP
_ = checkInternalRequirements([], nil)
_ = checkInternalRequirements2([], nil)
#else
if let product {
_ = checkInternalRequirements([product], nil)
_ = checkInternalRequirements2([product], nil)
}
#endif
#endif
Expand Down Expand Up @@ -628,10 +629,10 @@ class AppDelegate: AppDelegateParent {

#if !DEBUG
#if SETAPP
_ = checkInternalRequirements([], nil)
_ = checkInternalRequirements3([], nil)
#else
if let product {
_ = checkInternalRequirements([product], nil)
_ = checkInternalRequirements3([product], nil)
}
#endif
#endif
Expand Down
31 changes: 15 additions & 16 deletions Clop/CompactResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -700,14 +700,21 @@ struct CompactResultList: View {
.allowsHitTesting(showList)

HStack {
if showList {
CompactActionButtons()
.offset(y: -12)
.opacity(hovering ? 1 : 0)
Spacer()
FlipGroup(if: !floatingResultsCorner.isTrailing) {
if showList, !preview {
if !floatingResultsCorner.isTrailing {
Spacer()
}
CompactActionButtons()
.offset(y: floatingResultsCorner.isTop ? 12 : -12)
.opacity(hovering ? 1 : 0)
if floatingResultsCorner.isTrailing {
Spacer()
}
}
ToggleCompactResultListButton(showList: $showList, badge: optimisers.count.s, progress: progress)
.offset(x: isTrailing ? 10 : -10)
}
ToggleCompactResultListButton(showList: $showList.animation(), badge: optimisers.count.s, progress: progress)
.offset(x: isTrailing ? 10 : -10)
}
.frame(width: size.width, alignment: isTrailing ? .trailing : .leading)
}
Expand All @@ -719,9 +726,7 @@ struct CompactResultList: View {
}
}
.onChange(of: showList) { showList in
compactResultsSizeTask = mainAsyncAfter(ms: showList ? 0 : 500) {
setSize(showList: showList)
}
setSize(showList: showList)
}
.onChange(of: optimisers) { optimisers in
filterOpts(optimisers)
Expand Down Expand Up @@ -778,12 +783,6 @@ struct DragPreview: View {
}
}

var compactResultsSizeTask: DispatchWorkItem? {
didSet {
oldValue?.cancel()
}
}

struct ToggleCompactResultListButton: View {
@Binding var showList: Bool
var badge: String
Expand Down
8 changes: 4 additions & 4 deletions Clop/Images.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ extension UTType {
var aggressiveOptimisation: Bool {
switch self {
case .png:
return Defaults[.useAggresiveOptimisationPNG]
Defaults[.useAggresiveOptimisationPNG]
case .jpeg:
return Defaults[.useAggresiveOptimisationJPEG]
Defaults[.useAggresiveOptimisationJPEG]
case .gif:
return Defaults[.useAggresiveOptimisationGIF]
Defaults[.useAggresiveOptimisationGIF]
default:
return false
false
}
}

Expand Down
2 changes: 1 addition & 1 deletion Clop/Migrations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Defaults
import Foundation
import Lowtech

class Migrations {
enum Migrations {
static func run() {
clopIgnoreMigrate()
}
Expand Down
1 change: 1 addition & 0 deletions Clop/ResolutionField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ struct ResolutionField: View {
.buttonStyle(.bordered)

Button(action: {
guard !preview else { return }
withAnimation(.easeOut(duration: 0.1)) {
savedCropSizes.removeAll(where: { $0.id == size.id })
}
Expand Down
2 changes: 1 addition & 1 deletion Clop/Xattr.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

struct Xattr {
enum Xattr {
/** Error type */
struct Error: Swift.Error {
let localizedDescription = String(utf8String: strerror(errno))
Expand Down
6 changes: 6 additions & 0 deletions ReleaseNotes/2.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@

- **Compact Results** re-styling: better contrast and more visual organization
- Allow *already optimised* files to be dropped for subsequent actions (cropping, downscaling, uploading etc.)
- Create an image pile when dragging them to the drop zone
- Follow *Converted image location* setting for adaptive optimisation on PNG and JPEG
- If `in-place` is selected, PNGs will be **replaced** with JPEGs if smaller, and vice-versa

## Fixes

- Fix app hang when sharing a file
- Fix settings window appearing on NSService action when menubar icon is hidden

## Coming soon..

- Better image compression with `webp` and `avif` outputs
- Raycast extension and Alfred workflow
29 changes: 18 additions & 11 deletions Releases/appcast.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
<?xml version="1.0" standalone="yes"?>
<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
<channel>
<item>
<title>2.4.0</title>
<pubDate>Tue, 21 Nov 2023 15:15:49 +0200</pubDate>
<link>https://lowtechguys.com/clop</link>
<sparkle:fullReleaseNotesLink>https://github.com/FuzzyIdeas/Clop/releases</sparkle:fullReleaseNotesLink>
<sparkle:version>2.4.0</sparkle:version>
<sparkle:shortVersionString>2.4.0</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>13.0</sparkle:minimumSystemVersion>
<sparkle:releaseNotesLink>https://files.lowtechguys.com/ReleaseNotes/Clop-2.4.0.html</sparkle:releaseNotesLink>
<enclosure url="https://files.lowtechguys.com/releases/Clop-2.4.0.dmg" length="84693640" type="application/octet-stream" sparkle:edSignature="icys8bOlskFM5kzTM0fjlBgr2wLcWG0z4JU0sxx+8L98BVtZctMAMn4v+hIdaAt4rk5scjFAXIjB+ggviQhHAg=="/>
<sparkle:deltas>
<enclosure url="https://files.lowtechguys.com/releases/Clop2.4.0-2.3.1.delta" sparkle:deltaFrom="2.3.1" length="1844982" type="application/octet-stream" sparkle:deltaFromSparkleExecutableSize="865120" sparkle:deltaFromSparkleLocales="de,he,ar,el,ja,fa,en" sparkle:edSignature="oNv59BYacwOd864nOgXZ4QiYgAfadOjTBDqlMK1lvavQ0mlLbHrjBTfB3SmSSM7CcQhcGf8BEXYlEbtCK3rfCA=="/>
<enclosure url="https://files.lowtechguys.com/releases/Clop2.4.0-2.3.0.delta" sparkle:deltaFrom="2.3.0" length="1944622" type="application/octet-stream" sparkle:deltaFromSparkleExecutableSize="865120" sparkle:deltaFromSparkleLocales="de,he,ar,el,ja,fa,en" sparkle:edSignature="rKt4D40Q29ncDmdy3v4RhxL0rnR0CLEB1Ykfat3DPP4wVjwW6lQVtMZg3OPhtx8imduGVogNKSdKhBuoHKZxDw=="/>
<enclosure url="https://files.lowtechguys.com/releases/Clop2.4.0-2.2.7.delta" sparkle:deltaFrom="2.2.7" length="2292086" type="application/octet-stream" sparkle:deltaFromSparkleExecutableSize="865120" sparkle:deltaFromSparkleLocales="de,he,ar,el,ja,fa,en" sparkle:edSignature="5POZ04ifirPRXOc/GmILMgEQxHOLrg62YidqktZS6IeDOh/KPjSfKdtNONjcE4re5V7P6sh2TD1oZyp32ZwODw=="/>
<enclosure url="https://files.lowtechguys.com/releases/Clop2.4.0-2.2.6.delta" sparkle:deltaFrom="2.2.6" length="2311478" type="application/octet-stream" sparkle:deltaFromSparkleExecutableSize="865120" sparkle:deltaFromSparkleLocales="de,he,ar,el,ja,fa,en" sparkle:edSignature="n5Jo0Lrs9DzhB+2yRaYaFxX2bHVpxuuKsDmn68GfxNHWEO3FZy/+Pfi03RZpCuBzHco9iHpOOCyRPj8/BEYLDQ=="/>
<enclosure url="https://files.lowtechguys.com/releases/Clop2.4.0-2.2.5.delta" sparkle:deltaFrom="2.2.5" length="2384490" type="application/octet-stream" sparkle:deltaFromSparkleExecutableSize="865120" sparkle:deltaFromSparkleLocales="de,he,ar,el,ja,fa,en" sparkle:edSignature="XnKTjZnop0Dw7WNjjYEEhsSwrA9AMG8at8ePRz4AqqLH+pYPMx7hq7gVsJxmNW1MxITrwjiewIbKCZ4gdLtJDA=="/>
</sparkle:deltas>
</item>
<item>
<title>2.3.1</title>
<pubDate>Tue, 14 Nov 2023 21:26:33 +0200</pubDate>
Expand Down Expand Up @@ -132,16 +150,5 @@
<sparkle:releaseNotesLink>https://files.lowtechguys.com/ReleaseNotes/Clop-2.2.1.html</sparkle:releaseNotesLink>
<enclosure url="https://files.lowtechguys.com/releases/Clop-2.2.1.dmg" length="92860487" type="application/octet-stream" sparkle:edSignature="yO2s1BFNE4TZDp76K4/z8duzHVLXnmIkyJU7orZb+SSX4BmVoYkzlGRCvK3NmZkjaU9W4SjGbCrX0fLZTB3QBw=="/>
</item>
<item>
<title>2.2.0</title>
<pubDate>Sun, 08 Oct 2023 19:38:14 +0300</pubDate>
<link>https://lowtechguys.com/clop</link>
<sparkle:fullReleaseNotesLink>https://github.com/FuzzyIdeas/Clop/releases</sparkle:fullReleaseNotesLink>
<sparkle:version>2.2.0</sparkle:version>
<sparkle:shortVersionString>2.2.0</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>13.0</sparkle:minimumSystemVersion>
<sparkle:releaseNotesLink>https://files.lowtechguys.com/ReleaseNotes/Clop-2.2.0.html</sparkle:releaseNotesLink>
<enclosure url="https://files.lowtechguys.com/releases/Clop-2.2.0.dmg" length="89953953" type="application/octet-stream" sparkle:edSignature="fqRm8y8FnxIeY/X2S6xz5hMEljtpMwFLFxGP6DEp1R2zqd7xUNSRm6aAA36RfJbNG/8/aaMZmNepAyaPhb3JDA=="/>
</item>
</channel>
</rss>

0 comments on commit dd8df2b

Please sign in to comment.