Only in .: .deps
Only in .: .libs
Only in .: Makefile
Only in .: imlibiface.lo
Only in .: kipiplugin_slideshow.la
diff -u /tmp/kipi-plugins-0.1.2/kipi-plugins/slideshow/plugin_slideshow.cpp ./plugin_slideshow.cpp
--- /tmp/kipi-plugins-0.1.2/kipi-plugins/slideshow/plugin_slideshow.cpp	2006-07-09 01:51:11.000000000 +0200
+++ ./plugin_slideshow.cpp	2007-08-11 14:11:49.000000000 +0200
@@ -168,6 +168,7 @@
     bool    printFileName;
     bool    loop;
     bool    shuffle;
+    bool    autoDelay;
     bool    showSelectedFilesOnly;
     QString effectName;
 
@@ -177,6 +178,7 @@
     printFileName         = config.readBoolEntry("Print Filename");
     loop                  = config.readBoolEntry("Loop");
     shuffle               = config.readBoolEntry("Shuffle");
+    autoDelay             = config.readBoolEntry("AutoDelay");
     showSelectedFilesOnly = config.readBoolEntry("Show Selected Files Only");
     if (!opengl)
         effectName        = config.readEntry("Effect Name");
@@ -226,7 +228,7 @@
 
     if (!opengl) {
         KIPISlideShowPlugin::SlideShow *slideShow =
-            new KIPISlideShowPlugin::SlideShow(fileList, delay, printFileName,
+            new KIPISlideShowPlugin::SlideShow(fileList, autoDelay, delay, printFileName,
                           loop, effectName);
         slideShow->show();
     }
@@ -236,7 +238,7 @@
                                i18n("Sorry. OpenGL support not available on your system"));
         else {
             KIPISlideShowPlugin::SlideShowGL *slideShow =
-                new KIPISlideShowPlugin::SlideShowGL(fileList, delay ,printFileName, loop, effectName);
+                new KIPISlideShowPlugin::SlideShowGL(fileList, autoDelay, delay ,printFileName, loop, effectName);
             slideShow->show();
         }
     }
Only in .: plugin_slideshow.cpp~
Only in .: plugin_slideshow.lo
Only in .: plugin_slideshow.moc
Only in .: slideshow-auto_delay_as_option.patch
diff -u /tmp/kipi-plugins-0.1.2/kipi-plugins/slideshow/slideshow.cpp ./slideshow.cpp
--- /tmp/kipi-plugins-0.1.2/kipi-plugins/slideshow/slideshow.cpp	2006-07-09 01:51:11.000000000 +0200
+++ ./slideshow.cpp	2007-08-11 16:14:46.000000000 +0200
@@ -48,7 +48,7 @@
 /////////////////////////////////////////////////////////////////////////////////////////////////////
 
 SlideShow::SlideShow(const FileList& fileList,
-                     int delay, bool printName, bool loop,
+                     bool autoDelay, int delay, bool printName, bool loop,
                      const QString& effectName)
                      : QWidget(0, 0, WStyle_StaysOnTop | WType_Popup |
                                WX11BypassWM | WDestructiveClose)
@@ -103,6 +103,7 @@
     // --------------------------------------------------
 
     fileList_   = fileList;
+    autoDelay_  = autoDelay;
     delay_      = QMAX(delay, 300); // at least have 0.3 second delay
     loop_       = loop;
     printName_  = printName;
@@ -123,7 +124,22 @@
         }
     }
 
-    timer_->start(10, true);
+    if (!autoDelay_) {
+        loadNextImage();
+
+	if (!currImage_ || fileList_.isEmpty())   
+	{
+	     showEndOfShow();
+	} 
+	else 
+	{
+	    int tmout;
+	    effectRunning_ = true;
+	    tmout = (this->*effect_)(true);
+	    timer_->start(tmout, true);
+	}
+    } else
+        timer_->start(10, true);
 
     // -- hide cursor when not moved --------------------
 
