Skip to content
Permalink
Browse files

Migrate Screen Setup Wizard to external application.

This sidesteps the issue of trying to display the corner arrows outside
the current extents of the UI by starting up an entirely new instance
and forcing it to full screen. The arrows are additionally replaced by
the theme's preview image, to more clearly exhibit the final appearance.

There are some issues and potential usability concerns that still need
to be addressed.
* The preview image repositions, but does not properly scale.
* There may need to be indicators to show what corner is currently used.
* The network control interfaces are not available.

This changeset includes a revision bump, and will require any theme with
a custom appear-ui.xml to be updated.
  • Loading branch information
wagnerrp committed Jan 29, 2013
1 parent d7397f8 commit 690f333e59205de8b582992a894d63695676b41e
@@ -29,6 +29,7 @@
#define MYTH_APPNAME_MYTHMETADATALOOKUP "mythmetadatalookup"
#define MYTH_APPNAME_MYTHUTIL "mythutil"
#define MYTH_APPNAME_MYTHLOGSERVER "mythlogserver"
#define MYTH_APPNAME_MYTHSCREENWIZARD "mythscreenwizard"

class MDBManager;
class MythCoreContextPrivate;
@@ -12,7 +12,7 @@
/// Update this whenever the plug-in API changes.
/// Including changes in the libmythbase, libmyth, libmythtv, libmythav* and
/// libmythui class methods used by plug-ins.
#define MYTH_BINARY_VERSION "0.27.20130127-1"
#define MYTH_BINARY_VERSION "0.27.20130129-1"

/** \brief Increment this whenever the MythTV network protocol changes.
*
@@ -68,7 +68,6 @@ using namespace std;
#include "myththemedmenu.h"
#include "mediarenderer.h"
#include "mythmainwindow.h"
#include "screenwizard.h"
#include "mythcontrols.h"
#include "mythuihelper.h"
#include "mythdirs.h"
@@ -292,18 +291,41 @@ namespace

static void startAppearWiz(void)
{
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
int curX = gCoreContext->GetNumSetting("GuiOffsetX", 0);
int curY = gCoreContext->GetNumSetting("GuiOffsetY", 0);
int curW = gCoreContext->GetNumSetting("GuiWidth", 0);
int curH = gCoreContext->GetNumSetting("GuiHeight", 0);

MythSystem *wizard = new MythSystem(
GetInstallPrefix() + "/bin/mythscreenwizard",
QStringList(),
kMSNoRunShell | kMSDisableUDPListener | kMSPropagateLogs);
wizard->Run();

bool reload = false;

if (!wizard->Wait())
{
// no reported errors, check for changed geometry parameters
gCoreContext->ClearSettingsCache("GuiOffsetX");
gCoreContext->ClearSettingsCache("GuiOffsetY");
gCoreContext->ClearSettingsCache("GuiWidth");
gCoreContext->ClearSettingsCache("GuiHeight");

if ((curX != gCoreContext->GetNumSetting("GuiOffsetX", 0)) ||
(curY != gCoreContext->GetNumSetting("GuiOffsetY", 0)) ||
(curW != gCoreContext->GetNumSetting("GuiWidth", 0)) ||
(curH != gCoreContext->GetNumSetting("GuiHeight", 0)))
reload = true;
}

ScreenWizard *screenwizard = new ScreenWizard(mainStack,
"screenwizard");
delete wizard;
wizard = NULL;

if (screenwizard->Create())
mainStack->AddScreen(screenwizard);
else
delete screenwizard;
if (reload)
GetMythMainWindow()->JumpTo("Reload Theme");
}


static void startKeysSetup()
{
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
@@ -864,7 +886,7 @@ static void TVMenuCallback(void *data, QString &selection)
}
else if (sel == "screensetupwizard")
{
startAppearWiz();
startAppearWiz();
}
else if (sel == "setup_keys")
{
@@ -24,7 +24,7 @@ HEADERS += playbackbox.h viewscheduled.h globalsettings.h audiogeneralsettings.h
HEADERS += manualschedule.h programrecpriority.h channelrecpriority.h
HEADERS += statusbox.h networkcontrol.h custompriority.h
HEADERS += mediarenderer.h mythfexml.h playbackboxlistitem.h
HEADERS += screenwizard.h exitprompt.h
HEADERS += exitprompt.h
HEADERS += action.h mythcontrols.h keybindings.h keygrabber.h
HEADERS += progfind.h guidegrid.h customedit.h
HEADERS += schedulecommon.h progdetails.h scheduleeditor.h
@@ -45,7 +45,7 @@ SOURCES += main.cpp playbackbox.cpp viewscheduled.cpp audiogeneralsettings.cpp
SOURCES += globalsettings.cpp manualschedule.cpp programrecpriority.cpp
SOURCES += channelrecpriority.cpp statusbox.cpp networkcontrol.cpp
SOURCES += mediarenderer.cpp mythfexml.cpp playbackboxlistitem.cpp
SOURCES += custompriority.cpp screenwizard.cpp exitprompt.cpp
SOURCES += custompriority.cpp exitprompt.cpp
SOURCES += action.cpp actionset.cpp mythcontrols.cpp keybindings.cpp
SOURCES += keygrabber.cpp progfind.cpp guidegrid.cpp
SOURCES += customedit.cpp schedulecommon.cpp progdetails.cpp scheduleeditor.cpp

0 comments on commit 690f333

Please sign in to comment.
You can’t perform that action at this time.