diff --git a/internal_packages/preferences/lib/tabs/preferences-keymaps.cjsx b/internal_packages/preferences/lib/tabs/preferences-keymaps.cjsx index d3c0b731d..a0db6c508 100644 --- a/internal_packages/preferences/lib/tabs/preferences-keymaps.cjsx +++ b/internal_packages/preferences/lib/tabs/preferences-keymaps.cjsx @@ -42,8 +42,7 @@ class PreferencesKeymaps extends React.Component _getStateFromKeymaps: => bindings = {} for [command, label] in DisplayedKeybindings - [found] = atom.keymaps.findKeyBindings(command: command, target: document.body) || [] - bindings[command] = found + bindings[command] = atom.keymaps.findKeyBindings(command: command, target: document.body) || [] bindings render: => @@ -69,19 +68,32 @@ class PreferencesKeymaps extends React.Component _renderBindingFor: ([command, label]) => - description = "None" + descriptions = [] if @state.bindings[command] - {keystrokes} = @state.bindings[command] - description = keystrokes.replace(/-/gi,'').replace(/cmd/gi, '⌘').replace(/alt/gi, '⌥').replace(/shift/gi, '⇧').replace(/ctrl/gi, '^').toUpperCase() + for binding in @state.bindings[command] + descriptions.push(@_formatKeystrokes(binding.keystrokes)) + + if descriptions.length is 0 + value = 'None' + else + value = _.uniq(descriptions).join(', ')
{label}
-
{description}
+
{value}
_renderBindings: => DisplayedKeybindings.map(@_renderBindingFor) + _formatKeystrokes: (keystrokes) -> + if process.platform is 'win32' + # On Windows, display cmd-shift-c + return keystrokes + else + # On Mac and Linux, display ⌘⇧C + return keystrokes.replace(/-/gi,'').replace(/cmd/gi, '⌘').replace(/alt/gi, '⌥').replace(/shift/gi, '⇧').replace(/ctrl/gi, '^').toUpperCase() + _onShowUserKeymaps: => require('shell').openItem(atom.keymaps.getUserKeymapPath()) diff --git a/internal_packages/preferences/stylesheets/preferences.less b/internal_packages/preferences/stylesheets/preferences.less index e8186442a..a28351c9d 100644 --- a/internal_packages/preferences/stylesheets/preferences.less +++ b/internal_packages/preferences/stylesheets/preferences.less @@ -192,7 +192,6 @@ body.platform-darwin { &.shortcut-select { padding: 5px 0px 20px 0px; select { - font-size: @font-size-larger; width: 75%; } } diff --git a/keymaps/templates/Gmail.cson b/keymaps/templates/Gmail.cson index 66e00fca9..b538742bf 100644 --- a/keymaps/templates/Gmail.cson +++ b/keymaps/templates/Gmail.cson @@ -23,3 +23,17 @@ 'e' : 'core:remove-item' # Gmail 's' : 'core:star-item' #Gmail 'x' : 'core:select-item' + +# Gmail also includes some more basic ones that users expect from desktop software. + +'body.platform-darwin': + 'cmd-n' : 'application:new-message' + 'cmd-r' : 'application:reply' + 'cmd-R' : 'application:reply-all' + 'cmd-F' : 'application:forward' + +'body.platform-linux, body.platform-win32': + 'ctrl-n' : 'application:new-message' + 'ctrl-r' : 'application:reply' + 'ctrl-R' : 'application:reply-all' + 'ctrl-F' : 'application:forward' diff --git a/src/react-remote/react-remote-parent.js b/src/react-remote/react-remote-parent.js index 8899afd87..236345cb9 100644 --- a/src/react-remote/react-remote-parent.js +++ b/src/react-remote/react-remote-parent.js @@ -196,7 +196,7 @@ var openWindowForComponent = function(Component, options) { if (!styleNode.sourcePath) { continue; } - if ((styleNode.sourcePath.indexOf("static/index") > 0) || (options.stylesheetRegex && options.stylesheetRegex.test(styleNode.sourcePath))) { + if ((styleNode.sourcePath.indexOf('index') > 0) || (options.stylesheetRegex && options.stylesheetRegex.test(styleNode.sourcePath))) { thinStyles = thinStyles + styleNode.innerText; } }