Better wording
[kdepim.git] / kleopatra / aboutdata.cpp
blob5bbaf812aae7adcd82b935f87245ace5a6cc5be8
1 /*
2 aboutdata.cpp
4 This file is part of Kleopatra, the KDE keymanager
5 Copyright (c) 2001,2002,2004 Klarälvdalens Datakonsult AB
7 Kleopatra is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 Kleopatra is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 In addition, as a special exception, the copyright holders give
22 permission to link the code of this program with any edition of
23 the Qt library by Trolltech AS, Norway (or with modified versions
24 of Qt that use the same license as Qt), and distribute linked
25 combinations including the two. You must obey the GNU General
26 Public License in all respects for all of the code used other than
27 Qt. If you modify this file, you may extend this exception to
28 your version of the file, but you are not obligated to do so. If
29 you do not wish to do so, delete this exception statement from
30 your version.
33 #include <config-kleopatra.h>
34 #include <version-kleopatra.h>
36 #include "aboutdata.h"
38 #include <utils/gnupg-helper.h>
40 #include <klocale.h>
41 #include <kiconloader.h>
43 #include <QPixmap>
44 #include <QVariant>
45 #include <QProcess>
46 #include <QTextStream>
48 #include <cassert>
50 using namespace Kleo;
52 static const char kleopatra_version[] = KLEOPATRA_VERSION_STRING;
53 static const char description[] = I18N_NOOP("Certificate Manager and Unified Crypto GUI");
55 struct about_data {
56 const char * name;
57 const char * desc;
58 const char * email;
59 const char * web;
62 static const about_data authors[] = {
63 { "Marc Mutz", I18N_NOOP("Current Maintainer"), "mutz@kde.org", 0 },
64 { "Steffen Hansen", I18N_NOOP("Former Maintainer"), "hansen@kde.org", 0 },
65 { "Matthias Kalle Dalheimer", I18N_NOOP("Original Author"), "kalle@kde.org", 0 },
69 static const about_data credits[] = {
70 { I18N_NOOP("David Faure"),
71 I18N_NOOP("Backend configuration framework, KIO integration"),
72 "faure@kde.org", 0 },
73 { I18N_NOOP("Michel Boyer de la Giroday"),
74 I18N_NOOP("Key-state dependent colors and fonts in the certificates list"),
75 "michel@klaralvdalens-datakonsult.se", 0 },
76 { I18N_NOOP("Thomas Moenicke"),
77 I18N_NOOP("Artwork"),
78 "tm@php-qt.org", 0 },
79 { I18N_NOOP("Frank Osterfeld"),
80 I18N_NOOP("Resident gpgme/win wrangler, UI Server commands and dialogs"),
81 "osterfeld@kde.org", 0 },
82 { I18N_NOOP("Karl-Heinz Zimmer"),
83 I18N_NOOP("DN display ordering support, infrastructure"),
84 "khz@kde.org", 0 },
88 AboutData::AboutData()
89 : KAboutData( "kleopatra", 0, ki18n("Kleopatra"),
90 kleopatra_version, ki18n(description), License_GPL,
91 ki18n("(c) 2002 Steffen\xC2\xA0Hansen, Matthias\xC2\xA0Kalle\xC2\xA0" "Dalheimer, Klar\xC3\xA4lvdalens\xC2\xA0" "Datakonsult\xC2\xA0" "AB\n"
92 "(c) 2004, 2007, 2008, 2009 Marc\xC2\xA0Mutz, Klar\xC3\xA4lvdalens\xC2\xA0" "Datakonsult\xC2\xA0" "AB") )
94 using ::authors;
95 using ::credits;
96 for ( unsigned int i = 0 ; i < sizeof authors / sizeof *authors ; ++i )
97 addAuthor( ki18n(authors[i].name), ki18n(authors[i].desc),
98 authors[i].email, authors[i].web );
99 for ( unsigned int i = 0 ; i < sizeof credits / sizeof *credits ; ++i )
100 addCredit( ki18n(credits[i].name), ki18n(credits[i].desc),
101 credits[i].email, credits[i].web );
105 static const char gpg4win_description[] = I18N_NOOP( "Gpg4win is an installer package for Windows for EMail and "
106 "file encryption using the core component GnuPG for Windows. "
107 "Both relevant cryptography standards are supported, OpenPGP "
108 "and S/MIME. Gpg4win and the software included with Gpg4win "
109 "are Free Software.");
112 static const char gpg4win_credits_description[] = I18N_NOOP( "This Free Software product was developed mostly as part of "
113 "commercial contracts by the following companies:"
114 "<ul><li><a href='http://intevation.net'>Intevation GmbH</a> "
115 "(Projekt coordination, QA, Compendium)</li>"
116 "<li><a href='http://www.g10code.com'>g10 Code GmbH</a> "
117 "(Crypto Funktionality, GpgOL, GpgEX, GPA)</li> "
118 "<li><a href='http://www.kdab.com'>KDAB</a> (Kleopatra)</li></ul>"
119 "The following persons have contributed (as of 20100706):");
121 static const char gpg4win_credits_persons[] = I18N_NOOP( "Till Adam<br>"
122 "Marcus Brinkmann<br>"
123 "Brigitte Hamilton<br>"
124 "Bernhard Herzog<br>"
125 "Werner Koch<br>"
126 "Colin Leroy<br>"
127 "Marc Mutz<br>"
128 "Marcel Newmann<br>"
129 "Frank Osterfeld<br>"
130 "Bernhard Reiter<br>"
131 "Florian v. Samson<br>"
132 "Emanuel Schütze<br>"
133 "Dr. Jan-Oliver Wagner");
136 static const char gpg4win_version_guessed[] = "2.0.1";
138 static QString gpg4win_version() {
140 QProcess p;
141 p.setReadChannelMode( QProcess::MergedChannels );
142 p.start( gpgConfPath(), QStringList( QLatin1String( "--version" ) ) );
143 if ( !p.waitForFinished() )
144 return QString::fromLatin1( "%1 (%2)" ).arg( QLatin1String( gpg4win_version_guessed ),
145 i18nc("Version string is a guess","guessed") );
146 const QString output = QTextStream( &p ).readAll() ;
147 QRegExp rx( QLatin1String( "\\(Gpg4win\\s+([^\\s)]+)\\)" ) );
148 if ( rx.indexIn( output ) != -1 )
149 return rx.cap(1);
150 else
151 return QString::fromLatin1( "%1 (%2)" ).arg( QLatin1String( gpg4win_version_guessed ),
152 i18nc("Version string is a guess","guessed") );
156 static QPixmap UserIcon_nocached2( const char * name ) {
157 // KIconLoader insists on caching all pixmaps. Since the splash
158 // screen is a particularly large 'icon' and used only once,
159 // caching is unneccesary and just hurts startup performance.
160 KIconLoader * const il = KIconLoader::global();
161 assert( il );
162 const QString iconPath = il->iconPath( QLatin1String( name ), KIconLoader::User );
163 return iconPath.isEmpty() ? il->unknown() : QPixmap( iconPath ) ;
167 AboutGpg4WinData::AboutGpg4WinData()
168 : KAboutData( "gpg4win", 0, ki18n("Gpg4win"),
169 gpg4win_version().toLatin1(), ki18n(gpg4win_description),
170 License_GPL, KLocalizedString(), KLocalizedString(), "http://www.gpg4win.de" )
172 setCustomAuthorText( ki18n(gpg4win_credits_description), ki18n(gpg4win_credits_description) );
173 addAuthor( ki18n(gpg4win_credits_persons), KLocalizedString(), 0 , 0 );
174 setProgramLogo( UserIcon_nocached2( "gpg4win" ) );