summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStuart Morgan <smorgan@mythtv.org>2011-02-17 12:51:20 (GMT)
committer Stuart Morgan <smorgan@mythtv.org>2011-02-17 16:56:04 (GMT)
commit80d9234a505598942214978cc58145320aba0aa2 (patch)
tree6fa4dc67dc3a2bd76e06e782958a032e65e12dc7
parent23eff84c01c4494e2961b1ba0494c45e80d36053 (diff)
Add an 'auto-run' setting to mythgallery so that behaviour can be disabled
-rw-r--r--mythplugins/mythgallery/mythgallery/gallerysettings.cpp10
-rw-r--r--mythplugins/mythgallery/mythgallery/main.cpp3
2 files changed, 13 insertions, 0 deletions
diff --git a/mythplugins/mythgallery/mythgallery/gallerysettings.cpp b/mythplugins/mythgallery/mythgallery/gallerysettings.cpp
index 39a0e4c..3f37d9e 100644
--- a/mythplugins/mythgallery/mythgallery/gallerysettings.cpp
+++ b/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()
@@ -218,6 +227,7 @@ GallerySettings::GallerySettings()
general->addChild(MythGalleryThumbnailLocation());
general->addChild(MythGallerySortOrder());
general->addChild(MythGalleryImportDirs());
+ general->addChild(MythGalleryAutoLoad());
general->addChild(MythGalleryMoviePlayerCmd());
addChild(general);
diff --git a/mythplugins/mythgallery/mythgallery/main.cpp b/mythplugins/mythgallery/mythgallery/main.cpp
index 44dcfcb..1c6b873 100644
--- a/mythplugins/mythgallery/mythgallery/main.cpp
+++ b/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())
{
GetMythMainWindow()->JumpTo("Main Menu");