This renames "Load" to "Open" and switches Ctrl-L to Ctrl-O for the default platforms. This may break the workflow for those used to it, but will make it actually work for everyone else like me who would just expect the default behavior. Add some more standard shortcuts where available. If they replace the existing shortcuts they would have the same value in my case.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -1361,21 +1361,22 @@ ConfigMainWindow::ConfigMainWindow(void) · 1360 unmodified lines | ||
| 1361 | 1361 | configList->setFocus(); |
| 1362 | 1362 | |
| 1363 | 1363 | backAction = new QAction(QPixmap(xpm_back), "Back", this); |
| 1364 | + backAction->setShortcut(QKeySequence::Back); | |
| 1364 | 1365 | connect(backAction, &QAction::triggered, |
| 1365 | 1366 | this, &ConfigMainWindow::goBack); |
| 1366 | 1367 | |
| 1367 | 1368 | QAction *quitAction = new QAction("&Quit", this); |
| 1368 | − quitAction->setShortcut(Qt::CTRL | Qt::Key_Q); | |
| 1369 | + quitAction->setShortcut(QKeySequence::Quit); | |
| 1369 | 1370 | connect(quitAction, &QAction::triggered, |
| 1370 | 1371 | this, &ConfigMainWindow::close); |
| 1371 | 1372 | |
| 1372 | − QAction *loadAction = new QAction(QPixmap(xpm_load), "&Load", this); | |
| 1373 | − loadAction->setShortcut(Qt::CTRL | Qt::Key_L); | |
| 1373 | + QAction *loadAction = new QAction(QPixmap(xpm_load), "&Open", this); | |
| 1374 | + loadAction->setShortcut(QKeySequence::Open); | |
| 1374 | 1375 | connect(loadAction, &QAction::triggered, |
| 1375 | 1376 | this, &ConfigMainWindow::loadConfig); |
| 1376 | 1377 | |
| 1377 | 1378 | saveAction = new QAction(QPixmap(xpm_save), "&Save", this); |
| 1378 | − saveAction->setShortcut(Qt::CTRL | Qt::Key_S); | |
| 1379 | + saveAction->setShortcut(QKeySequence::Save); | |
| 1379 | 1380 | connect(saveAction, &QAction::triggered, |
| 1380 | 1381 | this, &ConfigMainWindow::saveConfig); |
| 1381 | 1382 | |
| @@ -1384,10 +1385,11 @@ ConfigMainWindow::ConfigMainWindow(void) · 2 unmodified lines | ||
| 1384 | 1385 | configname = conf_get_configname(); |
| 1385 | 1386 | |
| 1386 | 1387 | QAction *saveAsAction = new QAction("Save &As...", this); |
| 1388 | + saveAsAction->setShortcut(QKeySequence::SaveAs); | |
| 1387 | 1389 | connect(saveAsAction, &QAction::triggered, |
| 1388 | 1390 | this, &ConfigMainWindow::saveConfigAs); |
| 1389 | 1391 | QAction *searchAction = new QAction("&Find", this); |
| 1390 | − searchAction->setShortcut(Qt::CTRL | Qt::Key_F); | |
| 1392 | + searchAction->setShortcut(QKeySequence::Find); | |
| 1391 | 1393 | connect(searchAction, &QAction::triggered, |
| 1392 | 1394 | this, &ConfigMainWindow::searchConfig); |
| 1393 | 1395 | singleViewAction = new QAction(QPixmap(xpm_single_view), "Single View", this); |