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/*; MimeType=inode/directory;video/*;audio/*;text/*;
Exec=filebot %F Exec=filebot %F
Icon=filebot Icon=filebot
StartupNotify=true
Categories=@{gnome.application.categories} Categories=@{gnome.application.categories}
Actions=Rename;Subtitles;Checksum; Actions=Rename;Subtitles;Checksum;
X-Ubuntu-Gettext-Domain=@{package.name} X-Ubuntu-Gettext-Domain=@{package.name}

View File

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

View File

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