Lines 23-32
Link Here
|
23 |
|
23 |
|
24 |
package com.panayotis.jubler.options; |
24 |
package com.panayotis.jubler.options; |
25 |
|
25 |
|
|
|
26 |
/* |
26 |
import com.apple.eawt.Application; |
27 |
import com.apple.eawt.Application; |
27 |
import com.apple.eawt.ApplicationAdapter; |
28 |
import com.apple.eawt.ApplicationAdapter; |
28 |
import com.apple.eawt.ApplicationEvent; |
29 |
import com.apple.eawt.ApplicationEvent; |
29 |
|
30 |
*/ |
30 |
|
31 |
|
31 |
import static com.panayotis.jubler.i18n.I18N._; |
32 |
import static com.panayotis.jubler.i18n.I18N._; |
32 |
|
33 |
|
Lines 68-80
Link Here
|
68 |
return OS.toLowerCase().indexOf("linux") >= 0; |
69 |
return OS.toLowerCase().indexOf("linux") >= 0; |
69 |
} |
70 |
} |
70 |
|
71 |
|
|
|
72 |
/* |
71 |
private static boolean isWindows() { |
73 |
private static boolean isWindows() { |
72 |
return OS.toLowerCase().indexOf("windows") >= 0; |
74 |
return OS.toLowerCase().indexOf("windows") >= 0; |
73 |
} |
75 |
} |
|
|
76 |
|
74 |
private static boolean isMacOSX() { |
77 |
private static boolean isMacOSX() { |
75 |
return OS.toLowerCase().indexOf("mac") >= 0; |
78 |
return OS.toLowerCase().indexOf("mac") >= 0; |
76 |
} |
79 |
} |
77 |
|
80 |
*/ |
78 |
public static int getSliderLOffset() { |
81 |
public static int getSliderLOffset() { |
79 |
return 7; |
82 |
return 7; |
80 |
} |
83 |
} |
Lines 120-128
Link Here
|
120 |
if (!isLinux()) { |
123 |
if (!isLinux()) { |
121 |
fontconfig = ""; |
124 |
fontconfig = ""; |
122 |
} |
125 |
} |
|
|
126 |
/* |
123 |
if (isWindows()) { |
127 |
if (isWindows()) { |
124 |
fontname = "c:\\Windows\\fonts\\arial.ttf"; |
128 |
fontname = "c:\\Windows\\fonts\\arial.ttf"; |
125 |
} |
129 |
} |
|
|
130 |
*/ |
126 |
return "%p -slave -identify -ontop -utf8 -noquiet -nofs "+fontconfig+"-subfont-autoscale 0 -volstep 10"+ |
131 |
return "%p -slave -identify -ontop -utf8 -noquiet -nofs "+fontconfig+"-subfont-autoscale 0 -volstep 10"+ |
127 |
" -sub %s -ss %t -geometry +%x+%y -font "+fontname+" -subfont-text-scale %z %v"; |
132 |
" -sub %s -ss %t -geometry +%x+%y -font "+fontname+" -subfont-text-scale %z %v"; |
128 |
} |
133 |
} |
Lines 137-155
Link Here
|
137 |
|
142 |
|
138 |
|
143 |
|
139 |
public static void hideSystemMenus(Jubler jub, JMenu about, JMenuItem prefs, JMenuItem quit) { |
144 |
public static void hideSystemMenus(Jubler jub, JMenu about, JMenuItem prefs, JMenuItem quit) { |
|
|
145 |
/* |
140 |
if (isMacOSX()) { |
146 |
if (isMacOSX()) { |
141 |
jub.JublerMenuBar.getMenu(0).remove(prefs); |
147 |
jub.JublerMenuBar.getMenu(0).remove(prefs); |
142 |
jub.JublerMenuBar.getMenu(0).remove(quit); |
148 |
jub.JublerMenuBar.getMenu(0).remove(quit); |
143 |
jub.JublerMenuBar.remove(about); |
149 |
jub.JublerMenuBar.remove(about); |
144 |
} |
150 |
} |
|
|
151 |
*/ |
145 |
} |
152 |
} |
146 |
|
153 |
|
147 |
|
154 |
|
148 |
public static void initApplication() { |
155 |
public static void initApplication() { |
149 |
/* In Linux this is a dummy function */ |
156 |
/* In Linux this is a dummy function */ |
|
|
157 |
/* |
150 |
if (isMacOSX()) { |
158 |
if (isMacOSX()) { |
151 |
JublerApp japp = new JublerApp(); |
159 |
JublerApp japp = new JublerApp(); |
152 |
} |
160 |
} |
|
|
161 |
*/ |
153 |
} |
162 |
} |
154 |
|
163 |
|
155 |
|
164 |
|
Lines 157-162
Link Here
|
157 |
return 4; |
166 |
return 4; |
158 |
} |
167 |
} |
159 |
public static String getKeyMods(boolean [] mods) { |
168 |
public static String getKeyMods(boolean [] mods) { |
|
|
169 |
/* |
160 |
if (isMacOSX()) { |
170 |
if (isMacOSX()) { |
161 |
StringBuffer res = new StringBuffer(); |
171 |
StringBuffer res = new StringBuffer(); |
162 |
if (mods[0]) res.append("\u2318"); |
172 |
if (mods[0]) res.append("\u2318"); |
Lines 166-171
Link Here
|
166 |
if (res.length()>0) res.append(' '); |
176 |
if (res.length()>0) res.append(' '); |
167 |
return res.toString(); |
177 |
return res.toString(); |
168 |
} |
178 |
} |
|
|
179 |
*/ |
169 |
|
180 |
|
170 |
StringBuffer res = new StringBuffer(); |
181 |
StringBuffer res = new StringBuffer(); |
171 |
if (mods[0]) res.append("+Meta"); |
182 |
if (mods[0]) res.append("+Meta"); |
Lines 180-186
Link Here
|
180 |
} |
191 |
} |
181 |
|
192 |
|
182 |
public static int getDefaultKeyModifier() { |
193 |
public static int getDefaultKeyModifier() { |
183 |
if (isMacOSX()) return 0; |
194 |
//if (isMacOSX()) return 0; |
184 |
return 2; |
195 |
return 2; |
185 |
} |
196 |
} |
186 |
|
197 |
|
Lines 188-194
Link Here
|
188 |
|
199 |
|
189 |
|
200 |
|
190 |
|
201 |
|
191 |
|
202 |
/* |
192 |
class JublerApp extends Application { |
203 |
class JublerApp extends Application { |
193 |
public JublerApp() { |
204 |
public JublerApp() { |
194 |
setEnabledPreferencesMenu(true); |
205 |
setEnabledPreferencesMenu(true); |
Lines 215-217
Link Here
|
215 |
event.setHandled(false); |
226 |
event.setHandled(false); |
216 |
} |
227 |
} |
217 |
} |
228 |
} |
|
|
229 |
*/ |