i18n("A tool that emits a notification for all users by sending it on the system DBus"),
KAboutLicense::GPL,
...
...
@@ -44,13 +45,18 @@ int main(int argc, char *argv[])
QCommandLineParserparser;
aboutData.setupCommandLine(&parser);
QCommandLineOptionapplicationNameOption(QStringLiteral("application"),i18n("Name of the application that should be associated with this notification"),QStringLiteral("application"));
i18n("Name of the application that should be associated with this notification"),
QStringLiteral("application"));
parser.addOption(applicationNameOption);
QCommandLineOptionsummaryOption(QStringLiteral("summary"),i18n("A brief one-line summary of the notification"),QStringLiteral("summary"));
parser.addOption(summaryOption);
QCommandLineOptioniconOption(QStringLiteral("icon"),i18n("Icon for the notification"),QStringLiteral("icon"));
parser.addOption(iconOption);
QCommandLineOptionuidsOption(QStringLiteral("uids"),i18n("A comma-separated list of user IDs this notification should be sent to. If omitted, the notification will be sent to all users."),QStringLiteral("uids"));
QCommandLineOptionuidsOption(
QStringLiteral("uids"),
i18n("A comma-separated list of user IDs this notification should be sent to. If omitted, the notification will be sent to all users."),
QStringLiteral("uids"));
parser.addOption(uidsOption);
QCommandLineOptiontimeoutOption(QStringLiteral("timeout"),i18n("Timeout for the notification"),QStringLiteral("timeout"));
// First condition is what systemsettings does, second what kinfocenter does, make sure this is kept in sync
// We need the exist calls because otherwise the trader language aborts if the property doesn't exist and the second part of the or is not evaluated
constKService::Listservices=KServiceTypeTrader::self()->query(QStringLiteral("KCModule"),QStringLiteral("(exist [X-KDE-System-Settings-Parent-Category] and [X-KDE-System-Settings-Parent-Category] != '') or (exist [X-KDE-ParentApp] and [X-KDE-ParentApp] == 'kinfocenter')"));
parser.addOption(QCommandLineOption(QStringLiteral("noignorebutton"),i18n("Do not display ignore button")));
parser.addOption(QCommandLineOption(QStringLiteral("i"),i18n("Specify icon to use in the password dialog"),QStringLiteral("icon name")));
...
...
@@ -130,18 +132,24 @@ int main(int argc, char *argv[])
#ifdef HAVE_X11
/* KDialog originally used --embed for attaching the dialog box. However this is misleading and so we changed to --attach.
* For consistancy, we silently map --embed to --attach */
parser.addOption(QCommandLineOption(QStringLiteral("attach"),i18nc("Transient means that the kdesu app will be attached to the app specified by the winid so that it is like a dialog box rather than some separate program","Makes the dialog transient for an X app specified by winid"),QStringLiteral("winid")));