Skip to content

Commit

Permalink
check empty image
Browse files Browse the repository at this point in the history
  • Loading branch information
miyako committed Apr 30, 2024
1 parent aca94e4 commit 4756e67
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 33 deletions.
40 changes: 22 additions & 18 deletions Workspace Services/4DPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,24 +603,28 @@ void DOCK_Get_badge_label(sLONG_PTR *pResult, PackagePtr pParams)
void DOCK_SET_ICON(sLONG_PTR *pResult, PackagePtr pParams)
{
PA_Picture p = *(PA_Picture *)(pParams[0]);
CGImageRef cgImage = (CGImageRef)PA_CreateNativePictureForScreen(p);
NSImage *iconImage = [[NSImage alloc]initWithCGImage:cgImage size:NSZeroSize];

if(iconImage)
{
if((iconImage.size.width) && (iconImage.size.height))
{
[[NSApplication sharedApplication]setApplicationIconImage:iconImage];
}else
{
[[NSApplication sharedApplication]setApplicationIconImage:nil];
}
[iconImage release];
}else
{
[[NSApplication sharedApplication]setApplicationIconImage:nil];
}
CFRelease(cgImage);
if(p) {
CGImageRef cgImage = (CGImageRef)PA_CreateNativePictureForScreen(p);
if(cgImage) {
NSImage *iconImage = [[NSImage alloc]initWithCGImage:cgImage size:NSZeroSize];

if(iconImage)
{
if((iconImage.size.width) && (iconImage.size.height))
{
[[NSApplication sharedApplication]setApplicationIconImage:iconImage];
}else
{
[[NSApplication sharedApplication]setApplicationIconImage:nil];
}
[iconImage release];
}else
{
[[NSApplication sharedApplication]setApplicationIconImage:nil];
}
CFRelease(cgImage);
}
}
}

