@@ -31,7 +31,6 @@ public class AppindicatorTrayMenuController implements TrayMenuController {
3131 private static final Arena ARENA = Arena .global ();
3232 private MemorySegment indicator ;
3333 private MemorySegment menu = gtk_menu_new ();
34- private Optional <String > svgSourcePath ;
3534
3635 @ CheckAvailability
3736 public static boolean isAvailable () {
@@ -48,9 +47,9 @@ public void showTrayIcon(Consumer<TrayIconLoader> iconLoader, Runnable runnable,
4847
4948 private void showTrayIconWithSVG (String s ) {
5049 try (var arena = Arena .ofConfined ()) {
51- svgSourcePath = Optional . ofNullable ( System .getProperty (SVG_SOURCE_PROPERTY ) );
50+ var svgSourcePath = System .getProperty (SVG_SOURCE_PROPERTY );
5251 // flatpak
53- if (svgSourcePath . isEmpty () ) {
52+ if (svgSourcePath != null ) {
5453 indicator = app_indicator_new (arena .allocateUtf8String (APP_INDICATOR_ID ),
5554 arena .allocateUtf8String (s ),
5655 APP_INDICATOR_CATEGORY_APPLICATION_STATUS ());
@@ -60,7 +59,7 @@ private void showTrayIconWithSVG(String s) {
6059 arena .allocateUtf8String (s ),
6160 APP_INDICATOR_CATEGORY_APPLICATION_STATUS (),
6261 // find tray icons theme in mounted AppImage / installed on system by ppa
63- arena .allocateUtf8String (svgSourcePath . get () ));
62+ arena .allocateUtf8String (svgSourcePath ));
6463 }
6564 }
6665 }
@@ -105,7 +104,7 @@ private void addChildren(MemorySegment menu, List<TrayMenuItem> items) {
105104 }
106105 gtk_menu_shell_append (menu , gtkMenuItem );
107106 }
108- case SeparatorItem separatorItem -> {
107+ case SeparatorItem _ -> {
109108 var gtkSeparator = gtk_menu_item_new ();
110109 gtk_menu_shell_append (menu , gtkSeparator );
111110 }
0 commit comments