Merge branch 'SEM-WithoutDocumentMode' of 62.2.114.190:/home/git/git/OpenBoardPrivate into SEM-WithoutDocumentMode

preferencesAboutTextFull
Claudio Valerio 10 years ago
commit 56c866f573
  1. 2
      OpenBoard.pro
  2. 36
      src/board/UBBoardController.cpp
  3. 2
      src/core/UBSettings.cpp
  4. 2
      src/core/UBSettings.h

@ -11,7 +11,7 @@ CONFIG += debug_and_release \
VERSION_MAJ = 1
VERSION_MIN = 02
VERSION_TYPE = r # a = alpha, b = beta, rc = release candidate, r = release, other => error
VERSION_PATCH = 07
VERSION_PATCH = 09
VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION = $$replace(VERSION, "\\.r", "")

@ -86,6 +86,11 @@
#include "core/memcheck.h"
#ifdef Q_WS_X11
#include <QProcess>
bool onboardIsAlreadyRunning = true;
#endif
UBBoardController::UBBoardController(UBMainWindow* mainWindow)
: UBDocumentContainer(mainWindow->centralWidget())
, mMainWindow(mainWindow)
@ -160,6 +165,12 @@ void UBBoardController::init()
UBBoardController::~UBBoardController()
{
#ifdef Q_WS_X11
if(!onboardIsAlreadyRunning){
QProcess newProcess;
newProcess.startDetached("killall onboard");
}
#endif
delete mDisplayView;
}
@ -816,7 +827,32 @@ void UBBoardController::showKeyboard(bool show)
{
if(show)
UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector);
#ifdef Q_WS_X11
static bool isFirstTime = true;
if(isFirstTime){
QProcess isAlreadyRunningProcess;
QString psAuxGrepC = "ps aux";
isAlreadyRunningProcess.start(psAuxGrepC);
isAlreadyRunningProcess.waitForFinished();
QString output(isAlreadyRunningProcess.readAll());
if(output.count("onboard") != 0)
onboardIsAlreadyRunning = true;
else
onboardIsAlreadyRunning = false;
isFirstTime = false;
}
if(UBSettings::settings()->useSystemOnScreenKeybard->get().toBool()){
QProcess newProcess;
newProcess.startDetached("/usr/bin/onboard");
}
else
mPaletteManager->showVirtualKeyboard(show);
#else
mPaletteManager->showVirtualKeyboard(show);
#endif
}

@ -415,6 +415,8 @@ void UBSettings::init()
libIconSize = new UBSetting(this, "Library", "LibIconSize", defaultLibraryIconSize);
useSystemOnScreenKeybard = new UBSetting(this, "App", "UseSystemOnScreenKeybard", false);
cleanNonPersistentSettings();
}

@ -374,6 +374,8 @@ class UBSettings : public QObject
UBSetting* libIconSize;
UBSetting* useSystemOnScreenKeybard;
UBSetting* magnifierDrawingMode;
UBSetting* autoSaveInterval;

Loading…
Cancel
Save