|
|
| |
package com.panayotis.jubler.options; | package com.panayotis.jubler.options; |
| |
|
/* |
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._; |
| |
|
|
return OS.toLowerCase().indexOf("linux") >= 0; | return OS.toLowerCase().indexOf("linux") >= 0; |
} | } |
| |
|
/* |
private static boolean isWindows() { | private static boolean isWindows() { |
return OS.toLowerCase().indexOf("windows") >= 0; | return OS.toLowerCase().indexOf("windows") >= 0; |
} | } |
|
|
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; |
} | } |
|
|
if (!isLinux()) { | if (!isLinux()) { |
fontconfig = ""; | fontconfig = ""; |
} | } |
|
/* |
if (isWindows()) { | if (isWindows()) { |
fontname = "c:\\Windows\\fonts\\arial.ttf"; | fontname = "c:\\Windows\\fonts\\arial.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"; |
} | } |
|
|
| |
| |
public static void hideSystemMenus(Jubler jub, JMenu about, JMenuItem prefs, JMenuItem quit) { | public static void hideSystemMenus(Jubler jub, JMenu about, JMenuItem prefs, JMenuItem quit) { |
|
/* |
if (isMacOSX()) { | if (isMacOSX()) { |
jub.JublerMenuBar.getMenu(0).remove(prefs); | jub.JublerMenuBar.getMenu(0).remove(prefs); |
jub.JublerMenuBar.getMenu(0).remove(quit); | jub.JublerMenuBar.getMenu(0).remove(quit); |
jub.JublerMenuBar.remove(about); | jub.JublerMenuBar.remove(about); |
} | } |
|
*/ |
} | } |
| |
| |
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(); |
} | } |
|
*/ |
} | } |
| |
| |
|
|
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"); |
|
|
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"); |
|
|
} | } |
| |
public static int getDefaultKeyModifier() { | public static int getDefaultKeyModifier() { |
if (isMacOSX()) return 0; |
//if (isMacOSX()) return 0; |
return 2; | return 2; |
} | } |
| |
|
|
| |
| |
| |
|
/* |
class JublerApp extends Application { | class JublerApp extends Application { |
public JublerApp() { | public JublerApp() { |
setEnabledPreferencesMenu(true); | setEnabledPreferencesMenu(true); |
|
|
event.setHandled(false); | event.setHandled(false); |
} | } |
} | } |
|
*/ |