From 20349c46df65501d70ee09490961ac6f9076469e Mon Sep 17 00:00:00 2001 From: Riley Bell Date: Thu, 4 Jul 2024 07:15:46 -0700 Subject: Akregator: Add argument for opening feeds. Signed-off-by: Riley Bell --- akregator/src/akregator_options.h | 3 ++- akregator/src/main.cpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/akregator/src/akregator_options.h b/akregator/src/akregator_options.h index 20f29ffc6..7d8673141 100644 --- a/akregator/src/akregator_options.h +++ b/akregator/src/akregator_options.h @@ -36,7 +36,8 @@ static TDECmdLineOptions akregator_options[] = { "addfeed ", I18N_NOOP( "Add a feed with the given URL" ), 0}, { "g", 0, 0 }, { "group ", I18N_NOOP( "When adding feeds, place them in this group" ), I18N_NOOP("Imported") }, - { "hide-mainwindow", I18N_NOOP( "Hide main window on startup" ), 0}, + { "hide-mainwindow", I18N_NOOP( "Hide main window on startup" ), 0}, + { "+[URL]", I18N_NOOP("Add a feed with the given URL"), 0 }, TDECmdLineLastOption }; diff --git a/akregator/src/main.cpp b/akregator/src/main.cpp index 4c4b31ecf..b89e820e4 100644 --- a/akregator/src/main.cpp +++ b/akregator/src/main.cpp @@ -75,6 +75,9 @@ int Application::newInstance() for (QCStringList::ConstIterator it = feeds.begin(); it != end; ++it) feedsToAdd.append(*it); + if (args->count() == 1) + feedsToAdd.append(args->arg(0)); + if (!feedsToAdd.isEmpty()) akr.send("addFeedsToGroup", feedsToAdd, addFeedGroup ); -- cgit v1.2.1