Bug 109271

Summary: cant "Save As" picture opened from http url in Konqueror
Product: [Applications] digikam Reporter: Wilbert Berendsen <wbsoft>
Component: Showfoto-SaveAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 7.6.0
Sentry Crash Report:

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();