@@ -241,6 +257,9 @@
     }
     else
     {
+        if (!autoDelay_)
+	  return;  
+
         loadNextImage();
 
 	if (!currImage_ || fileList_.isEmpty())   // End of slideshow ?
@@ -1037,44 +1056,76 @@
 
 void SlideShow::slotPause()
 {
-    timer_->stop();
+    if (autoDelay_) {
+        timer_->stop();
 
-    if (toolBar_->isHidden())
-    {
-        int w = toolBar_->width();
-        toolBar_->move(deskWidth_-w-1,0);
-        toolBar_->show();
+        if (toolBar_->isHidden())
+        {
+            int w = toolBar_->width();
+            toolBar_->move(deskWidth_-w-1,0);
+            toolBar_->show();
+	}
     }
 }
 
 void SlideShow::slotPlay()
 {
-    toolBar_->hide();
-    slotTimeOut();
+    if (autoDelay_) {
+        toolBar_->hide();
+	slotTimeOut();
+    }
 }
 
 void SlideShow::slotPrev()
 {
+    int tmout = -1;
+
     loadPrevImage();
     if (!currImage_ || fileList_.isEmpty())   
     {
         showEndOfShow();
         return;
     }
-    effectRunning_ = false;
-    showCurrentImage();
+    if (!autoDelay_) {
+        if (effectName_ == "Random")              // Take a random effect.
+        {
+            effect_ = getRandomEffect();
+            if (!effect_) return;
+        }
+
+        effectRunning_ = true;
+        tmout = (this->*effect_)(true);
+	timer_->start(tmout, true);
+    } else { 
+        effectRunning_ = false;
+	showCurrentImage();
+    }
 }
 
 void SlideShow::slotNext()
 {
+    int tmout = -1;
+
     loadNextImage();
     if (!currImage_ || fileList_.isEmpty())   
     {
         showEndOfShow();
         return;
     }
-    effectRunning_ = false;
-    showCurrentImage();
+    if (!autoDelay_) {
+        if (effectName_ == "Random")              // Take a random effect.
+        {
+            effect_ = getRandomEffect();
+            if (!effect_) return;
+        }
+
+        effectRunning_ = true;
+        tmout = (this->*effect_)(true);
+        timer_->start(tmout, true);
+    } else { 
+       effectRunning_ = false;
+       showCurrentImage();
+    }
 }
 
 void SlideShow::slotClose()
Only in .: slideshow.cpp~
diff -u /tmp/kipi-plugins-0.1.2/kipi-plugins/slideshow/slideshow.h ./slideshow.h
--- /tmp/kipi-plugins-0.1.2/kipi-plugins/slideshow/slideshow.h	2006-07-09 01:51:11.000000000 +0200
+++ ./slideshow.h	2007-08-11 14:08:49.000000000 +0200
@@ -52,7 +52,7 @@
 public:
 
     SlideShow(const FileList& fileList,
-              int delay, bool printName, bool loop,
+              bool autoDelay, int delay, bool printName, bool loop,
               const QString& effectName);
     ~SlideShow();
 
@@ -73,6 +73,7 @@
 private:
 
     // config ------------------
+    bool        autoDelay_;
     int         delay_;
     bool        printName_;
     QString     effectName_;
Only in .: slideshow.h~
Only in .: slideshow.lo
Only in .: slideshow.moc
diff -u /tmp/kipi-plugins-0.1.2/kipi-plugins/slideshow/slideshowconfig.cpp ./slideshowconfig.cpp
--- /tmp/kipi-plugins-0.1.2/kipi-plugins/slideshow/slideshowconfig.cpp	2006-07-09 01:51:11.000000000 +0200
+++ ./slideshowconfig.cpp	2007-08-11 16:18:07.000000000 +0200
@@ -87,7 +87,7 @@
 
     QWidget *page = new QWidget( this );
     setMainWidget( page );
-    QGridLayout *grid = new QGridLayout( page, 1, 1, 6, 6);
+    QGridLayout *grid = new QGridLayout( page, 1, 1, 7, 7);
 
     // ------------------------------------------------------------------
 
@@ -163,33 +163,40 @@
 
     // ------------------------------------------------------------------
 
+    autoDelayBox_ = new QCheckBox( page );
+    autoDelayBox_->setText( i18n( "Auto Delay" ) );
+    grid->addMultiCellWidget( autoDelayBox_, 6, 6, 0, 2 );
+
+    // ------------------------------------------------------------------
+
     QLabel* label1 = new QLabel( page);
     label1->setText( i18n( "Delay between images (ms):" ) );
-    grid->addWidget( label1, 6, 0 );
+    grid->addWidget( label1, 7, 0 );
 
     // ------------------------------------------------------------------
 
     delaySpinBox_ = new QSpinBox( 1000, 10000, 10, page );
     delaySpinBox_->setSizePolicy(QSizePolicy( (QSizePolicy::SizeType)0,
                                               (QSizePolicy::SizeType)0));
-    grid->addWidget( delaySpinBox_, 6, 1 );
+    grid->addWidget( delaySpinBox_, 7, 1 );
 
     // ------------------------------------------------------------------
 
     QLabel* label2 = new QLabel( page, "label2" );
     label2->setText( i18n( "Transition effect:" ) );
-    grid->addWidget( label2, 7, 0 );
+    grid->addWidget( label2, 8, 0 );
 
     // ------------------------------------------------------------------
 
     effectsComboBox_ = new QComboBox( FALSE, page, "effectsComboBox_" );
     effectsComboBox_->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7,
                                                   (QSizePolicy::SizeType)0 ) );
