Skip to content

Commit

Permalink
Merge branch 'develop' into release/1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
infeo committed Aug 14, 2024
2 parents ca08725 + 68934bb commit 37fc8b6
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.cryptomator.linux.autostart.FreedesktopAutoStartService;
import org.cryptomator.linux.keychain.KDEWalletKeychainAccess;
import org.cryptomator.linux.keychain.SecretServiceKeychainAccess;
import org.cryptomator.linux.quickaccess.DolphinPlaces;
import org.cryptomator.linux.quickaccess.NautilusBookmarks;
import org.cryptomator.linux.revealpath.DBusSendRevealPathService;
import org.cryptomator.linux.tray.AppindicatorTrayMenuController;
Expand All @@ -22,7 +23,8 @@
provides KeychainAccessProvider with SecretServiceKeychainAccess, KDEWalletKeychainAccess;
provides RevealPathService with DBusSendRevealPathService;
provides TrayMenuController with AppindicatorTrayMenuController;
provides QuickAccessService with NautilusBookmarks;
provides QuickAccessService with NautilusBookmarks, DolphinPlaces;

opens org.cryptomator.linux.tray to org.cryptomator.integrations.api;
opens org.cryptomator.linux.quickaccess to org.cryptomator.integrations.api;
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* Implemenation of the {@link QuickAccessService} for KDE desktop environments using Dolphin file browser.
*/
@DisplayName("KDE Dolphin Places")
@CheckAvailability
@OperatingSystem(OperatingSystem.Value.LINUX)
@Priority(90)
public class DolphinPlaces implements QuickAccessService {
Expand All @@ -39,13 +40,13 @@ public class DolphinPlaces implements QuickAccessService {
private static final Path TMP_FILE = Path.of(System.getProperty("java.io.tmpdir"), "user-places.xbel.cryptomator.tmp");
private static final Lock MODIFY_LOCK = new ReentrantLock();
private static final String ENTRY_TEMPLATE = """
<bookmark href="%s">
<bookmark href=\"%s\">
<title>%s</title>
<info>
<metadata owner="http://freedesktop.org">
<metadata owner=\"http://freedesktop.org\">
<bookmark:icon name="drive-harddisk-encrypted"/>
</metadata>
<metadata owner="https://cryptomator.org">
<metadata owner=\"https://cryptomator.org\">
<id>%s</id>
</metadata>
</info>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
org.cryptomator.linux.quickaccess.NautilusBookmarks
org.cryptomator.linux.quickaccess.NautilusBookmarks
org.cryptomator.linux.quickaccess.DolphinPlaces
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package org.cryptomator.linux.quickaccess;

import org.cryptomator.integrations.common.IntegrationsLoader;
import org.cryptomator.integrations.quickaccess.QuickAccessService;
import org.cryptomator.integrations.quickaccess.QuickAccessServiceException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
Expand All @@ -11,6 +14,16 @@

public class DolphinPlacesIT {

@Test
@DisplayName("If dolphin is installed, isSupported returns true and service is contained in the service provider stream")
@Disabled
public void testSupport() {
Assertions.assertTrue(DolphinPlaces.isSupported());

var optionalService = IntegrationsLoader.loadAll(QuickAccessService.class).filter(s -> s.getClass().getName().equals("org.cryptomator.linux.quickaccess.DolphinPlaces")).findAny();
Assertions.assertTrue(optionalService.isPresent());
}

@Test
@DisplayName("Adds for 20s an entry to the Dolphin sidebar")
@Disabled
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package org.cryptomator.linux.quickaccess;

import org.cryptomator.integrations.common.IntegrationsLoader;
import org.cryptomator.integrations.quickaccess.QuickAccessService;
import org.cryptomator.integrations.quickaccess.QuickAccessServiceException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
Expand All @@ -11,6 +14,16 @@

public class NautilusBookmarksIT {

@Test
@DisplayName("If nautilus is installed, isSupported returns true and service is contained in the service provider stream")
@Disabled
public void testSupport() {
Assertions.assertTrue(NautilusBookmarks.isSupported());

var optionalService = IntegrationsLoader.loadAll(QuickAccessService.class).filter(s -> s.getClass().getName().equals("org.cryptomator.linux.quickaccess.NautilusBookmarks")).findAny();
Assertions.assertTrue(optionalService.isPresent());
}

@Test
@DisplayName("Adds for 20s an entryto the Nautilus sidebar")
@Disabled
Expand Down

0 comments on commit 37fc8b6

Please sign in to comment.