00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <KUniqueApplication>
00022 #include <KAboutData>
00023 #include <KCmdLineArgs>
00024
00025 #include "importkradiorippersettings.h"
00026 #include "mainwindow.h"
00027 #include "propertyvalue.h"
00028 #include "version.h"
00029
00031 int main (int argc, char * argv[])
00032 {
00033 qRegisterMetaType<PropertyValue>("PropertyValue");
00034 qRegisterMetaType<PropertyValue::propertyValueType>("PropertyValue::propertyValueType");
00035 qRegisterMetaType<ripping::statusType>("ripping::statusType");
00036 KAboutData aboutData("kstreamripper",
00037 0,
00038 ki18nc("@title KAboutData: displayed program name", "KStreamRipper"),
00039 VERSION,
00040 ki18nc("@title KAboutData: short program description",
00041 "A program for recording audio streams."),
00042 KAboutData::License_Unknown,
00043 ki18nc("@info:credit KAboutData: copyright hint",
00044 "(c) 2008-2010 Lukas Sommer"),
00045 ki18nc("@info KAboutData: further hints", "Based on Streamripper."),
00046 "http://kstreamripper.sourceforge.net/",
00047
00048 QString("%1@gmail.com").arg("SommerLuk").toLatin1());
00049 aboutData.addAuthor(ki18nc("@info:credit KAboutData/Author: name (do not translate this!)",
00050 "Lukas Sommer"),
00051 ki18nc("@info:credit KAboutData/Author: function", "Main author"),
00052 QString("SommerLuk%1").arg("@gmail.com").toLatin1());
00053 aboutData.addCredit(ki18nc("@info:credit KAboutData/Credit: name",
00054 "Greg Sharp and the Streamripper team"),
00055 ki18nc("@info:credit KAboutData/Credit: function",
00056 "Authors of Streamripper, which is the base for KStreamRipper"),
00057 QString("gregsharp%1").arg("@users.sourceforge.net").toLatin1(),
00058 "http://streamripper.sourceforge.net/");
00059 aboutData.addCredit(ki18nc("@info:credit KAboutData/Credit: name", "Bill Marshman"),
00060 ki18nc("@info:credit KAboutData/Credit: function",
00061 "Review of the english translation"),
00062 QString("bill.marshman%1").arg("@gmail.com").toLatin1());
00063 aboutData.addCredit(ki18nc("@info:credit KAboutData/Credit: name", "Detlef Reichelt"),
00064 ki18nc("@info:credit KAboutData/Credit: function", "Packages for Packman"),
00065 QString("detlef%1").arg("@links2linux.de").toLatin1(),
00066 "http://packman.links2linux.org/package/kstreamripper");
00067 aboutData.addCredit(ki18nc("@info:credit KAboutData/Credit: name", "Rajko Bock"),
00068 ki18nc("@info:credit KAboutData/Credit: function",
00069 "Packages for Mandriva"),
00070 QString("info%1").arg("@randosweb.de").toLatin1(),
00071 "http://www.randosweb.de");
00072 aboutData.addCredit(ki18nc("@info:credit KAboutData/Credit: name", "Alessandro Ghersi"),
00073 ki18nc("@info:credit KAboutData/Credit: function", "Packages for Ubuntu"),
00074 QString("alessandro.ghersi%1").arg("@fastwebnet.it").toLatin1(),
00075 "http://packages.ubuntu.com/karmic/kstreamripper");
00076
00077
00078 aboutData.setTranslator(ki18nc("@info:credit NAME OF TRANSLATORS "
00079 "Dear translator. Enter your name here. This special "
00080 "string is used to display a credit to you at "
00081 "Help->About KStreamRipper->Translation. /// The "
00082 "expected format is a coma separated list. Example: 'First "
00083 "Translator,Second Translator,' is a list "
00084 "of 3 translators: 1: 'First Translator' 2: 'Second "
00085 "Translator' 3: no name is displayed, only email address",
00086 "Your names"),
00087 ki18nc("@info:credit EMAIL OF TRANSLATORS "
00088 "Dear translator. Enter your email address here. This special "
00089 "string is used to display a credit to you at "
00090 "Help->About KStreamRipper->Translation "
00091 "Or leave it blank when you do not want to publish your email "
00092 "address. If you want, you can use %1 instead of the 'at' "
00093 "sign (for anti-spam reasons). /// The expected "
00094 "format is a coma separated list. Example: "
00095 "'first%1nospam.please,,thierd%1nospam.please' is a list of 3 "
00096 "email addresses: 1: 'first@mail.com' 2: no address (only the "
00097 "name is displayed) 3: 'thierd@nospam.please' /// Attention: "
00098 "The length of the list is not determined by _this_ string, "
00099 "but by the translation of 'Your names'!",
00100 "Your emails").subs("@"));
00101 #if KDE_IS_VERSION(4,1,0)
00102
00103 aboutData.addLicenseText(
00104 ki18nc(
00105 "@info/plain (%1 will be replaced by the 'at' sign - doing it this way for anti-spam "
00106 "reasons. "
00107 "Please use this also in the translation file.) The text is a modified version of the "
00108 "text that is proposed in the GPL. See http://www.gnu.org/licenses/translations.html for "
00109 "possibly yet available translations.",
00110 "Copyright (C) 2008-2010 Lukas Sommer <SommerLuk%1><nl/>"
00111 "<nl/>"
00112 "This program is free software; you can redistribute it and/or<nl/>"
00113 "modify it under the terms of the GNU General Public License as<nl/>"
00114 "published by the Free Software Foundation; either version 2 of<nl/>"
00115 "the License or (at your option) version 3 or any later version<nl/>"
00116 "accepted by the membership of KDE e.V. (or its successor approved<nl/>"
00117 "by the membership of KDE e.V.), which shall act as a proxy<nl/>"
00118 "defined in Section 14 of version 3 of the license.<nl/>"
00119 "<nl/>"
00120 "This program is distributed in the hope that it will be useful,<nl/>"
00121 "but WITHOUT ANY WARRANTY; without even the implied warranty of<nl/>"
00122 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<nl/>"
00123 "GNU General Public License for more details.<nl/>"
00124 "<nl/>"
00125 "You should have received a copy of the GNU General Public License<nl/>"
00126 "along with this program. If not, "
00127 "see <http://www.gnu.org/licenses/>.").subs("@gmail.com"));
00128 #endif
00129 KCmdLineArgs::init(argc, argv, &aboutData);
00130 KUniqueApplication::addCmdLineOptions();
00131 if (!KUniqueApplication::start()) {
00132 return 0;
00133 };
00134 KUniqueApplication app;
00135 importKradioripperSettings::importSettingsIfDesired();
00136 if (app.isSessionRestored()) {
00137 kRestoreMainWindows< MainWindow >();
00138 } else {
00139 MainWindow * window = new MainWindow();
00140 window->setObjectName("KStreamRipperMainWindow#");
00141 window->show();
00142 };
00143 return app.exec();
00144 }