From 38e4ff5602ea97b3ec557c0a941b0996fb78993f Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Wed, 1 May 2013 14:34:00 +0300 Subject: [PATCH] fixed text editor --- .../FileAssociationManager.java | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/main/java/eu/svjatoslav/instantlauncher/FileAssociationManager.java b/src/main/java/eu/svjatoslav/instantlauncher/FileAssociationManager.java index f6741b5..68f8a91 100755 --- a/src/main/java/eu/svjatoslav/instantlauncher/FileAssociationManager.java +++ b/src/main/java/eu/svjatoslav/instantlauncher/FileAssociationManager.java @@ -8,12 +8,41 @@ import eu.svjatoslav.commons.gui.dialog.ExceptionDialog; public class FileAssociationManager { - private static final String TEXT_EDITOR = "gd"; + private static final String TEXT_EDITOR = "scribes"; private static final String FILE_INDICATOR = ""; public static HashMap extensionToApplication = new HashMap(); + public FileAssociationManager() { + + extensionToApplication.put("txt", new String[] { TEXT_EDITOR, FILE_INDICATOR }); + extensionToApplication.put("xml", new String[] { TEXT_EDITOR, FILE_INDICATOR }); + extensionToApplication.put("properties", new String[] { TEXT_EDITOR, FILE_INDICATOR }); + extensionToApplication.put("ini", new String[] { TEXT_EDITOR, FILE_INDICATOR }); + extensionToApplication.put("", new String[] { TEXT_EDITOR, FILE_INDICATOR }); + + extensionToApplication.put("jpg", new String[] { "eog", FILE_INDICATOR }); + extensionToApplication.put("jpeg", new String[] { "eog", FILE_INDICATOR }); + extensionToApplication.put("png", new String[] { "eog", FILE_INDICATOR }); + + extensionToApplication.put("pdf", new String[] { "evince", FILE_INDICATOR }); + + extensionToApplication.put("mp3", new String[] { "banshee", FILE_INDICATOR }); + extensionToApplication.put("ogg", new String[] { "banshee", FILE_INDICATOR }); + + extensionToApplication.put("avi", new String[] { "vlc", FILE_INDICATOR }); + extensionToApplication.put("mkv", new String[] { "vlc", FILE_INDICATOR }); + extensionToApplication.put("ogv", new String[] { "vlc", FILE_INDICATOR }); + extensionToApplication.put("mp4", new String[] { "vlc", FILE_INDICATOR }); + extensionToApplication.put("flv", new String[] { "vlc", FILE_INDICATOR }); + extensionToApplication.put("wmv", new String[] { "vlc", FILE_INDICATOR }); + + extensionToApplication.put("ods", new String[] { "localc", FILE_INDICATOR }); + extensionToApplication.put("docx", new String[] { "lowriter", FILE_INDICATOR }); + + } + public static boolean openFile(final File file) { final String fileExtension = Utils.getFileExtension(file); @@ -48,33 +77,4 @@ public class FileAssociationManager { } - public FileAssociationManager() { - - extensionToApplication.put("txt", new String[] { TEXT_EDITOR, FILE_INDICATOR }); - extensionToApplication.put("xml", new String[] { TEXT_EDITOR, FILE_INDICATOR }); - extensionToApplication.put("properties", new String[] { TEXT_EDITOR, FILE_INDICATOR }); - extensionToApplication.put("ini", new String[] { TEXT_EDITOR, FILE_INDICATOR }); - extensionToApplication.put("", new String[] { TEXT_EDITOR, FILE_INDICATOR }); - - extensionToApplication.put("jpg", new String[] { "eog", FILE_INDICATOR }); - extensionToApplication.put("jpeg", new String[] { "eog", FILE_INDICATOR }); - extensionToApplication.put("png", new String[] { "eog", FILE_INDICATOR }); - - extensionToApplication.put("pdf", new String[] { "evince", FILE_INDICATOR }); - - extensionToApplication.put("mp3", new String[] { "banshee", FILE_INDICATOR }); - extensionToApplication.put("ogg", new String[] { "banshee", FILE_INDICATOR }); - - extensionToApplication.put("avi", new String[] { "vlc", FILE_INDICATOR }); - extensionToApplication.put("mkv", new String[] { "vlc", FILE_INDICATOR }); - extensionToApplication.put("ogv", new String[] { "vlc", FILE_INDICATOR }); - extensionToApplication.put("mp4", new String[] { "vlc", FILE_INDICATOR }); - extensionToApplication.put("flv", new String[] { "vlc", FILE_INDICATOR }); - extensionToApplication.put("wmv", new String[] { "vlc", FILE_INDICATOR }); - - extensionToApplication.put("ods", new String[] { "localc", FILE_INDICATOR }); - extensionToApplication.put("docx", new String[] { "lowriter", FILE_INDICATOR }); - - } - } -- 2.20.1