aboutsummaryrefslogtreecommitdiff
path: root/src/ui/mainwindow.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-06-11 13:03:47 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-06-11 13:03:47 +0000
commit05881204465655b9657891cddb195e37dd5dd020 (patch)
tree1ed20dadbc38f361dda65e2771bddd71a4a599f5 /src/ui/mainwindow.cpp
parentda088637dea9ba5aed112e88deb933201de8947a (diff)
downloadqmmp-05881204465655b9657891cddb195e37dd5dd020.tar.gz
qmmp-05881204465655b9657891cddb195e37dd5dd020.tar.bz2
qmmp-05881204465655b9657891cddb195e37dd5dd020.zip
enabled command line plugins support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@401 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/ui/mainwindow.cpp')
-rw-r--r--src/ui/mainwindow.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
index 1ffe511cd..f011668b5 100644
--- a/src/ui/mainwindow.cpp
+++ b/src/ui/mainwindow.cpp
@@ -30,6 +30,7 @@
#include <qmmpui/general.h>
#include <qmmpui/playlistparser.h>
#include <qmmpui/playlistformat.h>
+#include <qmmpui/commandlinemanager.h>
#include "textscroller.h"
#include "mainwindow.h"
@@ -47,11 +48,11 @@
#include "filedialog.h"
#include "listwidget.h"
#include "visualmenu.h"
-#include "commandlineoption.h"
+#include "builtincommandlineoption.h"
#define KEY_OFFSET 10
-MainWindow::MainWindow(const QStringList& args,CommandLineOptionManager* option_manager, QWidget *parent)
+MainWindow::MainWindow(const QStringList& args, BuiltinCommandLineOption* option_manager, QWidget *parent)
: QMainWindow(parent)
{
m_vis = 0;
@@ -798,12 +799,12 @@ bool MainWindow::processCommandArgs(const QStringList &slist,const QString& cwd)
QString str = slist[0];
if (str.startsWith("--")) // is it a command?
{
- if (m_option_manager->hasOption(str))
- {
+ if (CommandLineManager::hasOption(str))
+ m_generalHandler->executeCommand(str);
+ else if (m_option_manager->identify(str))
m_option_manager->executeCommand(str,this);
- }
else
- return false;
+ return FALSE;
}
else// maybe it is a list of files or dirs
{
@@ -819,7 +820,7 @@ bool MainWindow::processCommandArgs(const QStringList &slist,const QString& cwd)
setFileList(full_path_list);
}
}
- return true;
+ return TRUE;
}
void MainWindow::jumpToFile()