Experiment with Ubuntu Unity integration

This commit is contained in:
Reinhard Pointner 2017-02-16 00:58:43 +08:00
parent 5706ddbb24
commit 9a784d40d2
3 changed files with 6 additions and 7 deletions

View File

@ -5,6 +5,7 @@ Comment=@{package.synopsis}
MimeType=inode/directory;video/*;audio/*;text/*;
Exec=filebot %F
Icon=filebot
StartupNotify=true
Categories=@{gnome.application.categories}
Actions=Rename;Subtitles;Checksum;
X-Ubuntu-Gettext-Domain=@{package.name}

View File

@ -217,13 +217,11 @@ public class Main {
MacAppUtilities.setDefaultMenuBar(FileBotMenuBar.createHelp());
MacAppUtilities.setOpenFileHandler(openFiles -> SwingEventBus.getInstance().post(new FileTransferable(openFiles)));
} else if (isUbuntuApp()) {
// Ubuntu specific configuration
String options = System.getenv("JAVA_TOOL_OPTIONS");
if (options != null && options.contains("jayatanaag.jar")) {
// menu should be rendered via JAyatana on Ubuntu 15.04 and higher
frame.setJMenuBar(FileBotMenuBar.createHelp());
if ("Unity".equals(System.getenv("XDG_CURRENT_DESKTOP"))) {
frame.setTitle(Settings.getApplicationUserModelID());
} else {
frame.setIconImages(ResourceManager.getApplicationIcons());
}
frame.setIconImages(ResourceManager.getApplicationIcons());
} else if (isWindowsApp()) {
// Windows specific configuration
if (!isAppStore()) {

View File

@ -92,7 +92,7 @@ public final class Settings {
}
public static boolean isUbuntuApp() {
return isApplicationDeployment("snap");
return isApplicationDeployment("deb", "snap");
}
public static boolean isMacApp() {