-    grid->addMultiCellWidget( effectsComboBox_, 7, 7, 1, 2 );
+    grid->addMultiCellWidget( effectsComboBox_, 8, 8, 1, 2 );
 
     // ------------------------------------------------------------------
 
     connect(openglCheckBox_, SIGNAL(toggled(bool)), SLOT(slotOpenGLToggled()));
+    connect(autoDelayBox_, SIGNAL(toggled(bool)), SLOT(slotAutoDelayToggled()));
     connect(this, SIGNAL(okClicked()), this, SLOT(slotOkClicked()));
 
     // ------------------------------------------------------------------
@@ -257,6 +264,7 @@
     bool  printFileName;
     bool  loop;
     bool  shuffle;
+    bool  autoDelay;
     bool  showSelectedFilesOnly;
 
     opengl                = config_->readBoolEntry("OpenGL", false);
@@ -264,6 +272,7 @@
     printFileName         = config_->readBoolEntry("Print Filename", true);
     loop                  = config_->readBoolEntry("Loop", false);
     shuffle               = config_->readBoolEntry("Shuffle", false);
+    autoDelay             = config_->readBoolEntry("AutoDelay", true);
     showSelectedFilesOnly = config_->readBoolEntry("Show Selected Files Only", false);
     effectName_           = config_->readEntry("Effect Name", "Random");
     effectNameGL_         = config_->readEntry("Effect Name (OpenGL)", "Random");
@@ -279,7 +288,11 @@
     loopCheckBox_->setChecked(loop);
 
     shuffleCheckBox_->setChecked(shuffle);
+    
+    autoDelayBox_->setChecked(autoDelay);
 
+    slotAutoDelayToggled();
+    
     if (showSelectedFilesOnly && selectedFilesButton_->isEnabled() )
         selectedFilesButton_->setChecked(true);
     else
@@ -297,6 +310,7 @@
     config_->writeEntry("Print Filename", printNameCheckBox_->isChecked());
     config_->writeEntry("Loop", loopCheckBox_->isChecked());
     config_->writeEntry("Shuffle", shuffleCheckBox_->isChecked());
