Index: mythgallery/glsingleview.cpp
===================================================================
--- mythgallery/glsingleview.cpp	(revision 6792)
+++ mythgallery/glsingleview.cpp	(working copy)
@@ -78,12 +78,17 @@
     // --------------------------------------------------------------------
 
     // remove all dirs from m_itemList;
+    bool recurse = gContext->GetNumSetting("GalleryRecursiveSlideshow", 0);
+
     m_itemList.setAutoDelete(false);
     ThumbItem* item = m_itemList.first();
     while (item) {
         ThumbItem* next = m_itemList.next();
-        if (item->isDir)
+        if (item->isDir) {
+            if (recurse)
+                GalleryUtil::loadDirectory(m_itemList, item->path, recurse, NULL, NULL);
             m_itemList.remove(item);
+        }
         item = next;
     }
     
Index: mythgallery/galleryutil.h
===================================================================
--- mythgallery/galleryutil.h	(revision 6792)
+++ mythgallery/galleryutil.h	(working copy)
@@ -19,14 +19,19 @@
 #ifndef EXIFUTIL_H
 #define EXIFUTIL_H
 
+#include "iconview.h"
+
 class GalleryUtil
 {
 
  public:
	static bool isImage(const char* filePath);
	static bool isMovie(const char* filePath);
	static long getNaturalRotation(const char* filePath);
 
+    static bool loadDirectory(ThumbList& itemList,
+                              const QString& dir, bool recurse,
+                              ThumbDict *itemDict, ThumbGenerator* thumbGen);
 };
 
 #endif /* EXIFUTIL_H */
Index: mythgallery/singleview.cpp
===================================================================
--- mythgallery/singleview.cpp	(revision 6792)
+++ mythgallery/singleview.cpp	(working copy)
@@ -41,12 +41,17 @@
     // --------------------------------------------------------------------
 
     // remove all dirs from m_itemList;
+    bool recurse = gContext->GetNumSetting("GalleryRecursiveSlideshow", 0);
+
     m_itemList.setAutoDelete(false);
     ThumbItem* item = m_itemList.first();
     while (item) {
         ThumbItem* next = m_itemList.next();
-        if (item->isDir)
+        if (item->isDir) {
+            if (recurse)
+                GalleryUtil::loadDirectory(m_itemList, item->path, recurse, NULL, NULL);
             m_itemList.remove(item);
+        }
         item = next;
     }
 
Index: mythgallery/gallerysettings.cpp
===================================================================
--- mythgallery/gallerysettings.cpp	(revision 6792)
+++ mythgallery/gallerysettings.cpp	(working copy)
@@ -129,6 +129,14 @@
     return gc;
 };
 
+static HostCheckBox *SlideshowRecursive()
+{
+    HostCheckBox *gc = new HostCheckBox("GalleryRecursiveSlideshow");
+    gc->setLabel(QObject::tr("Recurse into directories"));
+    gc->setHelpText(QObject::tr("Check this to let the slideshow recurse into "
+                                "sub-directories."));
+    return gc;
+};
 
 class GalleryConfigurationGroup: public VerticalConfigurationGroup,
                                  public TriggeredConfigurationGroup {
@@ -170,7 +178,7 @@
         
         
         addChild(SlideshowDelay());
-
+        addChild(SlideshowRecursive());
     }
 
 };
Index: mythgallery/iconview.cpp
===================================================================
--- mythgallery/iconview.cpp	(revision 6792)
+++ mythgallery/iconview.cpp	(working copy)
@@ -596,57 +596,7 @@
     m_lastCol = 0;
     m_topRow  = 0;
 
-    const QFileInfoList* gList = d.entryInfoList("serial*.dat", QDir::Files);
-    if (gList)
-        m_isGallery = (gList->count() != 0);
-    else
-        m_isGallery = false;
-
-    // Create .thumbcache dir if neccesary
-    m_thumbGen->getThumbcacheDir(m_currDir);
-
-    d.setNameFilter(MEDIA_FILENAMES);
-    d.setSorting(QDir::Name | QDir::DirsFirst | QDir::IgnoreCase);
-
-    d.setMatchAllDirs(true);
-    const QFileInfoList *list = d.entryInfoList();
-    if (!list)
-        return;
-
-    QFileInfoListIterator it(*list);
-    QFileInfo *fi;
-
-    m_thumbGen->cancel();
-    m_thumbGen->setDirectory(m_currDir, m_isGallery);
-        
-    while ((fi = it.current()) != 0)
-    {
-        ++it;
-        if (fi->fileName() == "." || fi->fileName() == "..")
-            continue;
-
-        // remove these already-resized pictures.  
-        if (m_isGallery && (
-                (fi->fileName().find(".thumb.") > 0) ||
-                (fi->fileName().find(".sized.") > 0) ||
-                (fi->fileName().find(".highlight.") > 0)))
-            continue;
-        
-        ThumbItem* item = new ThumbItem;
-        item->name      = fi->fileName();
-        item->path      = QDir::cleanDirPath(fi->absFilePath());
-        item->isDir     = fi->isDir();
-
-        m_itemList.append(item);
-        m_itemDict.insert(item->name, item);
-        m_thumbGen->addFile(item->name);
-    }
-
-    if (!m_thumbGen->running())
-    {
-        m_thumbGen->start();
-    }
-
+    m_isGallery = GalleryUtil::loadDirectory(m_itemList, dir, false, &m_itemDict, m_thumbGen);;
     m_lastRow = QMAX((int)ceilf((float)m_itemList.count()/(float)m_nCols)-1,0);
     m_lastCol = QMAX(m_itemList.count()-m_lastRow*m_nCols-1,0);
 }
