Summary: | Keyboard shortcuts don't work in full-screen mode. | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Michał Kosmulski <michal> |
Component: | Usability-Keyboard | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.5.0 | |
Sentry Crash Report: |
Description
Michał Kosmulski
2004-10-17 22:10:22 UTC
CVS commit by pahlibar: plug and unplug the imageguiclient actions when the imageviewer goes in and out of fullscreen. this is needed, because the toolbar gets hidden in fullscreen mode (when user chooses so) and none of the keyboard shortcut events reach the toolbar actions CCMAIL: 91552-done@bugs.kde.org M +60 -6 imagewindow.cpp 1.46 M +5 -0 imagewindow.h 1.23 --- kdeextragear-3/digikam/utilities/imageeditor/imagewindow.cpp #1.45:1.46 @@ -130,6 +130,6 @@ ImageWindow::ImageWindow() // -- Some Accels not available from actions ------------- - KAccel* accel = new KAccel(this); - accel->insert("Exit fullscreen", i18n("Exit fullscreen"), + m_accel = new KAccel(this); + m_accel->insert("Exit fullscreen", i18n("Exit fullscreen"), i18n("Exit out of the fullscreen mode"), Key_Escape, this, SLOT(slotEscapePressed()), @@ -893,4 +893,22 @@ void ImageWindow::slotToggleFullScreen() } + // -- remove the imageguiclient action accels ---- + + unplugActionAccel(m_guiClient->m_navNextAction); + unplugActionAccel(m_guiClient->m_navPrevAction); + unplugActionAccel(m_guiClient->m_navFirstAction); + unplugActionAccel(m_guiClient->m_navLastAction); + unplugActionAccel(m_guiClient->m_saveAction); + unplugActionAccel(m_guiClient->m_saveAsAction); + unplugActionAccel(m_guiClient->m_zoomPlusAction); + unplugActionAccel(m_guiClient->m_zoomMinusAction); + unplugActionAccel(m_guiClient->m_zoomFitAction); + unplugActionAccel(m_guiClient->m_cropAction); + unplugActionAccel(m_guiClient->m_fileprint); + unplugActionAccel(m_guiClient->m_fileproperties); + unplugActionAccel(m_guiClient->m_fileDelete); + unplugActionAccel(m_guiClient->m_exifinfo); + unplugActionAccel(m_guiClient->m_commentedit); + m_fullScreen = false; } @@ -911,4 +929,22 @@ void ImageWindow::slotToggleFullScreen() } + // -- Insert all the imageguiclient actions into the accel -- + + plugActionAccel(m_guiClient->m_navNextAction); + plugActionAccel(m_guiClient->m_navPrevAction); + plugActionAccel(m_guiClient->m_navFirstAction); + plugActionAccel(m_guiClient->m_navLastAction); + plugActionAccel(m_guiClient->m_saveAction); + plugActionAccel(m_guiClient->m_saveAsAction); + plugActionAccel(m_guiClient->m_zoomPlusAction); + plugActionAccel(m_guiClient->m_zoomMinusAction); + plugActionAccel(m_guiClient->m_zoomFitAction); + plugActionAccel(m_guiClient->m_cropAction); + plugActionAccel(m_guiClient->m_fileprint); + plugActionAccel(m_guiClient->m_fileproperties); + plugActionAccel(m_guiClient->m_fileDelete); + plugActionAccel(m_guiClient->m_exifinfo); + plugActionAccel(m_guiClient->m_commentedit); + showFullScreen(); m_fullScreen = true; @@ -946,4 +982,22 @@ void ImageWindow::closeEvent(QCloseEvent } +void ImageWindow::plugActionAccel(KAction* action) +{ + if (!action) + return; + + m_accel->insert(action->text(), + action->text(), + action->whatsThis(), + action->shortcut(), + action, + SLOT(activate())); +} + +void ImageWindow::unplugActionAccel(KAction* action) +{ + m_accel->remove(action->text()); +} + void ImageWindow::slotImagePluginsHelp() { --- kdeextragear-3/digikam/utilities/imageeditor/imagewindow.h #1.22:1.23 @@ -36,4 +36,6 @@ class QPopupMenu; class QLabel; +class KAccel; +class KAction; class ImageGUIClient; @@ -66,4 +68,5 @@ private: Canvas* m_canvas; QPopupMenu* m_contextMenu; + KAccel* m_accel; QLabel* m_nameLabel; @@ -91,4 +94,6 @@ private: void saveSettings(); void promptUserSave(); + void plugActionAccel(KAction* action); + void unplugActionAccel(KAction* action); signals: |