From 47b6c2b771b9e90570f84e224fe9e638d8ddd784 Mon Sep 17 00:00:00 2001 From: bsongis Date: Thu, 6 Mar 2014 12:10:26 +0100 Subject: [PATCH] Last minute changes before alpha release --- companion/src/mainwindow.cpp | 10 ++++++---- companion/src/mainwindow.h | 2 +- companion/targets/windows/companion-vs.nsi.in | 16 ++++++++-------- companion/targets/windows/license.txt | 4 ++-- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index d419ed99f..aff8ad8cc 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -1530,18 +1530,20 @@ MdiChild *MainWindow::createMdiChild() return child; } -QAction * MainWindow::addAct(QString icon, QString sName, QString lName, QKeySequence::StandardKey shortcut, const char *slot) +QAction * MainWindow::addAct(QString icon, QString sName, QString lName, QKeySequence::StandardKey shortcut, const char *slot, QObject *slotObj) { QAction * newAction = new QAction( this ); if (!icon.isEmpty()) - newAction->setIcon(CompanionIcon(icon)); + newAction->setIcon(CompanionIcon(icon)); if (!sName.isEmpty()) newAction->setText(sName); if (!lName.isEmpty()) newAction->setStatusTip(lName); if (shortcut != 0) newAction->setShortcuts(shortcut); - connect(newAction, SIGNAL(triggered()), this, slot); + if (slotObj == NULL) + slotObj = this; + connect(newAction, SIGNAL(triggered()), slotObj, slot); return newAction; } @@ -1584,7 +1586,7 @@ void MainWindow::createActions() openAct = addAct("open.png", tr("Open Models+Settings..."), tr("Open Models and Settings file"), QKeySequence::Open, SLOT(openFile())); saveAct = addAct("save.png", tr("Save Models+Settings..."), tr("Save Models and Settings file"), QKeySequence::Save, SLOT(save())); saveAsAct = addAct("saveas.png", tr("Save Models+Settings as..."), tr("Save Models and Settings file"), QKeySequence::SaveAs, SLOT(saveAs())); - exitAct = addAct("exit.png", tr("Exit"), tr("Exit the application"), QKeySequence::Quit, SLOT(newFile())); + exitAct = addAct("exit.png", tr("Exit"), tr("Exit the application"), QKeySequence::Quit, SLOT(closeAllWindows()), qApp); cutAct = addAct("cut.png", tr("Cut Model"), tr("Cut current model to the clipboard"), QKeySequence::Cut, SLOT(cut())); copyAct = addAct("copy.png", tr("Copy Model..."), tr("Copy current model to the clipboard"), QKeySequence::Copy, SLOT(copy())); pasteAct = addAct("paste.png", tr("Paste Model..."), tr("Paste model from clipboard"), QKeySequence::Paste, SLOT(paste())); diff --git a/companion/src/mainwindow.h b/companion/src/mainwindow.h index 8bfca1fa8..37535e94b 100644 --- a/companion/src/mainwindow.h +++ b/companion/src/mainwindow.h @@ -158,7 +158,7 @@ private slots: private: void createActions(); - QAction * addAct(QString, QString, QString, QKeySequence::StandardKey, const char *); + QAction * addAct(QString, QString, QString, QKeySequence::StandardKey, const char *, QObject *slotObj=NULL); QAction * addAct(QActionGroup *, QString, QString, const char *); QAction * addAct(QString, QString, QString, const char *); diff --git a/companion/targets/windows/companion-vs.nsi.in b/companion/targets/windows/companion-vs.nsi.in index 64432c62d..7ce8351fb 100644 --- a/companion/targets/windows/companion-vs.nsi.in +++ b/companion/targets/windows/companion-vs.nsi.in @@ -12,14 +12,14 @@ ;General ;Name and file - Name "OpenTX companion" + Name "OpenTX Companion" OutFile "companionInstall_v@C9X_VERSION@.exe" ;Default installation folder - InstallDir "$PROGRAMFILES\OpenTX companion" + InstallDir "$PROGRAMFILES\OpenTX" ;Get installation folder from registry if available - InstallDirRegKey HKCU "Software\companion9x" "" + InstallDirRegKey HKCU "Software\OpenTX" "" ;Compressor options SetCompressor /FINAL /SOLID lzma @@ -66,7 +66,7 @@ ;Start Menu Folder Page Configuration !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" - !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\companion9x" + !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\OpenTX" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder @@ -77,7 +77,7 @@ !define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_FINISHPAGE_RUN !define MUI_FINISHPAGE_RUN_CHECKED - !define MUI_FINISHPAGE_RUN_TEXT "Launch companion" + !define MUI_FINISHPAGE_RUN_TEXT "Launch OpenTX Companion" !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink" # !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED # !define MUI_FINISHPAGE_SHOWREADME $INSTDIR\readme.txt @@ -95,7 +95,7 @@ ;-------------------------------- ;Installer Sections -Section "OpenTX companion" SecDummy +Section "OpenTX Companion" SecDummy SetOutPath "$INSTDIR" @@ -129,7 +129,7 @@ Section "OpenTX companion" SecDummy SetOutPath "$INSTDIR" ;Store installation folder - WriteRegStr HKCU "Software\companion9x" "" $INSTDIR + WriteRegStr HKCU "Software\OpenTX" "" $INSTDIR ;Associate with extentions ,bin and .hex ${registerExtension} "$INSTDIR\companion.exe" ".bin" "BIN_File" @@ -207,7 +207,7 @@ Section "Uninstall" Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" RMDir "$SMPROGRAMS\$StartMenuFolder" - DeleteRegKey /ifempty HKCU "Software\companion9x" + DeleteRegKey /ifempty HKCU "Software\OpenTX" SectionEnd diff --git a/companion/targets/windows/license.txt b/companion/targets/windows/license.txt index 62dda6edd..383da8e36 100644 --- a/companion/targets/windows/license.txt +++ b/companion/targets/windows/license.txt @@ -1,6 +1,6 @@ -Copyright © 2011-2013 Bertrand Songis and Romolo Manfredini +Copyright © 2011-2014 OpenTX team -companion9x is based on code named eePe by author - Erez Raviv +OpenTX Companion is based on code named eePe by author - Erez Raviv This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.