-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use System default Look And Feel (especially Feel) #2227
Comments
Sebb (migrated from Bugzilla): Unfortunately, the patch does not seem to work for me - most of the changes are rejected. I don't know why that is. Also, there is a Mac-specific change to jmeter.sh - are you sure that won't affect non-Mac Unixes? Can you generate a patch that detects the Mac? |
Frank Caputo (migrated from Bugzilla):
no problem.
for me the patch works: svn co http://svn.apache.org/repos/asf/jakarta/jmeter/tags/v2_3_2 ant compiles fine without errors.
i simply set a system property which is simply ignored on other systems than the mac. |
Sebb (migrated from Bugzilla): I suppose I can just do the replacements manually. If I create a new nightly build with the changes, would you be able to test it out? I don't have a Mac to test on. |
Sebb (migrated from Bugzilla): I think one solution would be to allow the property "jmeter.laf" to have a local system override, e.g. "jmeter.laf.<os.name>" where <os.name> is obtained from the system at run-time. JMeter would look for "jmeter.laf.<os.name>", then "jmeter.laf". This would allow one to change the default just for Macs. What does Java return for os.name on Macs? |
Sebb (migrated from Bugzilla): URL: http://svn.apache.org/viewvc?rev=768370&view=rev These are in the nightly builds starting with r768370. Please can you try it out, and post details of the os.name. |
@milamberspace (migrated from Bugzilla): jmeter.log : Created attachment proposal_patch_update_47064.txt: Patch to work with os.name = "linux" proposal_patch_update_47064.txtIndex: /Workspaces-JMeter/Jmeter/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java
===================================================================
--- /Workspaces-JMeter/Jmeter/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java (revision 768370)
+++ /Workspaces-JMeter/Jmeter/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java (working copy)
@@ -73,8 +73,8 @@
if (laf != null) {
return laf;
}
- String osFamily = osName.substring(0, osName.indexOf(' '));// e.g. windows xp => windows
- laf = JMeterUtils.getProperty(JMETER_LAF+"."+osFamily);
+ String[] osFamily = osName.split("\\s"); // e.g. windows xp => windows
+ laf = JMeterUtils.getProperty(JMETER_LAF+"."+osFamily[0]);
if (laf != null) {
return laf;
}
|
@milamberspace (migrated from Bugzilla): |
Sebb (migrated from Bugzilla): URL: http://svn.apache.org/viewvc?rev=768414&view=rev I'll update the nightly build shortly. I don't think os.name should ever return null ... |
Frank Caputo (migrated from Bugzilla):
Mac OS X returns "Mac OS X" for "os.name". I think you should do something like: -------- code ------------------------------------ // make os.name lower case and replace alt whitespaces with underscores String osLaf = System.getProperty("jmeter.laf." + osName); -------- code ------------------------------------ Here are some interesting links for os.name: I will test the next nightly. |
Sebb (migrated from Bugzilla): I've added the ability to set the LAF to System or CrossPlatform, as well as to individual LAF implementations: URL: http://svn.apache.org/viewvc?rev=770777&view=rev Please re-open if the nightlies after r770777 don't work as expected on a Mac. |
Frank Caputo (migrated from Bugzilla): |
Sebb (migrated from Bugzilla): |
Frank Caputo (Bug 47064):
I patched JMeter to use the system look and feel by default and allow ctrl-click on the mac and use the apple-key for keyboard shortcuts of menu items.
All changes are platform independent.
Instead of KeyEvent.CTRL_DOWN_MASK use Toolkit.getDefaultToolkit().getMenuShortcutKeyMask().
isRightClick also checks e.isPopupTrigger().
attached is the patchfile for 2.3.2.
Created attachment jmeter.diff: svn patch file
OS: All
The text was updated successfully, but these errors were encountered: