diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-05-17 07:24:22 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-05-17 07:24:22 +0000 |
| commit | 96d8075d170c282112c5a88a975e672a9b4cd81e (patch) | |
| tree | be7dcf7ad8158678c1c8504f6347d526583ea15e /pokemodr/PokeModrUI.cpp | |
| parent | 5fbf25a91c75c59d56cb6b58c899323772f9176a (diff) | |
| download | sigen-96d8075d170c282112c5a88a975e672a9b4cd81e.tar.gz sigen-96d8075d170c282112c5a88a975e672a9b4cd81e.tar.xz sigen-96d8075d170c282112c5a88a975e672a9b4cd81e.zip | |
[FIX] Fixed up the .desktop and .spec files
[FIX] Command line arguments are now parsed
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@143 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/PokeModrUI.cpp')
| -rw-r--r-- | pokemodr/PokeModrUI.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/pokemodr/PokeModrUI.cpp b/pokemodr/PokeModrUI.cpp index e4c3a7e8..509d67b2 100644 --- a/pokemodr/PokeModrUI.cpp +++ b/pokemodr/PokeModrUI.cpp @@ -31,6 +31,7 @@ // KDE includes #include <KAction> +#include <KCmdLineArgs> #include <KFileDialog> #include <KIcon> #include <KLocalizedString> @@ -113,11 +114,18 @@ PokeModrUI::PokeModrUI(KConfigGroup config, KConfigGroup history, QWidget* paren toolbar->addAction(KStandardAction::quit(this, SLOT(quit()), toolbar)); addToolBar(toolbar); splitter->setSizes(QList<int>() << config.readEntry("treeWidth", 100) << config.readEntry("panelWidth", 100)); -// if (config.readEntry("reloadOnStart", false)) -// { -// for (int i = 0; i < config.readEntry("openedFiles", 0); ++i) -// openPokeMod(recent.urls().at(i)); -// } + KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); + if (args) + { + for(int i = 0; i < args->count(); ++i) + openPokemod(args->url(i)); + args->clear(); + } + if (config.readEntry("reloadOnStart", false)) + { + for (int i = 0; i < config.readEntry("openedFiles", 0); ++i) + openPokemod(m_recent->urls().at(i)); + } setAutoSaveSettings("MainWindow", true); treePokemod->setModel(new PokemodTreeModel(QStringList(), treePokemod)); connect(buttonApply, SIGNAL(clicked()), this, SLOT(update())); |
