PreviousWindowInit.js 748 B

123456789101112131415161718192021
  1. function init(basePath) {
  2. var action = new RGuiAction(qsTranslate("PreviousWindow", "&Previous"), RMainWindowQt.getMainWindow());
  3. action.setRequiresDocument(false);
  4. action.setScriptFile(basePath + "/PreviousWindow.js");
  5. action.setIcon(basePath + "/PreviousWindow.svg");
  6. var scs = [];
  7. if (RSettings.getQtVersion()>=0x060000) {
  8. scs.push(new QKeySequence(new QKeyCombination(Qt.ControlModifier, Qt.Key_Left)));
  9. }
  10. else {
  11. scs.push(new QKeySequence(Qt.ControlModifier + Qt.Key_Left));
  12. }
  13. scs.push(new QKeySequence("Ctrl+PgDown"));
  14. action.setDefaultShortcuts(scs);
  15. action.setGroupSortOrder(50200);
  16. action.setSortOrder(200);
  17. action.setWidgetNames(["WindowMenu", "WindowToolBar"]);
  18. }