View | Details | Raw Unified
Collapse All | Expand All

(-) Jubler-3.0.0/src/com/panayotis/jubler/information/HelpBrowser.java (-1 / +1 lines)
 Lines 31-37    Link Here 
        
        
        history = new ArrayList<String>();
        history = new ArrayList<String>();
        
        
        String initpage = "file:"+SystemFileFinder.getJublerAppPath()+"/help/jubler-faq.html";
        String initpage = "file:"+SystemFileFinder.getJublerAppPath()+"/../help/jubler-faq.html";
        setPage(initpage);
        setPage(initpage);
        history.add(initpage);
        history.add(initpage);
        
        
(-) Jubler-3.0.0/src/com/panayotis/jubler/os/SystemDependent.java (-8 / +20 lines)
 Lines 23-31    Link Here 
package com.panayotis.jubler.os;
package com.panayotis.jubler.os;
/*
import com.apple.eawt.Application;
import com.apple.eawt.Application;
import com.apple.eawt.ApplicationAdapter;
import com.apple.eawt.ApplicationAdapter;
import com.apple.eawt.ApplicationEvent;
import com.apple.eawt.ApplicationEvent;
*/
import static com.panayotis.jubler.i18n.I18N._;
import static com.panayotis.jubler.i18n.I18N._;
 Lines 50-55    Link Here 
        OS = props.getProperty("os.name").toLowerCase();
        OS = props.getProperty("os.name").toLowerCase();
    }
    }
    
    
    /*
    private static boolean isLinux() {
    private static boolean isLinux() {
        return OS.toLowerCase().indexOf("linux") >= 0;
        return OS.toLowerCase().indexOf("linux") >= 0;
    }
    }
 Lines 60-65    Link Here 
    private static boolean isMacOSX() {
    private static boolean isMacOSX() {
        return OS.toLowerCase().indexOf("mac") >= 0;
        return OS.toLowerCase().indexOf("mac") >= 0;
    }
    }
    */
    
    
    public static int getSliderLOffset() {
    public static int getSliderLOffset() {
        return 7;
        return 7;
 Lines 73-78    Link Here 
    public static String getDefaultMPlayerArgs() {
    public static String getDefaultMPlayerArgs() {
        String fontconfig = "-fontconfig ";
        String fontconfig = "-fontconfig ";
        String fontname = "%f";
        String fontname = "%f";
        /*
        if (!isLinux()) {
        if (!isLinux()) {
            fontconfig = "";
            fontconfig = "";
            if (isWindows()) {
            if (isWindows()) {
 Lines 81-93    Link Here 
                fontname = "%j/lib/freesans.ttf";
                fontname = "%j/lib/freesans.ttf";
            }
            }
        }
        }
        */
        return "%p -slave -identify -ontop -utf8 -noquiet -nofs "+fontconfig+"-subfont-autoscale 0 -volstep 10"+
        return "%p -slave -identify -ontop -utf8 -noquiet -nofs "+fontconfig+"-subfont-autoscale 0 -volstep 10"+
                " -sub %s -ss %t -geometry +%x+%y -font "+fontname+" -subfont-text-scale %z  %v";
                " -sub %s -ss %t -geometry +%x+%y -font "+fontname+" -subfont-text-scale %z  %v";
    }
    }
    
    
    /* Force ASpell to use UTF-8 encoding - broken on Windows */
    /* Force ASpell to use UTF-8 encoding - broken on Windows */
    public static boolean forceASpellEncoding() {
    public static boolean forceASpellEncoding() {
        return !isWindows();
        return true;
    }
    }
    
    
    public static String getRealExecFilename( String fname ) {
    public static String getRealExecFilename( String fname ) {
 Lines 99-117    Link Here 
    
    
    
    
    public static void hideSystemMenus(JMenuItem about, JMenuItem prefs, JMenuItem quit) {
    public static void hideSystemMenus(JMenuItem about, JMenuItem prefs, JMenuItem quit) {
        /*
        if (isMacOSX()) {
        if (isMacOSX()) {
            about.setVisible(false);
            about.setVisible(false);
            prefs.setVisible(false);
            prefs.setVisible(false);
            quit.setVisible(false);
            quit.setVisible(false);
        }
        }
        */
    }
    }
    
    
    
    
    public static void initApplication() {
    public static void initApplication() {
        /* In Linux this is a dummy function */
        /* In Linux this is a dummy function
        if (isMacOSX()) {
        if (isMacOSX()) {
            JublerApp japp = new JublerApp();
            JublerApp japp = new JublerApp();
        }
        }*/
    }
    }
    
    
    
    
 Lines 119-124    Link Here 
        return 4;
        return 4;
    }
    }
    public static String getKeyMods(boolean [] mods) {
    public static String getKeyMods(boolean [] mods) {
        /*
        if (isMacOSX()) {
        if (isMacOSX()) {
            StringBuffer res = new StringBuffer();
            StringBuffer res = new StringBuffer();
            if (mods[0]) res.append("\u2318");
            if (mods[0]) res.append("\u2318");
 Lines 128-133    Link Here 
            if (res.length()>0) res.append(' ');
            if (res.length()>0) res.append(' ');
            return res.toString();
            return res.toString();
        }
        }
        */
        
        
        StringBuffer res = new StringBuffer();
        StringBuffer res = new StringBuffer();
        if (mods[0]) res.append("+Meta");
        if (mods[0]) res.append("+Meta");
 Lines 142-165    Link Here 
    }
    }
    
    
    public static int getDefaultKeyModifier() {
    public static int getDefaultKeyModifier() {
        if (isMacOSX()) return 0;
        //if (isMacOSX()) return 0;
        return 2;
        return 2;
    }
    }
    
    
    public static String getCanonicalFilename(String filename) {
    public static String getCanonicalFilename(String filename) {
        if (isWindows()) return filename.toLowerCase()+".exe";
        //if (isWindows()) return filename.toLowerCase()+".exe";
        return filename.toLowerCase();
        return filename.toLowerCase();
    }
    }
    
    
    public static void openURL(String url) {
    public static void openURL(String url) {
        try {
        try {
            if (isMacOSX()) {
            /*if (isMacOSX()) {
                Class fileMgr = Class.forName("com.apple.eio.FileManager");
                Class fileMgr = Class.forName("com.apple.eio.FileManager");
                Method openURL = fileMgr.getDeclaredMethod("openURL", new Class[] {String.class});
                Method openURL = fileMgr.getDeclaredMethod("openURL", new Class[] {String.class});
                openURL.invoke(null, new Object[] {url});
                openURL.invoke(null, new Object[] {url});
            } else if (isWindows())
            } else if (isWindows())
                Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
                Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
            else { //assume Unix or Linux
            else {*/ //assume Unix or Linux
                String[] browsers = {
                String[] browsers = {
                    "firefox", "konqueror", "opera", "epiphany", "mozilla", "netscape" };
                    "firefox", "konqueror", "opera", "epiphany", "mozilla", "netscape" };
                String browser = null;
                String browser = null;
 Lines 171-177    Link Here 
                    throw new Exception("Could not find web browser");
                    throw new Exception("Could not find web browser");
                else
                else
                    Runtime.getRuntime().exec(new String[] {browser, url});
                    Runtime.getRuntime().exec(new String[] {browser, url});
            }
            //}
        } catch (Exception e) {
        } catch (Exception e) {
            DEBUG.warning("URL selected: " + url);
            DEBUG.warning("URL selected: " + url);
        }
        }
 Lines 182-187    Link Here 
/*
class JublerApp extends Application {
class JublerApp extends Application {
    public JublerApp() {
    public JublerApp() {
        setEnabledPreferencesMenu(true);
        setEnabledPreferencesMenu(true);
 Lines 208-210    Link Here 
        event.setHandled(false);
        event.setHandled(false);
    }
    }
}
}
*/
(-) Jubler-3.0.0/src/com/panayotis/jubler/os/SystemFileFinder.java (-5 / +5 lines)
 Lines 44-63    Link Here 
    }
    }
    
    
    public static boolean loadLibrary(String name) {
    public static boolean loadLibrary(String name) {
        File libfile = findFile("lib"+pathseparator+System.mapLibraryName(name));
        /*File libfile = findFile("lib"+pathseparator+System.mapLibraryName(name));
        if (libfile!=null) {
        if (libfile!=null) {*/
            try {
            try {
                System.load(libfile.getAbsolutePath());
                System.loadLibrary(name);
                return true;
                return true;
            } catch (UnsatisfiedLinkError e) {
            } catch (UnsatisfiedLinkError e) {
                e.printStackTrace();
                e.printStackTrace();
            }
            }
        }
        //}
        return false;
        return false;
    }
    }
    
    
    public static String getJublerAppPath() {
    public static String getJublerAppPath() {
        File f = findFile("Jubler.jar");
        File f = findFile("jubler.jar");
        if (f==null) f = findFile("Jubler.exe");
        if (f==null) f = findFile("Jubler.exe");
        
        
        if (f!=null) return f.getParent();
        if (f!=null) return f.getParent();