Permalink
Browse files

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

…abled
  • Loading branch information...
1 parent 23eff84 commit 80d9234a505598942214978cc58145320aba0aa2 @stuartm stuartm committed Feb 17, 2011
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()
@@ -218,6 +227,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())
{
GetMythMainWindow()->JumpTo("Main Menu");

0 comments on commit 80d9234

Please sign in to comment.