X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmain.cpp;h=525a3c3d76e09d0cc93f6d001aecc785c5372527;hb=806e12388f8667cbb15b0c8e6eb0b49539c52b73;hp=362ad4a3bf5f396526d1f2fa434d76eb52b9907e;hpb=1a2992bda90d670e0ef1ee79f34491e54bd248aa;p=kdenlive diff --git a/src/main.cpp b/src/main.cpp index 362ad4a3..525a3c3d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,6 +18,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ +#include "kdenlive-config.h" +#include "mainwindow.h" #include #include @@ -25,20 +27,29 @@ #include #include //new -#include "mainwindow.h" + +#if defined(__APPLE_KDE__) || defined(__DARWIN__) +#include +#endif + +static const char version[] = VERSION; int main(int argc, char *argv[]) { - KAboutData aboutData("kdenlive", "kdenlive", - ki18n("Kdenlive"), "0.7", + KAboutData aboutData(QByteArray("kdenlive"), QByteArray("kdenlive"), + ki18n("Kdenlive"), QByteArray(version), ki18n("An open source video editor."), KAboutData::License_GPL, ki18n("Copyright (c) 2008 Development team")); - aboutData.addAuthor(ki18n("Jean-Baptiste Mardelle"), ki18n("Mlt porting, KDE4 porting, Main developer"), "jb@kdenlive.org"); - aboutData.addAuthor(ki18n("Marco Gittler"), ki18n("MltConnection, Transition, Effect, Timeline Developer"), "g.marco@freenet.de"); + aboutData.addAuthor(ki18n("Jean-Baptiste Mardelle"), ki18n("MLT porting, KDE4 porting, Main developer"), "jb@kdenlive.org"); + aboutData.addAuthor(ki18n("Marco Gittler"), ki18n("MLT Connection, Transition, Effect, Timeline Developer"), "g.marco@freenet.de"); aboutData.setHomepage("http://kdenlive.org"); + aboutData.setCustomAuthorText(ki18n("Please report bugs to http://kdenlive.org/mantis"), ki18n("Please report bugs to http://kdenlive.org/mantis")); + aboutData.setTranslator(ki18n("NAME OF TRANSLATORS"), ki18n("EMAIL OF TRANSLATORS")); + KCmdLineArgs::init(argc, argv, &aboutData); - KCmdLineOptions options; //new + KCmdLineOptions options; + options.add("mlt-path ", ki18n("Set the path for MLT environnement")); options.add("+[file]", ki18n("Document to open")); //new KCmdLineArgs::addCmdLineOptions(options); //new @@ -58,13 +69,15 @@ int main(int argc, char *argv[]) { ++n; } } else { - MainWindow* window = new MainWindow(); - window->show(); - KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); //new - if (args->count()) { //new - window->openFile(args->url(0)); //new + + QString mltPath = args->getOption("mlt-path"); + KUrl url; + if (args->count()) { + url = args->url(0); } + MainWindow* window = new MainWindow(mltPath, url); + window->show(); args->clear(); }