Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Lock All" option is showing even with all the vaults being locked #3472

Closed
2 tasks done
modernNeo opened this issue Jul 1, 2024 · 6 comments · Fixed by cryptomator/integrations-linux#81
Closed
2 tasks done
Labels
misc:integration misc:tray Component System Tray affected os:linux
Milestone

Comments

@modernNeo
Copy link

Please agree to the following

Summary

"Lock All" option is showing even with all the vaults being locked

What software is involved?

  • Operating System: Debian GNU/Linux 12 (bookworm)
  • Cryptomator: 1.13.0

Volume Type

None

Steps to Reproduce

  1. Running AppImage with /opt/cryptomator-1.13.0-x86_64.AppImage

Expected Behavior

the Lock All option going away when none of the vaults are unlocked, which is what was happening in previous versions.

Actual Behavior

signal-2024-07-01-084120

Reproducibility

Always

Relevant Log Output

No response

Anything else?

No response

@purejava
Copy link
Contributor

purejava commented Jul 1, 2024

Actually it wasn't going away but greyed out, when none of the vaults was unlocked.

I can confirm this issue since the change from AWT to libappindicator on Linux.

@purejava
Copy link
Contributor

purejava commented Jul 1, 2024

This can be fixed here: https://github.com/cryptomator/integrations-linux/blob/7b725185805d74e993cd73d2089325269c726a75/src/main/java/org/cryptomator/linux/tray/AppindicatorTrayMenuController.java#L96-L106

switch (item) {
	case ActionItem a -> {
		var gtkMenuItem = Gtk.newMenuItem();
		Gtk.menuItemSetLabel(gtkMenuItem, a.title());
		GObject.signalConnectObject(gtkMenuItem,
				"activate",
				GCallback.allocate(new ActionItemCallback(a), ARENA),
				menu,
				0);
		Gtk.menuShellAppend(menu, gtkMenuItem);
	}

by adding:

switch (item) {
	case ActionItem a -> {
		var gtkMenuItem = Gtk.newMenuItem();
		Gtk.menuItemSetLabel(gtkMenuItem, a.title());
		GObject.signalConnectObject(gtkMenuItem,
				"activate",
				GCallback.allocate(new ActionItemCallback(a), ARENA),
				menu,
				0);
		if (a.enabled()) {
			gtk_widget_set_sensitive(gtkMenuItem, 1);
		} else {
			gtk_widget_set_sensitive(gtkMenuItem, 0);
		}
		Gtk.menuShellAppend(menu, gtkMenuItem);
	}

which is already available in <artifactId>libayatana-appindicator-java-full</artifactId>, but not yet in <artifactId>libappindicator-gtk3-java-minimal</artifactId>.

I'll add it there as a nice function, taking a boolean as the second parameter instead of an int, release a new version of the bindings and provide a code update for Cryptomator.

@modernNeo
Copy link
Author

@purejava any reason the fix is not merged into the code itself?

@purejava
Copy link
Contributor

purejava commented Jul 2, 2024

Yes. Cryptomator uses the minimal flavor of the appindicator library, which has a smaller file size and results in a smaller Cryptomator package on Linux.

I need to re-generate the minimal flavor of the Java bindings with an added gtk_widget_set_sensitive function.

@infeo
Copy link
Member

infeo commented Jul 4, 2024

Requires a new release of https://github.com/cryptomator/integrations-linux

@infeo infeo added this to the next milestone Jul 4, 2024
@infeo infeo added os:linux misc:integration misc:tray Component System Tray affected labels Jul 4, 2024
@infeo
Copy link
Member

infeo commented Aug 19, 2024

Fixed with commit fb4f9fc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
misc:integration misc:tray Component System Tray affected os:linux
Projects
None yet
4 participants