+    config_->writeEntry("AutoDelay", autoDelayBox_->isChecked());
     config_->writeEntry("Show Selected Files Only", selectedFilesButton_->isChecked());
 
     if (!openglCheckBox_->isChecked()) {
@@ -340,11 +354,23 @@
     if (openglCheckBox_->isChecked()) {
         loadEffectNamesGL();
     }
-    else {
+    else 
+    {
         loadEffectNames();
     }
 }
 
+void SlideShowConfig::slotAutoDelayToggled()
+{
+    if (autoDelayBox_->isChecked()) {
+        delaySpinBox_->setEnabled(true);
+    } 
+    else 
+    {
+        delaySpinBox_->setEnabled(false);
+    }
+}
+
 void SlideShowConfig::slotOkClicked()
 {
     saveSettings();
Only in .: slideshowconfig.cpp~
diff -u /tmp/kipi-plugins-0.1.2/kipi-plugins/slideshow/slideshowconfig.h ./slideshowconfig.h
--- /tmp/kipi-plugins-0.1.2/kipi-plugins/slideshow/slideshowconfig.h	2006-07-09 01:51:11.000000000 +0200
+++ ./slideshowconfig.h	2007-08-11 13:48:24.000000000 +0200
@@ -63,6 +63,7 @@
     void slotOkClicked();
     void slotHelp();
     void slotOpenGLToggled();
+    void slotAutoDelayToggled();
 
 private:
     
@@ -77,7 +78,8 @@
     QCheckBox*    printNameCheckBox_;
     QCheckBox*    loopCheckBox_;
     QCheckBox*    shuffleCheckBox_;
-    
+    QCheckBox*    autoDelayBox_;
+      
     QSpinBox*     delaySpinBox_;
     
     QComboBox*    effectsComboBox_;
Only in .: slideshowconfig.h~
Only in .: slideshowconfig.lo
Only in .: slideshowconfig.moc
diff -u /tmp/kipi-plugins-0.1.2/kipi-plugins/slideshow/slideshowgl.cpp ./slideshowgl.cpp
--- /tmp/kipi-plugins-0.1.2/kipi-plugins/slideshow/slideshowgl.cpp	2006-07-09 01:51:11.000000000 +0200
+++ ./slideshowgl.cpp	2007-08-11 16:19:32.000000000 +0200
@@ -46,7 +46,7 @@
 {
 
 SlideShowGL::SlideShowGL(const QValueList<QPair<QString, int> >& fileList,
-                         int delay, bool printName,bool loop,
+                         bool autoDelay, int delay, bool printName,bool loop,
                          const QString& effectName)
     : QGLWidget(0, 0, 0, WStyle_StaysOnTop | WType_Popup |
                 WX11BypassWM | WDestructiveClose)
@@ -93,6 +93,7 @@
     // --------------------------------------------------
 
     fileList_   = fileList;
+    autoDelay_  = autoDelay;
     delay_      = QMAX(delay, 1000);   // at least have 1 second delay
     loop_       = loop;
     effectName_ = effectName;
@@ -130,7 +131,8 @@
     timer_ = new QTimer();
     connect(timer_, SIGNAL(timeout()),
             SLOT(slotTimeOut()));
-    timer_->start(timeout_, true);
+    if (autoDelay_)
+        timer_->start(timeout_, true);
 
     // -- hide cursor when not moved --------------------
 
@@ -424,17 +426,17 @@
 
         QImage black(width(), height(), 32);
         black.fill(Qt::black.rgb());
-	    
+            
         image = image.smoothScale(width(), height(),
                                   QImage::ScaleMin);
         montage(image, black);
 
         black = black.smoothScale(width_, height_);
         
-	if (printName_)
-	    printFilename(black);
-	
-	QImage t = convertToGLFormat(black);
+        if (printName_)
+            printFilename(black);
+        
+        QImage t = convertToGLFormat(black);
 
         /* create the texture */
         glGenTextures(1, &tex);
@@ -447,7 +449,7 @@
         glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
         glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
         
-	
+        
     }
     
 }
@@ -580,6 +582,11 @@
         timeout_ = 10;
     }
     else {
+        if (!autoDelay_) {
+            // effect has finished but auto delay is not activated
+            // therefore the timer doesn't have to be restarted
+            return;
+        }
         if (timeout_ == -1) {
             // effect was running and is complete now
             // run timer while showing current image
@@ -1270,20 +1277,24 @@
 
 void SlideShowGL::slotPause()
 {
-    timer_->stop();
+    if (autoDelay_) {
+        timer_->stop();
 
-    if (toolBar_->isHidden())
-    {
-        int w = toolBar_->width();
-        toolBar_->move(deskWidth_-w-1,0);
-        toolBar_->show();
+        if (toolBar_->isHidden())
+        {
+            int w = toolBar_->width();
+            toolBar_->move(deskWidth_-w-1,0);
+            toolBar_->show();
+        }
     }
 }
 
 void SlideShowGL::slotPlay()
 {
-    toolBar_->hide();
-    slotTimeOut();
+    if (autoDelay_) {
+        toolBar_->hide();
+        slotTimeOut();
+    }
 }
 
 void SlideShowGL::slotPrev()
@@ -1294,9 +1305,23 @@
         return;
     }
 
-    effectRunning_ = false;
+    if (!autoDelay_) {
+        // timed out after showing current image
+        // load next image and start effect
+        if (random_)
+            effect_ = getRandomEffect();
+
+        timeout_ = 10;
+        effectRunning_ = true;
+        m_i = 0;
+    } else 
+        effectRunning_ = false;
+
     loadImage();
     updateGL();
+
+    if (!autoDelay_)
+        timer_->start(timeout_, true);
 }
 
 void SlideShowGL::slotNext()
@@ -1307,9 +1332,23 @@
         return;
     }
 
-    effectRunning_ = false;
+    if (!autoDelay_) {
+        // timed out after showing current image
+        // load next image and start effect
+        if (random_)
+            effect_ = getRandomEffect();
+
+        timeout_ = 10;
+        effectRunning_ = true;
+        m_i = 0;
+    } else 
+        effectRunning_ = false;
+
     loadImage();
     updateGL();
+
+    if (!autoDelay_)
+        timer_->start(timeout_, true);
 }
 
 void SlideShowGL::slotClose()
Only in .: slideshowgl.cpp~
diff -u /tmp/kipi-plugins-0.1.2/kipi-plugins/slideshow/slideshowgl.h ./slideshowgl.h
--- /tmp/kipi-plugins-0.1.2/kipi-plugins/slideshow/slideshowgl.h	2006-07-09 01:51:11.000000000 +0200
+++ ./slideshowgl.h	2007-08-11 14:13:58.000000000 +0200
@@ -42,7 +42,7 @@
 public:
 
     SlideShowGL(const QValueList<QPair<QString, int> >& fileList,
-                int delay, bool printName, bool loop,
+                bool autoDelay, int delay, bool printName, bool loop,
                 const QString& effectName);
     ~SlideShowGL();
 
@@ -65,6 +65,7 @@
 
     // config ------------------
 
+    bool        autoDelay_;
     int         delay_;
     QString     effectName_;
     bool        loop_;
Only in .: slideshowgl.h~
Only in .: slideshowgl.lo
Only in .: slideshowgl.moc
Only in .: toolbar.lo
Only in .: toolbar.moc

