Skip to content

Commit

Permalink
Merge branch 'release/1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
infeo committed Jul 12, 2023
2 parents 5c7515f + c463221 commit b58ecc6
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 25 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ jobs:
name: artifacts
path: target/*.jar
- name: Create Release
uses: actions/create-release@v1 # NOTE: action is unmaintained and repo archived
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} # release as "cryptobot"
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
prerelease: true
prerelease: true
token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }}
generate_release_notes: true
1 change: 1 addition & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.cryptomator</groupId>
<artifactId>integrations-api</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>

<name>Cryptomator Integrations API</name>
<description>Defines optional service interfaces that may be used by Cryptomator</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/**
* Mount service package
*/
@ApiStatus.Experimental
package org.cryptomator.integrations.mount;

import org.jetbrains.annotations.ApiStatus;
package org.cryptomator.integrations.mount;
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package org.cryptomator.integrations.tray;

import org.jetbrains.annotations.ApiStatus;

/**
* A callback used by the {@link TrayMenuController} to load tray icons in the format required by the implementation.
*/
@ApiStatus.Experimental
sealed public interface TrayIconLoader permits TrayIconLoader.PngData, TrayIconLoader.FreedesktopIconName {

@FunctionalInterface
non-sealed interface PngData extends TrayIconLoader {

/**
* Loads an icon from a byte array holding a loaded PNG file.
*
* @param data png data
*/
void loadPng(byte[] data);
}

@FunctionalInterface
non-sealed interface FreedesktopIconName extends TrayIconLoader {

/**
* Loads an icon by looking it up {@code iconName} inside of {@code $XDG_DATA_DIRS/icons}.
*
* @param iconName the icon name
*/
void lookupByName(String iconName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
import org.cryptomator.integrations.common.IntegrationsLoader;
import org.jetbrains.annotations.ApiStatus;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Optional;
import java.util.function.Consumer;

/**
* Displays a tray icon and menu
Expand All @@ -23,20 +22,20 @@ static Optional<TrayMenuController> get() {
/**
* Displays an icon on the system tray.
*
* @param imageData What image to show
* @param iconLoader A callback responsible for retrieving the icon in the required format
* @param defaultAction Action to perform when interacting with the icon directly instead of its menu
* @param tooltip Text shown when hovering
* @throws TrayMenuException thrown when adding the tray icon failed
*/
void showTrayIcon(byte[] imageData, Runnable defaultAction, String tooltip) throws TrayMenuException;
void showTrayIcon(Consumer<TrayIconLoader> iconLoader, Runnable defaultAction, String tooltip) throws TrayMenuException;

/**
* Updates the icon on the system tray.
*
* @param imageData What image to show
* @param iconLoader A callback responsible for retrieving the icon in the required format
* @throws IllegalStateException thrown when called before an icon has been added
*/
void updateTrayIcon(byte[] imageData);
void updateTrayIcon(Consumer<TrayIconLoader> iconLoader);

/**
* Show the given options in the tray menu.
Expand Down

0 comments on commit b58ecc6

Please sign in to comment.