// ---------------------------- Full Screen (QuickTime) ---------------------------
Expand Down
2 changes: 1 addition & 1 deletion Workspace Services/English.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/* Localized versions of Info.plist keys */CFBundleName = "Workspace Services";CFBundleShortVersionString = "1.4.1";CFBundleGetInfoString = "Workspace Services version 1.4.1, Copyright 2023 miyako.";
/* Localized versions of Info.plist keys */CFBundleName = "Workspace Services";CFBundleShortVersionString = "1.4.2";CFBundleGetInfoString = "Workspace Services version 1.4.2, Copyright 2024 miyako.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>22D49</string>
<string>23C64</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
Expand All @@ -21,25 +21,25 @@
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.4.1</string>
<string>1.4.2</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>14B47b</string>
<string></string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>13.0</string>
<string>14.0</string>
<key>DTSDKBuild</key>
<string>22A372</string>
<string>23A334</string>
<key>DTSDKName</key>
<string>macosx13.0</string>
<string>macosx14.0</string>
<key>DTXcode</key>
<string>1410</string>
<string>1501</string>
<key>DTXcodeBuild</key>
<string>14B47b</string>
<string>15A507</string>
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
</dict>
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<dict>
<key>hash</key>
<data>
gPKoDHhtLXhfH7eracPpNCxgti8=
5225TqncQ6hMXuJpDttZZMd3Xqg=
</data>
<key>optional</key>
<true/>
Expand Down Expand Up @@ -288,7 +288,7 @@
<dict>
<key>hash2</key>
<data>
9Y/j/QfQde/kZjKosQmvfEJ/zWVAZYc1pn+NU4mckGY=
65AsxAJrmqBngo57FMK6H45oh3r6W+aL3DcDbu84C4E=
</data>
<key>optional</key>
<true/>
Expand Down
Binary file modified Workspace Services/Workspace Services.dmg
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if test \"$CONFIGURATION\" == 'Deployment'; then\n\n USER_NAME=keisuke.miyako@4d.com\n UUID=`uuidgen | tr -d - | tr -d '\\n' | tr '[:upper:]' '[:lower:]'`\n DEVELOPER_ID=`security find-identity -p codesigning -v | egrep 'Developer ID Application[^\"]+' -o`\n PRODUCT_PATH=\"$CODESIGNING_FOLDER_PATH\"\n \n #clean\n xattr -cr \"$PRODUCT_PATH\"\n codesign --remove-signature \"$PRODUCT_PATH\"\n \n #sign\n codesign --verbose --deep --timestamp --force --sign \"$DEVELOPER_ID\" \"$PRODUCT_PATH\"\n \n #archive\n DMG_PATH=\"$PROJECT_DIR/$PRODUCT_NAME.dmg\"\n ZIP_PATH=\"$PROJECT_DIR/$PRODUCT_NAME.zip\" #for windows\n rm -f \"$DMG_PATH\"\n hdiutil create -format UDBZ -plist -srcfolder \"$PRODUCT_PATH\" \"$DMG_PATH\"\n rm -f \"$ZIP_PATH\"\n ditto -c -k --keepParent \"$PRODUCT_PATH\" \"$ZIP_PATH\"\n \n xcrun notarytool submit \"$ZIP_PATH\" --keychain-profile \"notarytool\" --wait\n xcrun notarytool submit \"$DMG_PATH\" --keychain-profile \"notarytool\" --wait\n \n xcrun stapler staple \"$DMG_PATH\"\n\nelse\n echo \"No notarization performed as this is not a release build.\"\nfi\n\n";
shellScript = "if test \"$CONFIGURATION\" == 'Deployment'; then\n\n USER_NAME=keisuke.miyako@4d.com\n UUID=`uuidgen | tr -d - | tr -d '\\n' | tr '[:upper:]' '[:lower:]'`\n DEVELOPER_ID=`security find-identity -p codesigning -v | egrep 'Developer ID Application[^\"]+' -o`\n PRODUCT_PATH=\"$CODESIGNING_FOLDER_PATH\"\n \n #clean\n xattr -cr \"$PRODUCT_PATH\"\n codesign --remove-signature \"$PRODUCT_PATH\"\n \n #sign\n codesign --verbose --deep --timestamp --force --sign \"Developer ID Application: keisuke miyako (Y69CWUC25B)\" \"$PRODUCT_PATH\"\n \n #archive\n DMG_PATH=\"$PROJECT_DIR/$PRODUCT_NAME.dmg\"\n ZIP_PATH=\"$PROJECT_DIR/$PRODUCT_NAME.zip\" #for windows\n rm -f \"$DMG_PATH\"\n hdiutil create -format UDBZ -plist -srcfolder \"$PRODUCT_PATH\" \"$DMG_PATH\"\n rm -f \"$ZIP_PATH\"\n ditto -c -k --keepParent \"$PRODUCT_PATH\" \"$ZIP_PATH\"\n \n xcrun notarytool submit \"$ZIP_PATH\" --keychain-profile \"notarytool\" --wait\n xcrun notarytool submit \"$DMG_PATH\" --keychain-profile \"notarytool\" --wait\n \n xcrun stapler staple \"$DMG_PATH\"\n\nelse\n echo \"No notarization performed as this is not a release build.\"\nfi\n\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down Expand Up @@ -446,7 +446,7 @@
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1.4.1;
CURRENT_PROJECT_VERSION = 1.4.2;
DEBUGGING_SYMBOLS = YES;
DEPLOYMENT_LOCATION = NO;
DEVELOPMENT_TEAM = Y69CWUC25B;
Expand Down Expand Up @@ -493,7 +493,7 @@
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 1.4.1;
CURRENT_PROJECT_VERSION = 1.4.2;
DEPLOYMENT_LOCATION = NO;
DEVELOPMENT_TEAM = Y69CWUC25B;
FRAMEWORK_SEARCH_PATHS = "";
Expand Down Expand Up @@ -536,7 +536,7 @@
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1.4.1;
CURRENT_PROJECT_VERSION = 1.4.2;
DEPLOYMENT_LOCATION = NO;
DEVELOPMENT_TEAM = Y69CWUC25B;
FRAMEWORK_SEARCH_PATHS = "";
Expand Down
Binary file not shown.
Binary file modified Workspace Services/Workspace Services.zip
Binary file not shown.

0 comments on commit 4756e67

Please sign in to comment.