~ubuntu-branches/ubuntu/maverick/kdeutils/maverick-proposed

« back to all changes in this revision

Viewing changes to sweeper/main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-05-28 09:49:30 UTC
  • mfrom: (1.2.44 upstream)
  • Revision ID: james.westby@ubuntu.com-20100528094930-jzynf0obv1n2v13a
Tags: 4:4.4.80-0ubuntu1~ppa1
New upstream beta release

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
int main(int argc, char *argv[])
27
27
{
28
 
   KAboutData aboutData("sweeper", 0, ki18n("Sweeper"), "1.4",
 
28
   KAboutData aboutData("sweeper", 0, ki18n("Sweeper"), "1.5",
29
29
                        ki18n("Helps clean unwanted traces the user leaves on the system."),
30
30
                        KAboutData::License_LGPL, ki18n("(c) 2003-2005, Ralf Hoelzer"), KLocalizedString(),
31
31
                        "http://utils.kde.org/projects/sweeper");
38
38
 
39
39
   // command line
40
40
   KCmdLineArgs::init(argc, argv, &aboutData);
 
41
   KCmdLineOptions options;
 
42
   options.add("automatic", ki18n("Sweeps without user interaction"));
 
43
   KCmdLineArgs::addCmdLineOptions(options);
 
44
   KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
 
45
 
 
46
   // Application 
41
47
   KApplication a(true);
42
 
   Sweeper *app = new Sweeper();
43
 
 
44
 
   app->show();
 
48
   Sweeper *app;
 
49
   if(args->isSet("automatic")) {
 
50
      app = new Sweeper(true);
 
51
   } else {
 
52
      app = new Sweeper(false);
 
53
      app->show();
 
54
   }   
45
55
   return a.exec();
46
56
}
47
57