@@ -827,7 +777,8 @@
 {
     ThumbItem* item = m_itemList.at(m_currRow * m_nCols +
                                     m_currCol);
-    if (!item || item->isDir)
+    bool recurse = gContext->GetNumSetting("GalleryRecursiveSlideshow", 0);
+    if (!item || (item->isDir && !recurse))
         return;
 
     int pos = m_currRow * m_nCols + m_currCol;
@@ -857,7 +808,8 @@
 {
     ThumbItem* item = m_itemList.at(m_currRow * m_nCols +
                                     m_currCol);
-    if (!item || item->isDir)
+    bool recurse = gContext->GetNumSetting("GalleryRecursiveSlideshow", 0);
+    if (!item || (item->isDir && !recurse))
         return;
 
     int pos = m_currRow * m_nCols + m_currCol;
Index: mythgallery/iconview.h
===================================================================
--- mythgallery/iconview.h	(revision 6792)
+++ mythgallery/iconview.h	(working copy)
@@ -58,6 +58,7 @@
 };
 
 typedef QPtrList<ThumbItem> ThumbList;
+typedef QDict<ThumbItem>    ThumbDict;
 
 class IconView : public MythDialog
 {
Index: mythgallery/galleryutil.cpp
===================================================================
--- mythgallery/galleryutil.cpp	(revision 6792)
+++ mythgallery/galleryutil.cpp	(working copy)
@@ -18,10 +18,12 @@
 
 #include <iostream>
 #include <qfileinfo.h>
+#include <qdir.h>
 
 #include "config.h"
 #include "constants.h"
 #include "galleryutil.h"
+#include "thumbgenerator.h"
 
 #ifdef EXIF_SUPPORT
 #include <libexif/exif-data.h>
@@ -32,13 +34,13 @@
 bool GalleryUtil::isImage(const char* filePath)
 {
     QFileInfo fi(filePath);
-    return IMAGE_FILENAMES.find(fi.extension()) != -1;
+    return !fi.isDir() && IMAGE_FILENAMES.find(fi.extension()) != -1;
 }
 
 bool GalleryUtil::isMovie(const char* filePath)
 {
     QFileInfo fi(filePath);
-    return MOVIE_FILENAMES.find(fi.extension()) != -1;
+    return !fi.isDir() && MOVIE_FILENAMES.find(fi.extension()) != -1;
 }
 
 long GalleryUtil::getNaturalRotation(const char* filePath)
@@ -119,3 +121,79 @@
 
     return rotateAngle;
 }
+
+bool GalleryUtil::loadDirectory(ThumbList& itemList,
+                                const QString& dir, bool recurse,
+                                ThumbDict *itemDict, ThumbGenerator* thumbGen)
+{
+    QDir d(dir);
+    QString currDir = d.absPath();
+
+    bool isGallery;
+    const QFileInfoList* gList = d.entryInfoList("serial*.dat", QDir::Files);
+    if (gList)
+        isGallery = (gList->count() != 0);
+    else
+        isGallery = false;
+
+    // Create .thumbcache dir if neccesary
+    if(thumbGen)
+        thumbGen->getThumbcacheDir(currDir);
+
+    d.setNameFilter(MEDIA_FILENAMES);
+    d.setSorting(QDir::Name | QDir::DirsFirst | QDir::IgnoreCase);
+
+    d.setMatchAllDirs(true);
+    const QFileInfoList *list = d.entryInfoList();
+    if (!list)
+        return false;
+
+    QFileInfoListIterator it(*list);
+    QFileInfo *fi;
+
+    if(thumbGen) {
+        thumbGen->cancel();
+        thumbGen->setDirectory(currDir, isGallery);
+    }
+
+    while ((fi = it.current()) != 0)
+    {
+        ++it;
+        if (fi->fileName() == "." || fi->fileName() == "..")
+            continue;
+
+        // remove these already-resized pictures.
+        if (isGallery && (
+                (fi->fileName().find(".thumb.") > 0) ||
+                (fi->fileName().find(".sized.") > 0) ||
+                (fi->fileName().find(".highlight.") > 0)))
+            continue;
+
+        if(fi->isDir() && recurse) {
+            GalleryUtil::loadDirectory(itemList,
+                                       QDir::cleanDirPath(fi->absFilePath()), true,
+                                       itemDict, thumbGen);
+        }
+        else {
+            ThumbItem* item = new ThumbItem;
+            item->name      = fi->fileName();
+            item->path      = QDir::cleanDirPath(fi->absFilePath());
+            item->isDir     = fi->isDir();
+
+            itemList.append(item);
+
+            if(itemDict)
+                itemDict->insert(item->name, item);
+
+            if(thumbGen)
+                thumbGen->addFile(item->name);
+        }
+    }
+
+    if (thumbGen && !thumbGen->running())
+    {
+        thumbGen->start();
+    }
+
+    return isGallery;
+}
