Группа :: Система/Библиотеки
Пакет: qt4
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: qt-4.0.1-qmenubar-key_f10.patch
diff -Naur qt-x11-opensource-src-4.0.1-orig/src/gui/widgets/qmenubar.cpp qt-x11-opensource-src-4.0.1/src/gui/widgets/qmenubar.cpp
--- qt-x11-opensource-src-4.0.1-orig/src/gui/widgets/qmenubar.cpp 2005-08-16 12:41:11 +0400
+++ qt-x11-opensource-src-4.0.1/src/gui/widgets/qmenubar.cpp 2005-10-22 21:29:38 +0400
@@ -1137,6 +1137,24 @@
}
}
+ // Sergey A. Sukiyazov <sukiyazov@mail.ru>
+ // Make behavior like Gtk2 applications. Activate first menu in menubar (if present)
+ // by pressing F10 or Super_L/R (Win_L/R)
+ if(event->type()==QEvent::KeyRelease) {
+ QKeyEvent *kev = static_cast<QKeyEvent*>(event);
+
+ if(kev->key() == Qt::Key_Super_L || kev->key() == Qt::Key_Super_R || kev->key() == Qt::Key_F10) {
+ QAction *act = d->actionList.at(0);
+
+ if (act) {
+ d->setCurrentAction(act);
+ if(act->menu()) {
+ d->popupAction(act, true);
+ }
+ }
+ }
+ }
+
return false;
}