OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 get _accelMask() | 229 get _accelMask() |
230 { | 230 { |
231 let result = this._ctrlMask; | 231 let result = this._ctrlMask; |
232 try { | 232 try { |
233 let accelKey = Utils.prefService.getIntPref("ui.key.accelKey"); | 233 let accelKey = Utils.prefService.getIntPref("ui.key.accelKey"); |
234 if (accelKey == Ci.nsIDOMKeyEvent.DOM_VK_META) | 234 if (accelKey == Ci.nsIDOMKeyEvent.DOM_VK_META) |
235 result = this._metaMask; | 235 result = this._metaMask; |
236 else if (accelKey == Ci.nsIDOMKeyEvent.DOM_VK_ALT) | 236 else if (accelKey == Ci.nsIDOMKeyEvent.DOM_VK_ALT) |
237 result = this._altMask; | 237 result = this._altMask; |
238 } catch(e) {} | 238 } catch(e) {} |
239 this.__defineGetter__("_accelMask", function() result); | 239 Object.defineProperty(this, "_accelMask", {value: result}); |
240 return result; | 240 return result; |
241 }, | 241 }, |
242 | 242 |
243 /** | 243 /** |
244 * Called when a key is pressed on the subscription list. | 244 * Called when a key is pressed on the subscription list. |
245 */ | 245 */ |
246 keyPress: function(/**Event*/ event) | 246 keyPress: function(/**Event*/ event) |
247 { | 247 { |
248 let modifiers = 0; | 248 let modifiers = 0; |
249 if (event.altKey) | 249 if (event.altKey) |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 return; | 597 return; |
598 | 598 |
599 if (event.keyCode == event.DOM_VK_RETURN || event.keyCode == event.DOM_VK_EN
TER) | 599 if (event.keyCode == event.DOM_VK_RETURN || event.keyCode == event.DOM_VK_EN
TER) |
600 { | 600 { |
601 // This shouldn't accept our dialog, only the panel | 601 // This shouldn't accept our dialog, only the panel |
602 event.preventDefault(); | 602 event.preventDefault(); |
603 E("selectSubscriptionAccept").doCommand(); | 603 E("selectSubscriptionAccept").doCommand(); |
604 } | 604 } |
605 } | 605 } |
606 }; | 606 }; |
OLD | NEW |