Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add an 'auto-run' setting to mythgallery so that behaviour can be dis…

…abled

(cherry picked from commit 80d9234)
  • Loading branch information...
commit 2b7036fe8ac5b1f11ddd3124fbd670009a4cf056 1 parent 84db96c
@stuartm stuartm authored
View
10 mythplugins/mythgallery/mythgallery/gallerysettings.cpp
@@ -78,6 +78,15 @@ static HostLineEdit *MythGalleryImportDirs()
return gc;
};
+static HostCheckBox *MythGalleryAutoLoad()
+{
+ HostCheckBox *gc = new HostCheckBox("GalleryAutoLoad");
+ gc->setLabel(QObject::tr("Automatically load MythGallery to display pictures"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("When a new CD-Rom or removable storage device containing pictures is detected then load MythGallery to display the content."));
+ return gc;
+}
+
#ifdef USING_OPENGL
static HostCheckBox *SlideshowUseOpenGL()
@@ -217,6 +226,7 @@ GallerySettings::GallerySettings()
general->addChild(MythGalleryThumbnailLocation());
general->addChild(MythGallerySortOrder());
general->addChild(MythGalleryImportDirs());
+ general->addChild(MythGalleryAutoLoad());
general->addChild(MythGalleryMoviePlayerCmd());
addChild(general);
View
3  mythplugins/mythgallery/mythgallery/main.cpp
@@ -59,6 +59,9 @@ static void runGallery(void)
static void handleMedia(MythMediaDevice *dev)
{
+ if (! gCoreContext->GetNumSetting("GalleryAutoLoad", 0))
+ return;
+
if (dev && dev->isUsable())
run(dev);
}
Please sign in to comment.
Something went wrong with that request. Please try again.