Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 225a0670 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Add "New Contact" jump list action

Allows to directly invoke the new contact dialog from e.g. the application launcher, task manager and KRunner.

Differential Revision: https://phabricator.kde.org/D9926
parent 3bacd37a
......@@ -128,4 +128,10 @@ StartupNotify=true
Categories=Qt;KDE;Office;ContactManagement;
X-DBUS-StartupType=Unique
X-DBUS-ServiceName=org.kde.kaddressbook
Actions=NewContact;
[Desktop Action NewContact]
Name=New Contact...
Icon=contact-new
Exec=kaddressbook --newcontact
......@@ -31,6 +31,11 @@ static void kaddressbook_options(QCommandLineParser *parser)
QStringLiteral("import"),
i18n("Import the given file")));
parser->addOption(
QCommandLineOption(
QStringLiteral("newcontact"),
i18n("Open the 'New Contact' dialog")));
parser->addPositionalArgument(
QStringLiteral("urls"),
i18n("Files or URLs. The user will be asked whether to import."),
......
......@@ -399,6 +399,8 @@ void MainWidget::handleCommandLine(const QStringList &arguments)
}
}
}
} else if (parser.isSet(QStringLiteral("newcontact"))) {
newContact();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment