summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRiley Bell <riley.bell@vfemail.net>2024-07-04 07:15:46 -0700
committerRiley Bell <riley.bell@vfemail.net>2024-07-04 07:15:46 -0700
commit20349c46df65501d70ee09490961ac6f9076469e (patch)
treefbb0b9c0d13cb34dcf9d68f61b1f26e9fd914619
parent3353e7fa30be3d2f6c5161a7fd10fd056b5828cd (diff)
downloadtdepim-feat/addFeed_argument.tar.gz
tdepim-feat/addFeed_argument.zip
Akregator: Add argument for opening feeds.feat/addFeed_argument
Signed-off-by: Riley Bell <riley.bell@vfemail.net>
-rw-r--r--akregator/src/akregator_options.h3
-rw-r--r--akregator/src/main.cpp3
2 files changed, 5 insertions, 1 deletions
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 <url>", I18N_NOOP( "Add a feed with the given URL" ), 0},
{ "g", 0, 0 },
{ "group <groupname>", 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 );