Bug 109271 - cant "Save As" picture opened from http url in Konqueror
Summary: cant "Save As" picture opened from http url in Konqueror
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Showfoto-Save (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-18 20:39 UTC by Wilbert Berendsen
Modified: 2022-02-05 05:01 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wilbert Berendsen 2005-07-18 20:39:48 UTC
Version:           0.2.0 (using KDE 3.4.1, Gentoo)
Compiler:          gcc version 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)
OS:                Linux (i686) release 2.6.11-gentoo-r1

I opened a picture from an non-writable http location in showFoto. As expected, I could not hit Save, as the site does not permit that.

But: the option "Save As" is greyed out, so I could not in any way save the image I had already edited!

Expected result: never disable the "Save As" function, as long as an image is loaded.
Comment 1 Tom Albers 2005-08-21 23:44:56 UTC
SVN commit 451822 by toma:

The state of the menu's was checked while loading the images, but that is not sufficient. At the end of the constructor we now check if all menu items are active which should be active.
BUGS: 109271


 M  +17 -3     showfoto.cpp  
 M  +1 -0      showfoto.h  


--- trunk/extragear/graphics/digikam/showfoto/showfoto.cpp #451821:451822
@@ -188,8 +188,14 @@
     if ( urlList.isEmpty() )
     {
        toggleActions(false);
+       toggleNavigation(0);
        QTimer::singleShot(0, this, SLOT(slotOpenFile()));
     }
+    else
+    {
+       toggleNavigation(1);
+       toggleActions(true);
+    }
 }
 
 ShowFoto::~ShowFoto()
@@ -883,19 +889,26 @@
 
     setCaption(i18n("Showfoto - %1").arg(m_currentItem->url().directory()));
 
-    if (m_bar->countItems() == 1) {
+    toggleNavigation( index );
+}
+
+
+void ShowFoto::toggleNavigation(const int index)
+{
+    if ( m_bar->countItems() == 0 || m_bar->countItems() == 1 ) {
         m_backAction->setEnabled(false);
         m_forwardAction->setEnabled(false);
         m_firstAction->setEnabled(false);
         m_lastAction->setEnabled(false);
     }
-    else {
+    else 
+    {
         m_backAction->setEnabled(true);
         m_forwardAction->setEnabled(true);
         m_firstAction->setEnabled(true);
         m_lastAction->setEnabled(true);
     }
-
+    
     if (index == 1) {
         m_backAction->setEnabled(false);
         m_firstAction->setEnabled(false);
@@ -907,6 +920,7 @@
     }
 }
 
+
 void ShowFoto::slotAutoFit()
 {
     bool checked = m_zoomFitAction->isChecked();
--- trunk/extragear/graphics/digikam/showfoto/showfoto.h #451821:451822
@@ -115,6 +115,7 @@
     bool promptUserSave();
     bool save();
     void toggleActions(bool val);
+    void toggleNavigation(const int index);
     void loadPlugins();
     void unLoadPlugins();