Changeset 28627

Show
Ignore:
Timestamp:
14.11.2013 16:09:39 (6 years ago)
Author:
ak19
Message:

Related to the previous commit. Displaying the apple symbol instead of the word apple for the Mac modifier key for editing cmd shortcuts.

Location:
main/trunk/gli/src/org/greenstone/gatherer
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/gems/GEMS.java

    r28626 r28627  
    447447        edit = new JMenu(); 
    448448        edit.setText(Dictionary.get("Menu.Edit")); 
    449         String modkey = Utility.isMac() ? "apple" : "ctrl"; 
     449 
     450        String modkey = "ctrl"; 
     451        if(Utility.isMac()) { // on Mac, we now use the Apple key instead of Ctrl for GLI/GEMS edit shortcuts 
     452        char appleKeyCodepoint = 0x2318; // applekey symbol unicode codepoint: U+2318 (\u2318) 
     453        String appleKeySymbol = String.valueOf(appleKeyCodepoint); 
     454        modkey = appleKeySymbol; 
     455        } 
     456 
    450457        edit_cut = new JMenuItem(Dictionary.get("Menu.Edit_Cut", modkey)); 
    451458        edit_cut.addActionListener(this); 
  • main/trunk/gli/src/org/greenstone/gatherer/gui/MenuBar.java

    r28626 r28627  
    162162    edit.setText(Dictionary.get("Menu.Edit")); 
    163163    edit.setComponentOrientation(Dictionary.getOrientation()); 
    164         String modkey = Utility.isMac() ? "apple" : "ctrl"; 
     164 
     165    String modkey = "ctrl"; 
     166    if(Utility.isMac()) { // on Mac, we now use the Apple key instead of Ctrl for GLI/GEMS edit shortcuts 
     167        char appleKeyCodepoint = 0x2318; // applekey symbol unicode codepoint: U+2318 (\u2318) 
     168        String appleKeySymbol = String.valueOf(appleKeyCodepoint); 
     169        modkey = appleKeySymbol; 
     170    } 
     171 
    165172    edit_cut = new JMenuItem(Dictionary.get("Menu.Edit_Cut", modkey)); 
    166173    edit_cut.addActionListener(Gatherer.g_man);