Bug 91552 - Keyboard shortcuts don't work in full-screen mode.
Summary: Keyboard shortcuts don't work in full-screen mode.
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-Keyboard (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-17 22:10 UTC by Michał Kosmulski
Modified: 2022-01-02 14:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.5.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Kosmulski 2004-10-17 22:10:22 UTC
Version:           0.7 beta 1 (using KDE KDE 3.3.0)
Compiler:          gcc 3.3.4 
OS:                Linux

In fullscreen mode, keyboard shortcuts neccessary for zooming (A, Shift++, Shift+-) do not work. This is a big inconvenience, since if a user chooses to not show the toolbar in fullscreen mode, there is no way to enlarge a part of the image without leaving fullscreen mode.
Comment 1 Renchi Raju 2004-10-18 06:49:51 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: