Skip to content

Commit 9b8082f

Browse files
committed
Code improvements and changes
Discussion: #22 (review)
1 parent be4da36 commit 9b8082f

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ Linux-specific implemenations of the [integrations-api](https://github.com/crypt
44
# Config
55

66
This project uses the following JVM properties:
7-
* `cryptomator.integrationsLinux.appIndicator.svgSource` - specifies the path from which the svg images are loaded
7+
* `cryptomator.integrationsLinux.trayIconsDir` - specifies the directory from which svg images for the tray icon are loaded
88

src/main/java/org/cryptomator/linux/tray/AppindicatorTrayMenuController.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
@OperatingSystem(OperatingSystem.Value.LINUX)
2929
public class AppindicatorTrayMenuController implements TrayMenuController {
3030
private static final String APP_INDICATOR_ID = "org.cryptomator.Cryptomator";
31-
private static final String SVG_SOURCE_PROPERTY = "cryptomator.integrationsLinux.appIndicator.svgSource";
31+
private static final String SVG_SOURCE_PROPERTY = "cryptomator.integrationsLinux.trayIconsDir";
3232

3333
private static final SegmentScope SCOPE = SegmentScope.global();
3434
private MemorySegment indicator;
@@ -58,18 +58,11 @@ private void showTrayIconWithSVG(String s) {
5858
APP_INDICATOR_CATEGORY_APPLICATION_STATUS());
5959
// AppImage and ppa
6060
} else {
61-
var appdir = System.getenv("APPDIR");
62-
if (null == appdir || appdir.isBlank()) {
63-
appdir = "";
64-
}
65-
if (appdir.endsWith("/")) {
66-
appdir = StringUtils.chop(appdir);
67-
}
6861
indicator = app_indicator_new_with_path(arena.allocateUtf8String(APP_INDICATOR_ID),
6962
arena.allocateUtf8String(s),
7063
APP_INDICATOR_CATEGORY_APPLICATION_STATUS(),
7164
// find tray icons theme in mounted AppImage / installed on system by ppa
72-
arena.allocateUtf8String(appdir + svgSourcePath.get()));
65+
arena.allocateUtf8String(svgSourcePath.get()));
7366
}
7467
}
7568
}

0 commit comments

Comments
 (0)