kdirstat
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.

kdirstatmain.cpp 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*
  2. * File name: kdirstatmain.cpp
  3. * Summary: Main program for KDirStat
  4. * License: GPL - See file COPYING for details.
  5. *
  6. * Author: Stefan Hundhammer <sh@suse.de>
  7. * Parts auto-generated by KDevelop
  8. *
  9. * Updated: 2003-01-07
  10. */
  11. #include <tdecmdlineargs.h>
  12. #include <tdeaboutdata.h>
  13. #include <tdelocale.h>
  14. #include "kdirstatapp.h"
  15. static const char *description =
  16. I18N_NOOP("KDirStat - Directory statistics.\n"
  17. "\n"
  18. "Shows where all your disk space has gone\n"
  19. "and helps you clean it up."
  20. "\n"
  21. "\n"
  22. "\n"
  23. "If you have any comments or if you would simply like to tell your opinion\n"
  24. "about this program, please use \"Send Feedback Mail\" from the \"Help\" menu.\n"
  25. "\n"
  26. "Any feedback (even negative!) is appreciated."
  27. );
  28. static TDECmdLineOptions options[] =
  29. {
  30. { "+[Dir/URL]", I18N_NOOP("Directory or URL to open"), 0 },
  31. { 0, 0, 0 }
  32. };
  33. int main(int argc, char *argv[])
  34. {
  35. TDEAboutData aboutData( "kdirstat", I18N_NOOP("KDirStat"),
  36. VERSION, description, TDEAboutData::License_GPL,
  37. "(c) 1999-2003 Stefan Hundhammer", 0, 0,
  38. "sh@suse.de" );
  39. aboutData.addAuthor( "Stefan Hundhammer",
  40. I18N_NOOP("\n"
  41. "If you have any comments or if you would simply like to tell\n"
  42. "your opinion about this program, please use \n"
  43. "\"Send Feedback Mail\" from the \"Help\" menu.\n"
  44. "\n"
  45. "Any feedback (even negative!) is appreciated." ),
  46. "sh@suse.de", "http://kdirstat.sourceforge.net/" );
  47. aboutData.addCredit( I18N_NOOP( "All the people who worked on SequoiaView" ),
  48. I18N_NOOP( "for showing just how useful treemaps really can be.\n" ),
  49. 0, // e-mail
  50. "http://www.win.tue.nl/sequoiaview" );
  51. aboutData.addCredit( I18N_NOOP( "Jarke J. van Wijk, Huub van de Wetering, and Mark Bruls" ),
  52. I18N_NOOP( "for their papers about treemaps.\n" ),
  53. "vanwijk@win.tue.nl",
  54. "http://www.win.tue.nl/~vanwijk/" );
  55. aboutData.addCredit( "Ben Shneiderman",
  56. I18N_NOOP( "for his ingenious idea of treemaps -\n"
  57. "a truly intuitive way of visualizing tree contents.\n" ),
  58. "", // E-Mail
  59. "http://www.cs.umd.edu/hcil/treemaps/" );
  60. aboutData.addCredit( "All the users who gave feedback of any kind",
  61. I18N_NOOP( "for showing that all the work involved with such a project\n"
  62. "is really appreciated out there.\n" ) );
  63. TDECmdLineArgs::init( argc, argv, &aboutData );
  64. TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
  65. TDEApplication app;
  66. if ( app.isRestored() )
  67. {
  68. RESTORE(KDirStatApp);
  69. }
  70. else
  71. {
  72. KDirStatApp *kdirstat = new KDirStatApp();
  73. kdirstat->show();
  74. TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
  75. if ( args->count() )
  76. {
  77. // Process command line arguments as URLs or paths to scan
  78. KURL url = fixedUrl( args->arg( 0 ) );
  79. // kdDebug() << "Opening " << url.url() << endl;
  80. kdirstat->openURL( url );
  81. }
  82. else
  83. {
  84. kdirstat->fileAskOpenDir();
  85. }
  86. args->clear();
  87. }
  88. // kdDebug() << "Entering main loop" << endl;
  89. return app.exec();
  90. }