Modified the license text comment type.
[emufront] / src / mainwindow.cpp
index 7021e36..b59ea3b 100644 (file)
@@ -1,22 +1,23 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 2 as published by
-// the Free Software Foundation and appearing in the file gpl.txt included in the
-// packaging of this file.
-//
-// EmuFront is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
+/*
+** EmuFront
+** Copyright 2010 Mikko Keinänen
+**
+** This file is part of EmuFront.
+**
+**
+** EmuFront is free software: you can redistribute it and/or modify
+** it under the terms of the GNU General Public License version 2 as published by
+** the Free Software Foundation and appearing in the file gpl.txt included in the
+** packaging of this file.
+**
+** EmuFront is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with EmuFront.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #include <QtGui>
 #include "mainwindow.h"
 #include "emulauncher.h"
@@ -26,7 +27,9 @@
 #include "mediatypedialog.h"
 // TODO: deprecated
 #include "mediatypeeditview.h"
+// TODO: DEPRECATED
 #include "mediaimagepathmaindialog.h"
+#include "filepatheditview.h"
 // TODO: deprecated
 #include "setupmaindialog.h"
 #include "setupeditview.h"
@@ -68,7 +71,9 @@ MainWindow::MainWindow(bool reset)
     // TODO: deprecated
     mediaTypeDialog = 0;
     mdtDialog = 0;
+    // TODO: DEPRECATED
     mediaImagePathDialog = 0;
+    mediaImagePathView = 0;
     // TODO: deprecated
     setupMainDialog = 0;
     setupMainView = 0;
@@ -101,11 +106,17 @@ void MainWindow::createActions()
     configMediaTypeAction->setStatusTip(tr("Add, edit and delete media types"));
     connect(configMediaTypesAction, SIGNAL(triggered()), this, SLOT(configureMediaTypess()));
 
+    // TODO: DEPRECATED
     configMediaImagePathAction = new QAction(tr("Media &Image Paths"), this);
     configMediaImagePathAction->setStatusTip(tr("Configure media image file paths."));
     connect(configMediaImagePathAction, SIGNAL(triggered()),
         this, SLOT(configureMediaImagePaths()));
 
+    configMediaImagePathsAction = new QAction(tr("Set media &image paths"), this);
+    configMediaImagePathsAction->setStatusTip(tr("Add, edit and delete media image file paths."));
+    connect(configMediaImagePathsAction, SIGNAL(triggered()),
+        this, SLOT(configureMediaImagePathss()));
+
     // TODO: deprecated
     configSetupAction = new QAction(tr("S&etups"), this);
     configSetupAction->setStatusTip(tr("Configure set ups"));
@@ -183,6 +194,7 @@ void MainWindow::configureMediaTypess()
 }
 
 
+// TODO: DEPRECATED
 void MainWindow::configureMediaImagePaths()
 {
     if (!mediaImagePathDialog)
@@ -192,6 +204,15 @@ void MainWindow::configureMediaImagePaths()
     activateDialog(mediaImagePathDialog);
 }
 
+void MainWindow::configureMediaImagePathss()
+{
+    if (!mediaImagePathView)
+    {
+        mediaImagePathView = new FilePathEditView(this);
+    }
+    activateDialog(mediaImagePathView);
+}
+
 // TODO: deprecated
 void MainWindow::configureSetups()
 {
@@ -289,7 +310,9 @@ void MainWindow::createMenus()
     // TODO: deprecated
     configMenu->addAction(configSetupAction);
     configMenu->addAction(configSetupsAction);
+    // TODO: DEPRECATED
     configMenu->addAction(configMediaImagePathAction);
+    configMenu->addAction(configMediaImagePathsAction);
     configMenu->addAction(configEmulatorAction);
     configMenu->addSeparator();
     configMenu->addAction(manageDatFilesAction);