introduced the possibility to choose the wanted on screen keyboard

preferencesAboutTextFull
Claudio Valerio 10 years ago
parent 4781a9bfc2
commit a9db6c44b0
  1. 29
      src/board/UBBoardController.cpp
  2. 2
      src/core/UBSettings.cpp
  3. 2
      src/core/UBSettings.h

@ -88,6 +88,7 @@
#ifdef Q_WS_X11
#include <QProcess>
bool onboardIsAlreadyRunning = true;
#endif
UBBoardController::UBBoardController(UBMainWindow* mainWindow)
@ -165,8 +166,10 @@ void UBBoardController::init()
UBBoardController::~UBBoardController()
{
#ifdef Q_WS_X11
QProcess newProcess;
newProcess.startDetached("killall onboard");
if(!onboardIsAlreadyRunning){
QProcess newProcess;
newProcess.startDetached("killall onboard");
}
#endif
delete mDisplayView;
}
@ -826,8 +829,26 @@ void UBBoardController::showKeyboard(bool show)
UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector);
#ifdef Q_WS_X11
QProcess newProcess;
newProcess.startDetached("/usr/bin/onboard");
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