Skip to content
Permalink
Browse files

Add --[no-]mouse-cursor command line option

This adds an option to mythfrontend and mythtv-setup to allow manual
selection of whether the mouse cursor is hidden or not.  This implements
a database option override in the same manner as the --windowed
function.  This bumps the ABI version.
  • Loading branch information
wagnerrp committed Sep 5, 2011
1 parent a5bddd7 commit db2c89587cec00966bd8ecfe962019245b4a5ab9
@@ -61,22 +61,32 @@ int GetTermWidth(void)

const char* NamedOptType(int type)
{
if (type == kEnd)
switch (type)
{
case kEnd:
return "kEnd";
else if (type == kEmpty)

case kEmpty:
return "kEmpty";
else if (type == kOptOnly)

case kOptOnly:
return "kOptOnly";
else if (type == kOptVal)

case kOptVal:
return "kOptVal";
else if (type == kArg)

case kArg:
return "kArg";
else if (type == kPassthrough)

case kPassthrough:
return "kPassthrough";
else if (type == kInvalid)

case kInvalid:
return "kInvalid";

return "kUnknown";
default:
return "kUnknown";
}
}

typedef struct helptmp {
@@ -677,6 +687,11 @@ QMap<QString,QString> MythCommandLineParser::GetSettingsOverride(void)
else if (toBool("notwindowed"))
smap["RunFrontendInWindow"] = "0";

if (toBool("mousecursor"))
smap["HideMouseCursor"] = "0";
else if (toBool("nomousecursor"))
smap["HideMouseCursor"] = "1";

m_overridesImported = true;

if (!smap.isEmpty())
@@ -909,7 +924,7 @@ void MythCommandLineParser::addVersion(void)
"and compiled options.");
}

void MythCommandLineParser::addWindowed(bool def)
void MythCommandLineParser::addWindowed(void)
{
add(QStringList( QStringList() << "-nw" << "--no-windowed" ),
"notwindowed", false,
@@ -918,6 +933,14 @@ void MythCommandLineParser::addWindowed(bool def)
false, "Force application to run in a window.", "");
}

void MythCommandLineParser::addMouse(void)
{
add("--mouse-cursor", "mousecursor", false,
"Force visibility of the mouse cursor.", "");
add("--no-mouse-cursor", "nomousecursor", false,
"Force the mouse cursor to be hidden.", "");
}

void MythCommandLineParser::addDaemon(void)
{
add(QStringList( QStringList() << "-d" << "--daemon" ), "daemon", false,
@@ -155,7 +155,8 @@ class MBASE_PUBLIC MythCommandLineParser

void addHelp(void);
void addVersion(void);
void addWindowed(bool);
void addWindowed(void);
void addMouse(void);
void addDaemon(void);
void addSettingsOverride(void);
void addRecording(void);
@@ -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.25.20110829-2"
#define MYTH_BINARY_VERSION "0.25.20110905-1"

/** \brief Increment this whenever the MythTV network protocol changes.
*
@@ -22,7 +22,7 @@ void MythAVTestCommandLineParser::LoadArguments(void)
addHelp();
addSettingsOverride();
addVersion();
addWindowed(false);
addWindowed();
addGeometry();
addDisplay();
addLogging();
@@ -15,7 +15,8 @@ void MythFrontendCommandLineParser::LoadArguments(void)
allowArgs();
addHelp();
addVersion();
addWindowed(false);
addWindowed();
addMouse();
addSettingsOverride();
addGeometry();
addDisplay();
@@ -23,7 +23,8 @@ void MythTVSetupCommandLineParser::LoadArguments(void)
addHelp();
addSettingsOverride();
addVersion();
addWindowed(false);
addWindowed();
addMouse();
addGeometry();
addDisplay();
addLogging();

0 comments on commit db2c895

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