TDE core libraries
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tdehotnewstuff.cpp 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. This file is part of KOrganizer.
  3. Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public
  6. License as published by the Free Software Foundation; either
  7. version 2 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public License
  13. along with this library; see the file COPYING.LIB. If not, write to
  14. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  15. Boston, MA 02110-1301, USA.
  16. */
  17. #include <tdeapplication.h>
  18. #include <kdebug.h>
  19. #include <tdelocale.h>
  20. #include <tdecmdlineargs.h>
  21. #include <tdeaboutdata.h>
  22. #include "downloaddialog.h"
  23. static const TDECmdLineOptions op[] =
  24. {
  25. {"type <type>", I18N_NOOP("Display only media of this type"), 0},
  26. {"+[providerlist]", I18N_NOOP("Provider list to use"), 0},
  27. TDECmdLineLastOption
  28. };
  29. int main(int argc, char **argv)
  30. {
  31. TDEAboutData about("tdehotnewstuff", "KHotNewStuff", "0.2");
  32. TDECmdLineArgs *args;
  33. TDECmdLineArgs::init(argc, argv, &about);
  34. TDECmdLineArgs::addCmdLineOptions(op);
  35. args = TDECmdLineArgs::parsedArgs();
  36. TDEApplication i;
  37. KNS::DownloadDialog d;
  38. if(args->isSet("type")) d.setType(args->getOption("type"));
  39. if(args->count() == 1) d.setProviderList(args->arg(0));
  40. d.load();
  41. d.exec();
  42. return 0;
  43. }