main.cpp 2.72 KB
Newer Older
1
2
3
4
/***************************************************************************
                          main.cpp  -  description
                             -------------------
    begin                : Mon Jul 8 2002
5
    copyright          : (C) 2002 by Jean-Baptiste Mardelle
6
7
8
9
10
11
12
13
14
15
16
    email                : bj@altern.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
17

Laurent Montel's avatar
Laurent Montel committed
18

Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
19

Urs Wolfer's avatar
Urs Wolfer committed
20
21
22
23
#include <KUniqueApplication>
#include <KCmdLineArgs>
#include <KAboutData>
#include <KLocale>
24

Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
25
26
#include "kgpg.h"

Andy Goossens's avatar
Andy Goossens committed
27
static const char description[] =
28
        I18N_NOOP("KGpg - simple gui for gpg\n\nKGpg was designed to make gpg very easy to use.\nI tried to make it as secure as possible.\nHope you enjoy it.");
29

30
static const char version[] = "1.9.1";
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
31

32
int main(int argc, char *argv[])
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
33
{
34
    KAboutData about("kgpg", 0, ki18n("KGpg"), version, ki18n(description), KAboutData::License_GPL, ki18n("(C) 2003 Jean-Baptiste Mardelle"));
35
    about.addAuthor(ki18n("Jean-Baptiste Mardelle"), ki18n("Author and former maintainer"), "bj@altern.org");
36
    about.addAuthor(ki18n("Jimmy Gilles"), KLocalizedString(), "jimmygilles@gmail.com");
37
    about.addAuthor(ki18n("Rolf Eike Beer"), ki18n("Maintainer"), "kde@opensource.sf-tec.de");
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
38

39
    KCmdLineArgs::init(argc, argv, &about);
40
41
42
43

    KCmdLineOptions options;
    options.add("e", ki18n("Encrypt file"));
    options.add("k", ki18n("Open key manager"));
44
    options.add("d", ki18n("Open editor"));
45
46
47
48
49
    options.add("s", ki18n("Show encrypted file"));
    options.add("S", ki18n("Sign file"));
    options.add("V", ki18n("Verify signature"));
    options.add("X", ki18n("Shred file"));
    options.add("+[File]", ki18n("File to open"));
50
51
    KCmdLineArgs::addCmdLineOptions(options);
    KUniqueApplication::addCmdLineOptions();
52

53
54
    if (!KUniqueApplication::start())
        return 0;
55

56
57
58
59
    //KgpgAppletApp *app;
    KApplication *app;
    app = new KgpgAppletApp;
    return app->exec();
60

61
62
    /*
    KUniqueApplication app;
63

64
65
    // register ourselves as a dcop client
    // app.dcopClient()->registerAs(app.name(), false);
66

67
68
69
70
    kgpgapplet widget;// = new kgpgapplet("kgpg");
    widget.show();
    return app.exec();
    */
71
}