From 05881204465655b9657891cddb195e37dd5dd020 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Wed, 11 Jun 2008 13:03:47 +0000 Subject: 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 --- src/ui/mainwindow.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/ui/mainwindow.cpp') 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 #include #include +#include #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() -- cgit v1.2.3-13-gbd6f