[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/kalarm
From: David Jarvie <software () astrojar ! org ! uk>
Date: 2005-04-05 23:25:43
Message-ID: 20050405232543.063C963E () office ! kde ! org
[Download RAW message or body]
CVS commit by djarvie:
Add --speak command line option
M +13 -1 kalarmapp.cpp 1.167
M +3 -1 main.cpp 1.49
--- kdepim/kalarm/kalarmapp.cpp #1.166:1.167
@@ -539,4 +539,6 @@ int KAlarmApp::newInstance()
if (args->isSet("beep"))
USAGE(i18n("%1 incompatible with \
%2").arg(QString::fromLatin1("--beep")).arg(QString::fromLatin1(audioRepeat ? \
"--play-repeat" : "--play"))) + if \
(args->isSet("speak")) + \
USAGE(i18n("%1 incompatible with \
%2").arg(QString::fromLatin1("--speak")).arg(QString::fromLatin1(audioRepeat ? \
"--play-repeat" : "--play")))
audioFile = args->getOption(audioRepeat ? \
"play-repeat" : "play"); if (args->isSet("volume"))
@@ -551,5 +553,11 @@ int KAlarmApp::newInstance()
else if (args->isSet("volume"))
USAGE(i18n("%1 requires %2 or \
%3").arg(QString::fromLatin1("--volume")).arg(QString::fromLatin1("--play")).arg(QString::fromLatin1("--play-repeat")))
-
+ if (args->isSet("speak"))
+ {
+ if (args->isSet("beep"))
+ USAGE(i18n("%1 incompatible with \
%2").arg(QString::fromLatin1("--beep")).arg(QString::fromLatin1("--speak"))) + \
if (!mSpeechEnabled) + USAGE(i18n("%1 \
requires speech synthesis to be configured using \
KTTSD").arg(QString::fromLatin1("--speak"))) + }
int reminderMinutes = 0;
bool onceOnly = args->isSet("reminder-once");
@@ -602,4 +610,6 @@ int KAlarmApp::newInstance()
if (args->isSet("beep"))
flags |= KAEvent::BEEP;
+ if (args->isSet("speak"))
+ flags |= KAEvent::SPEAK;
if (args->isSet("disable"))
flags |= KAEvent::DISABLED;
@@ -664,4 +674,6 @@ int KAlarmApp::newInstance()
if (args->isSet("reminder-once"))
usage += \
QString::fromLatin1("--reminder-once "); + if \
(args->isSet("speak")) + usage += \
QString::fromLatin1("--speak "); if (args->isSet("subject"))
usage += QString::fromLatin1("--subject ");
--- kdepim/kalarm/main.cpp #1.48:1.49
@@ -80,4 +80,6 @@ static KCmdLineOptions options[] =
{ "repeat <count>", I18N_NOOP("Number of times to repeat alarm (including \
initial occasion)"), 0 }, { "reset", I18N_NOOP("Reset the alarm scheduling daemon"), \
0 }, + { "s", 0, 0 },
+ { "speak", I18N_NOOP("Speak the message when it is displayed"), 0 },
{ "stop", I18N_NOOP("Stop the alarm scheduling daemon"), 0 },
{ "S", 0, 0 },
@@ -103,5 +105,5 @@ int main(int argc, char *argv[])
I18N_NOOP("Personal alarm message, command and email scheduler for \
KDE"), KAboutData::License_GPL,
- "(c) 2001 - 2004, David Jarvie", 0, \
"http://www.astrojar.org.uk/linux/kalarm.html"); + "(c) 2001 - 2005, \
David Jarvie", 0, "http://www.astrojar.org.uk/linux/kalarm.html");
aboutData.addAuthor("David Jarvie", 0, "software@astrojar.org.uk");
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic