From 8883b2207f6d7fc0d7e9a8c7c14f1f31d09085dd Mon Sep 17 00:00:00 2001 From: George Ember Date: Wed, 21 Sep 2016 17:12:02 +0300 Subject: Translated to Greek MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Finished. Not 100% sure about Trigger meaning Trigger Terminal Εμφάνιση/Απόκρυψη Γραμμής Εντολών --- .../desktop-utils/lumina-terminal/i18n/l-terminal_el.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_el.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_el.ts index fe7211a7..2d9b7119 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_el.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_el.ts @@ -6,12 +6,12 @@ Copy Selection - + Αντιγραφή Επιλογής Paste - + Επικόλληση @@ -19,27 +19,27 @@ Trigger Terminal - + Εμφάνιση/Απόκρυψη Γραμμής Εντολών Top of Screen - + Επάνω Μέρος της Οθόνης Close Terminal - + Κλείσιμο Γραμμής Εντολών Move To Monitor - + Μετακίνηση στην Οθόνη Monitor %1 - + Οθόνη %1 -- cgit From 1213e0bf433a4dcf7f586be83689ced072cac411 Mon Sep 17 00:00:00 2001 From: Koljasha Date: Thu, 22 Sep 2016 06:10:06 +0000 Subject: Translated using Weblate (l_TERMINAL@ru (generated)) Currently translated at 0.0% (0 of 7 strings) --- .../lumina-terminal/i18n/l-terminal_ru.ts | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ru.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ru.ts index 72ca44df..6fa3012b 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ru.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ru.ts @@ -1,45 +1,45 @@ - + TerminalWidget - + Copy Selection - + Копировать выбранное - + Paste - + Вставить TrayIcon - + Trigger Terminal - + Запуск терминала - + Top of Screen - + Всегда наверху - + Close Terminal - + Закрыть терминал - + Move To Monitor - + Переместить на экран - + Monitor %1 - + Экран: %1 -- cgit From c1773d45e8bdcea2c6f39e2046b84e7cba9f13ba Mon Sep 17 00:00:00 2001 From: Luna Jernberg Date: Fri, 23 Sep 2016 07:29:42 +0000 Subject: Translated using Weblate (l_TERMINAL@sv (generated)) Currently translated at 71.4% (5 of 7 strings) --- .../lumina-terminal/i18n/l-terminal_sv.ts | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sv.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sv.ts index aca148d4..5e9949e8 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sv.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sv.ts @@ -1,45 +1,45 @@ - + TerminalWidget - + Copy Selection - + Kopiera markering - + Paste - + Klistra in TrayIcon - + Trigger Terminal - + Top of Screen - + Close Terminal - + Stäng terminal - + Move To Monitor - + Flytta till skärm - + Monitor %1 - + Skärm %1 -- cgit From f8d373e5b86c9b3d8f713ad7f2ef4dccf59031a5 Mon Sep 17 00:00:00 2001 From: Moo Date: Fri, 23 Sep 2016 08:49:32 +0000 Subject: Translated using Weblate (l_TERMINAL@lt (generated)) Currently translated at 100.0% (7 of 7 strings) --- .../lumina-terminal/i18n/l-terminal_lt.ts | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_lt.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_lt.ts index 473a5429..9f67c4d1 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_lt.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_lt.ts @@ -1,45 +1,45 @@ - + TerminalWidget - + Copy Selection - + Kopijuoti žymėjimą - + Paste - + Įdėti TrayIcon - + Trigger Terminal - + Perjungti terminalą - + Top of Screen - + Ekrano viršuje - + Close Terminal - + Užverti terminalą - + Move To Monitor - + Perkelti į monitorių - + Monitor %1 - + Monitorius %1 -- cgit From 8002ac17f196db1d50adc6fb97d1dacbe156f266 Mon Sep 17 00:00:00 2001 From: George Ember Date: Fri, 23 Sep 2016 13:22:41 +0300 Subject: Update l-terminal_el.ts --- src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_el.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_el.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_el.ts index 2d9b7119..bb98a8ac 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_el.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_el.ts @@ -24,7 +24,7 @@ Top of Screen - Επάνω Μέρος της Οθόνης + Επάνω Μέρος της Οθόνης -- cgit From 9e2c8b27ec78b7a7f6a8eae8cc262193e1a25e9c Mon Sep 17 00:00:00 2001 From: Martin Orszulik Date: Mon, 26 Sep 2016 07:38:54 +0000 Subject: Translated using Weblate (l_TERMINAL@cs (generated)) Currently translated at 57.1% (4 of 7 strings) --- .../lumina-terminal/i18n/l-terminal_cs.ts | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts index 3d4e65ac..639d51a0 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts @@ -1,45 +1,45 @@ - + TerminalWidget - + Copy Selection - + Kopírovat výběr - + Paste - + Vložit TrayIcon - + Trigger Terminal - + Top of Screen - + Close Terminal - + Zavřít terminál - + Move To Monitor - + Monitor %1 - + Obrazovka %1 -- cgit From e04884dacee432babad11845a5979878acc8e7fb Mon Sep 17 00:00:00 2001 From: Oscar Andrea Merandi Date: Sun, 25 Sep 2016 14:31:26 +0000 Subject: Translated using Weblate (l_TERMINAL@it (generated)) Currently translated at 28.5% (2 of 7 strings) --- .../lumina-terminal/i18n/l-terminal_it.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_it.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_it.ts index 6254e61d..b9236d74 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_it.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_it.ts @@ -1,43 +1,43 @@ - + TerminalWidget - + Copy Selection - + Paste - + Incolla TrayIcon - + Trigger Terminal - + Top of Screen - + Close Terminal - + Chiudi terminale - + Move To Monitor - + Monitor %1 -- cgit From e9e74dc7fb2adc47abf9e5d6000415d91719f68a Mon Sep 17 00:00:00 2001 From: Davidmp Date: Tue, 27 Sep 2016 16:25:04 +0000 Subject: Translated using Weblate (l_TERMINAL@ca (generated)) Currently translated at 100.0% (7 of 7 strings) --- .../lumina-terminal/i18n/l-terminal_ca.ts | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts index 7a71ef9e..b25e0898 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts @@ -1,45 +1,45 @@ - + TerminalWidget - + Copy Selection - + Copia la selecció - + Paste - + Enganxa TrayIcon - + Trigger Terminal - + Activa el terminal - + Top of Screen - + A dalt de tot de la pantalla - + Close Terminal - + Tanca el terminal - + Move To Monitor - + Desplaça al monitor - + Monitor %1 - + Monitor %1 -- cgit From c08971c05afa609390a182f0322f33aaa5562123 Mon Sep 17 00:00:00 2001 From: J Darabos Date: Mon, 3 Oct 2016 18:07:40 +0000 Subject: Translated using Weblate (l_TERMINAL@hu (generated)) Currently translated at 100.0% (7 of 7 strings) --- .../lumina-terminal/i18n/l-terminal_hu.ts | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hu.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hu.ts index d66711cb..3af80820 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hu.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hu.ts @@ -1,45 +1,45 @@ - + TerminalWidget - + Copy Selection - + Kijelöltek Másolása - + Paste - + Beilleszt TrayIcon - + Trigger Terminal - + Terminál Kiszögezése - + Top of Screen - + Képernyő teteje - + Close Terminal - + Terminál Bezárása - + Move To Monitor - + Monitorra mozgatás - + Monitor %1 - + %1. ik Montior -- cgit From 2b06c7d1e1e5701e01802edecb7c17321918f47c Mon Sep 17 00:00:00 2001 From: YAMASHIRO Jun Date: Mon, 3 Oct 2016 13:12:25 +0000 Subject: Translated using Weblate (l_TERMINAL@ja (generated)) Currently translated at 57.1% (4 of 7 strings) --- .../lumina-terminal/i18n/l-terminal_ja.ts | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ja.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ja.ts index e89ce4ac..a59009bc 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ja.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ja.ts @@ -1,45 +1,45 @@ - + TerminalWidget - + Copy Selection - + 選択された範囲をコピー - + Paste - + 貼り付け TrayIcon - + Trigger Terminal - + Top of Screen - + Close Terminal - + 端末を閉じる - + Move To Monitor - + Monitor %1 - + モニター %1 -- cgit From e13f1779779b05626a71e8a1ca70a844658f6938 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 20 Oct 2016 08:58:31 -0400 Subject: Make sure all the translation files are synced to the sources. --- .../desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts | 16 ++++++++-------- .../desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts | 16 ++++++++-------- .../desktop-utils/lumina-terminal/i18n/l-terminal_hu.ts | 16 ++++++++-------- .../desktop-utils/lumina-terminal/i18n/l-terminal_it.ts | 16 ++++++++-------- .../desktop-utils/lumina-terminal/i18n/l-terminal_ja.ts | 16 ++++++++-------- .../desktop-utils/lumina-terminal/i18n/l-terminal_lt.ts | 16 ++++++++-------- .../desktop-utils/lumina-terminal/i18n/l-terminal_ru.ts | 16 ++++++++-------- .../desktop-utils/lumina-terminal/i18n/l-terminal_sv.ts | 16 ++++++++-------- 8 files changed, 64 insertions(+), 64 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts index b25e0898..b8abea0c 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts @@ -1,15 +1,15 @@ - + TerminalWidget - + Copy Selection Copia la selecció - + Paste Enganxa @@ -17,27 +17,27 @@ TrayIcon - + Trigger Terminal Activa el terminal - + Top of Screen A dalt de tot de la pantalla - + Close Terminal Tanca el terminal - + Move To Monitor Desplaça al monitor - + Monitor %1 Monitor %1 diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts index 639d51a0..df929b63 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts @@ -1,15 +1,15 @@ - + TerminalWidget - + Copy Selection Kopírovat výběr - + Paste Vložit @@ -17,27 +17,27 @@ TrayIcon - + Trigger Terminal - + Top of Screen - + Close Terminal Zavřít terminál - + Move To Monitor - + Monitor %1 Obrazovka %1 diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hu.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hu.ts index 3af80820..3eaa9ae1 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hu.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hu.ts @@ -1,15 +1,15 @@ - + TerminalWidget - + Copy Selection Kijelöltek Másolása - + Paste Beilleszt @@ -17,27 +17,27 @@ TrayIcon - + Trigger Terminal Terminál Kiszögezése - + Top of Screen Képernyő teteje - + Close Terminal Terminál Bezárása - + Move To Monitor Monitorra mozgatás - + Monitor %1 %1. ik Montior diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_it.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_it.ts index b9236d74..46e1a7b1 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_it.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_it.ts @@ -1,15 +1,15 @@ - + TerminalWidget - + Copy Selection - + Paste Incolla @@ -17,27 +17,27 @@ TrayIcon - + Trigger Terminal - + Top of Screen - + Close Terminal Chiudi terminale - + Move To Monitor - + Monitor %1 diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ja.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ja.ts index a59009bc..1a6f4668 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ja.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ja.ts @@ -1,15 +1,15 @@ - + TerminalWidget - + Copy Selection 選択された範囲をコピー - + Paste 貼り付け @@ -17,27 +17,27 @@ TrayIcon - + Trigger Terminal - + Top of Screen - + Close Terminal 端末を閉じる - + Move To Monitor - + Monitor %1 モニター %1 diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_lt.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_lt.ts index 9f67c4d1..21184b81 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_lt.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_lt.ts @@ -1,15 +1,15 @@ - + TerminalWidget - + Copy Selection Kopijuoti žymėjimą - + Paste Įdėti @@ -17,27 +17,27 @@ TrayIcon - + Trigger Terminal Perjungti terminalą - + Top of Screen Ekrano viršuje - + Close Terminal Užverti terminalą - + Move To Monitor Perkelti į monitorių - + Monitor %1 Monitorius %1 diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ru.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ru.ts index 6fa3012b..47c8f8c6 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ru.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ru.ts @@ -1,15 +1,15 @@ - + TerminalWidget - + Copy Selection Копировать выбранное - + Paste Вставить @@ -17,27 +17,27 @@ TrayIcon - + Trigger Terminal Запуск терминала - + Top of Screen Всегда наверху - + Close Terminal Закрыть терминал - + Move To Monitor Переместить на экран - + Monitor %1 Экран: %1 diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sv.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sv.ts index 5e9949e8..486a361b 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sv.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sv.ts @@ -1,15 +1,15 @@ - + TerminalWidget - + Copy Selection Kopiera markering - + Paste Klistra in @@ -17,27 +17,27 @@ TrayIcon - + Trigger Terminal - + Top of Screen - + Close Terminal Stäng terminal - + Move To Monitor Flytta till skärm - + Monitor %1 Skärm %1 -- cgit From 7ab900e41f5f15adccd573d459a80fe60cf6a044 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 7 Nov 2016 13:52:20 -0500 Subject: LARGE UPDATE: 1) Dismantle the Lumina library completely. 2) Setup lots of small subproject files (.pri) for the individual classes within the old library. 3) Move all the Lumina binaries to use the new subproject files 4) Split up the LuminaUtils class/files into LUtils and LDesktopUtils (generic utilities, and desktop-specific utilities) --- src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp | 4 ++-- src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp b/src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp index ea970df9..52e15314 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include TrayIcon::TrayIcon() : QSystemTrayIcon(){ //Create the child widgets here @@ -169,4 +169,4 @@ void TrayIcon::TermHidden(){ void TrayIcon::TermVisible(){ termVisible = true; -} \ No newline at end of file +} diff --git a/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro b/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro index ada7110b..4c623087 100644 --- a/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro +++ b/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro @@ -5,6 +5,12 @@ QT += core gui widgets network TARGET = lumina-terminal target.path = $${L_BINDIR} +#include all the special classes from the Lumina tree +include(../../core/libLumina/LUtils.pri) #includes LUtils +include(../../core/libLumina/LuminaXDG.pri) +include(../../core/libLumina/LuminaSingleApplication.pri) +include(../../core/libLumina/LuminaThemes.pri) + HEADERS += TrayIcon.h \ TermWindow.h \ TerminalWidget.h \ @@ -17,10 +23,8 @@ SOURCES += main.cpp \ TtyProcess.cpp -LIBS += -lLuminaUtils -lncurses - +LIBS += -lncurses -DEPENDPATH += ../../libLumina TRANSLATIONS = i18n/l-terminal_af.ts \ i18n/l-terminal_ar.ts \ -- cgit From 135fd7e158e8c4c030beb8f9c64bc24303a07da7 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 10 Nov 2016 10:11:28 -0500 Subject: Disable the theme engine from the desktop-utilities. Also start pruning unneeded libLumina classes from the desktop utils. --- src-qt5/desktop-utils/lumina-terminal/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/main.cpp b/src-qt5/desktop-utils/lumina-terminal/main.cpp index 7375b074..a316ff35 100644 --- a/src-qt5/desktop-utils/lumina-terminal/main.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/main.cpp @@ -34,13 +34,13 @@ int main(int argc, char *argv[]) { } //Now go ahead and setup the app - LuminaThemeEngine theme(&a); + //LuminaThemeEngine theme(&a); QApplication::setQuitOnLastWindowClosed(false); //Now start the tray icon TrayIcon tray; QObject::connect(&a, SIGNAL(InputsAvailable(QStringList)), &tray, SLOT(slotSingleInstance(QStringList)) ); - QObject::connect(&theme, SIGNAL(updateIcons()), &tray, SLOT(updateIcons()) ); + //QObject::connect(&theme, SIGNAL(updateIcons()), &tray, SLOT(updateIcons()) ); tray.parseInputs(a.inputlist); tray.show(); return a.exec(); -- cgit From e4f0a0c307e7b3eb1ec820777a1d15e38826d8b0 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 7 Dec 2016 13:12:27 -0500 Subject: Cleanup some more of the terminal functionality: 1) Auto-hide the window when it loses focus 2) Give the terminal widget focus when it is clicked on 3) When starting the PTY do one interaction with it programmatically to ensure it is *really* ready before the user starts using it. --- src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp | 10 +++++++++- src-qt5/desktop-utils/lumina-terminal/TermWindow.h | 4 +++- .../desktop-utils/lumina-terminal/TerminalWidget.cpp | 1 + src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp | 1 + src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp | 19 ++++++++++++++++++- src-qt5/desktop-utils/lumina-terminal/TtyProcess.h | 1 + 6 files changed, 33 insertions(+), 3 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp b/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp index b400ac6e..783fc482 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp @@ -57,7 +57,7 @@ TermWindow::TermWindow(QSettings *set) : QWidget(0, Qt::Window | Qt::BypassWindo connect(closeS, SIGNAL(activated()), this, SLOT(CloseWindow()) ); connect(prevTabS, SIGNAL(activated()), this, SLOT(Prev_Tab()) ); connect(nextTabS, SIGNAL(activated()), this, SLOT(Next_Tab()) ); - + connect(QApplication::instance(), SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(activeStatusChanged()) ); //Now set the defaults screennum = 0; //default value setTopOfScreen(true); //default value @@ -282,6 +282,14 @@ void TermWindow::AnimFinished(){ animRunning = -1; //done } +void TermWindow::activeStatusChanged(){ + //Note: Qt 5.6.1 returns the opposite value for isActiveWindow() (12/7/16) + //qDebug() << "active status changed:" << this->isActiveWindow() << (this == QApplication::activeWindow()); + if(animRunning>=0){ return; } //ignore this event - already changing + if(!this->isActiveWindow() && !this->isVisible()){ ShowWindow(); } + else if(this->isActiveWindow() && this->isVisible()){ HideWindow(); } +} + // =================== // PROTECTED // =================== diff --git a/src-qt5/desktop-utils/lumina-terminal/TermWindow.h b/src-qt5/desktop-utils/lumina-terminal/TermWindow.h index d68c5457..d21fe502 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TermWindow.h +++ b/src-qt5/desktop-utils/lumina-terminal/TermWindow.h @@ -56,7 +56,9 @@ private slots: void focusOnWidget(); //Animation finishing void AnimFinished(); - + //Window focus/active status changed + void activeStatusChanged(); + protected: void mouseMoveEvent(QMouseEvent*); diff --git a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp index d9099452..6342be59 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp @@ -471,6 +471,7 @@ void TerminalWidget::keyPressEvent(QKeyEvent *ev){ void TerminalWidget::mousePressEvent(QMouseEvent *ev){ this->setFocus(); + this->activateWindow(); if(ev->button()==Qt::RightButton){ QTextEdit::mousePressEvent(ev); }else if(ev->button()==Qt::MiddleButton){ diff --git a/src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp b/src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp index 52e15314..5198146e 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp @@ -145,6 +145,7 @@ void TrayIcon::updateScreenMenu(){ } } ScreenMenu->setVisible(!ScreenMenu->isEmpty()); + ScreenMenu->setEnabled(!ScreenMenu->isEmpty()); } void TrayIcon::TrayActivated(QSystemTrayIcon::ActivationReason reason){ diff --git a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp index 24124348..a1ee0be7 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp @@ -2,11 +2,13 @@ #include #include +#include TTYProcess::TTYProcess(QObject *parent) : QObject(parent){ childProc = 0; sn = 0; ttyfd = 0; + starting = true; } TTYProcess::~TTYProcess(){ @@ -59,6 +61,12 @@ bool TTYProcess::startTTY(QString prog, QStringList args, QString workdir){ connect(sn, SIGNAL(activated(int)), this, SLOT(checkStatus(int)) ); ttyfd = FD; qDebug() << " - PTY:" << ptsname(FD); + //BUG BYPASS - 12/7/16 + //If the PTY gets input fairly soon after starting, the PTY will re-print the initial line(s) + // So send the "newline" signal now to get things started + starting = true; + //writeTTY("\n"); //newline + //writeTTY(QByteArray("\x1b[2J") ); //clear display return true; } } @@ -97,12 +105,21 @@ QByteArray TTYProcess::readTTY(){ } bool bad = true; BA = CleanANSI(BA, bad); - if(bad){ + if(bad){ //incomplete fragent - read some more first fragBA = BA; return readTTY(); }else{ //qDebug() << "Read Data:" << BA; + if(starting && !BA.contains("\n") ){ + //qDebug() << "Starting phase 1:" << BA; + writeTTY("\n\b"); //newline + backspace + BA.clear(); + }else if(starting){ + //qDebug() << "Starting phase 2:" << BA; + BA.remove(0, BA.indexOf("\n")+1); + starting = false; + } return BA; } } diff --git a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h index 9b3873b0..1603fe5e 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h +++ b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h @@ -60,6 +60,7 @@ private: int ttyfd; QSocketNotifier *sn; QByteArray fragBA; //fragment ByteArray + bool starting; //==================================== // C Library function for setting up the PTY -- cgit From 0f18a11a64a6a112b5bf9e612c086da882f3c65f Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 7 Dec 2016 13:27:30 -0500 Subject: Disable the auto-hide on activation event - something weird is going on (probably due to the special flags on the terminal window). --- src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp b/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp index 783fc482..8ff3ecd1 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp @@ -286,8 +286,9 @@ void TermWindow::activeStatusChanged(){ //Note: Qt 5.6.1 returns the opposite value for isActiveWindow() (12/7/16) //qDebug() << "active status changed:" << this->isActiveWindow() << (this == QApplication::activeWindow()); if(animRunning>=0){ return; } //ignore this event - already changing - if(!this->isActiveWindow() && !this->isVisible()){ ShowWindow(); } - else if(this->isActiveWindow() && this->isVisible()){ HideWindow(); } + //if(!this->isActiveWindow() && !this->isVisible()){ ShowWindow(); } + //else if(this->isActiveWindow() this->isVisible()){ HideWindow(); } + //ReShowWindow(); } // =================== -- cgit From 0d3db8715c8668a0d5297ff8dc695ffd6dc3df62 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 8 Dec 2016 09:32:29 -0500 Subject: Fix up the auto-hide functionality within the terminal when the term window loses focus. --- src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp | 13 +++++++------ src-qt5/desktop-utils/lumina-terminal/TermWindow.h | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp b/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp index 8ff3ecd1..15cfe047 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp @@ -36,6 +36,11 @@ TermWindow::TermWindow(QSettings *set) : QWidget(0, Qt::Window | Qt::BypassWindo ANIM = new QPropertyAnimation(this, "geometry", this); ANIM->setDuration(300); //1/3 second animation connect(ANIM, SIGNAL(finished()), this, SLOT(AnimFinished()) ); + activeTimer = new QTimer(this); + activeTimer->setInterval(50); + activeTimer->setSingleShot(true); + connect(activeTimer, SIGNAL(timeout()), this, SLOT(activeStatusChanged()) ); + connect(QApplication::instance(), SIGNAL(applicationStateChanged(Qt::ApplicationState)), activeTimer, SLOT(start()) ); //Create the keyboard shortcuts //hideS = new QShortcut(QKeySequence(Qt::Key_Escape),this); closeS = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_Q),this); @@ -57,7 +62,6 @@ TermWindow::TermWindow(QSettings *set) : QWidget(0, Qt::Window | Qt::BypassWindo connect(closeS, SIGNAL(activated()), this, SLOT(CloseWindow()) ); connect(prevTabS, SIGNAL(activated()), this, SLOT(Prev_Tab()) ); connect(nextTabS, SIGNAL(activated()), this, SLOT(Next_Tab()) ); - connect(QApplication::instance(), SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(activeStatusChanged()) ); //Now set the defaults screennum = 0; //default value setTopOfScreen(true); //default value @@ -283,12 +287,9 @@ void TermWindow::AnimFinished(){ } void TermWindow::activeStatusChanged(){ - //Note: Qt 5.6.1 returns the opposite value for isActiveWindow() (12/7/16) - //qDebug() << "active status changed:" << this->isActiveWindow() << (this == QApplication::activeWindow()); if(animRunning>=0){ return; } //ignore this event - already changing - //if(!this->isActiveWindow() && !this->isVisible()){ ShowWindow(); } - //else if(this->isActiveWindow() this->isVisible()){ HideWindow(); } - //ReShowWindow(); + QWidget *active = QApplication::activeWindow(); + if(active==0 && this->isVisible()){ HideWindow(); } } // =================== diff --git a/src-qt5/desktop-utils/lumina-terminal/TermWindow.h b/src-qt5/desktop-utils/lumina-terminal/TermWindow.h index d21fe502..5f583126 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TermWindow.h +++ b/src-qt5/desktop-utils/lumina-terminal/TermWindow.h @@ -41,6 +41,7 @@ private: bool onTop, CLOSING; QPropertyAnimation *ANIM; int animRunning; //internal flag for what animation is currently running + QTimer *activeTimer; //Calculate the window geometry necessary based on screen/location void CalculateGeom(); -- cgit From 2fa1f4e1a16e74177b22bcb63d40acabfb8daa75 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 8 Dec 2016 12:49:09 -0500 Subject: Commit some more fixes for the terminal. Now the arrow keys work properly with the terminal again. --- .../lumina-terminal/TerminalWidget.cpp | 19 ++++--- .../desktop-utils/lumina-terminal/TtyProcess.cpp | 63 ++++++++++++++++++---- src-qt5/desktop-utils/lumina-terminal/TtyProcess.h | 1 + 3 files changed, 67 insertions(+), 16 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp index 6342be59..6893915b 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp @@ -93,10 +93,15 @@ void TerminalWidget::applyData(QByteArray data){ //qDebug() << "Data:" << data; for(int i=0; imoveCursor(QTextCursor::Left, QTextCursor::MoveAnchor); + //Backspace + if(!chars.isEmpty()){ chars.chop(1); } + else{ + QTextCursor cur = this->textCursor(); + cur.movePosition(QTextCursor::Left, QTextCursor::KeepAnchor, 1); + cur.removeSelectedText(); + this->setTextCursor(cur); + } + //}else if( data.at(i)=='\t' ){ //chars.append(" "); }else if( data.at(i)=='\x1B' ){ @@ -116,9 +121,9 @@ void TerminalWidget::applyData(QByteArray data){ }else if( data.at(i) != '\r' ){ //Special Check: if inserting text within a line, clear the rest of this line first - if(i==0 && this->textCursor().position() < this->document()->characterCount()-1){ + /*if(i==0 && this->textCursor().position() < this->document()->characterCount()-1){ applyANSI("[K"); - } + }*/ chars.append(data.at(i)); //Plaintext character - just add it here //qDebug() << "Insert Text:" << data.at(i) << CFMT.foreground().color() << CFMT.background().color(); @@ -462,7 +467,7 @@ void TerminalWidget::keyPressEvent(QKeyEvent *ev){ sendKeyPress(Qt::Key_End); //just in case the cursor is not at the end (TTY will split lines and such - ugly) } QByteArray ba; ba.append(ev->text()); //avoid any byte conversions - //qDebug() << "Forward Input:" << ba; + qDebug() << "Forward Input:" << ba; PROC->writeTTY(ba); } diff --git a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp index a1ee0be7..a92b33f8 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp @@ -9,6 +9,7 @@ TTYProcess::TTYProcess(QObject *parent) : QObject(parent){ sn = 0; ttyfd = 0; starting = true; + fixReply = -1; } TTYProcess::~TTYProcess(){ @@ -20,10 +21,25 @@ bool TTYProcess::startTTY(QString prog, QStringList args, QString workdir){ if(workdir=="~"){ workdir = QDir::homePath(); } QDir::setCurrent(workdir); QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); - setenv("TERM","xterm",1);//"vt100",1); //vt100: VT100 emulation support + setenv("TERM","vt220-color",1);//"vt102-color",1); //vt100: VT100 emulation support (QTerminal sets "xterm" here) unsetenv("TERMCAP"); - /*setenv("TERMCAP","mvterm|vv100|mvterm emulator with ANSI colors:\ - :pa#64:Co#8:AF=\E[3%dm:AB=\E[4%dm:op=\E[100m:tc=vt102:",1); //see /etc/termcap as well*/ + //setenv("TERMCAP","vt102-color",1); + /*setenv("TERMCAP",":do=2\E[B:co#80:li#24:cl=50\E[H\E[J:sf=2*\ED:\ + :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\ + :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\ + :md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:\ + :is=\E>\E[?1;3;4;5l\E[?7;8h\E[1;24r\E[24;1H:\ + :if=/usr/share/tabset/vt100:nw=2\EE:ho=\E[H:\ + :as=2\E(0:ae=2\E(B:\ + :ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||:\ + :rs=\E>\E[?1;3;4;5l\E[?7;8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\ + :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=\177:\ + :k0=\EOy:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\EOt:\ + :k6=\EOu:k7=\EOv:k8=\EOl:k9=\EOw:k;=\EOx:@8=\EOM:\ + :K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:pt:sr=2*\EM:xn:\ + :sc=2\E7:rc=2\E8:cs=5\E[%i%d;%dr:UP=2\E[%dA:DO=2\E[%dB:RI=2\E[%dC:\ + :LE=2\E[%dD:ct=2\E[3g:st=2\EH:ta=^I:ms:bl=^G:cr=^M:eo:it#8:\ + :RA=\E[?7l:SA=\E[?7h:po=\E[5i:pf=\E[4i:",1); //see /etc/termcap as well*/ QStringList filter = env.keys().filter("XTERM"); for(int i=0; i knownFixes; + if(knownFixes.isEmpty()){ knownFixes << "\x1b[C" << "\x1b[D"; } + fixReply = knownFixes.indexOf(output); ::write(ttyfd, output.data(), output.size()); } @@ -110,7 +124,9 @@ QByteArray TTYProcess::readTTY(){ fragBA = BA; return readTTY(); }else{ - //qDebug() << "Read Data:" << BA; + qDebug() << "Read Data:" << BA; + //BUG BYPASS - 12/7/16 + //If the PTY gets input fairly soon after starting, the PTY will re-print the initial line(s) if(starting && !BA.contains("\n") ){ //qDebug() << "Starting phase 1:" << BA; writeTTY("\n\b"); //newline + backspace @@ -120,6 +136,26 @@ QByteArray TTYProcess::readTTY(){ BA.remove(0, BA.indexOf("\n")+1); starting = false; } + //Apply known fixes for replies to particular inputs + if(fixReply >= 0){ + qDebug() << "Fix Reply:" <0){ + BA.remove(0,1); + BA.prepend("\x1b[C"); //just move the cursor - don't re-print that 1 character + } + break; + case 1: //Right arrow ("\x1b[D") - PTY reply clears the screen after printing only the first char (not everything) + if(BA.startsWith("\b")){ + BA.remove(0,1); + BA.prepend("\x1b[D"); //just move the cursor - don't send the "back" character (\b) + } + break; + } + fixReply = -1; //done with the fix - resume normal operations + //qDebug() << " - Fixed:" << BA; + } return BA; } } @@ -182,6 +218,15 @@ QByteArray TTYProcess::CleanANSI(QByteArray raw, bool &incomplete){ index = raw.indexOf("\x07"); } + //VT102 Identify request + index = raw.indexOf("\x1b[Z"); + while(index>=0){ + raw = raw.remove(index,1); + index = raw.indexOf("\x1b[Z"); + //Also send the proper reply to this identify request right away + writeTTY("\x1b[/Z"); + } + incomplete = false; return raw; } diff --git a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h index 1603fe5e..c2b483a9 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h +++ b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h @@ -61,6 +61,7 @@ private: QSocketNotifier *sn; QByteArray fragBA; //fragment ByteArray bool starting; + int fixReply; //flag for detecting particular inputs and "fixing" the reply to it as needed //==================================== // C Library function for setting up the PTY -- cgit From 2dbb9e2b705e22d82e8630a3d237e3562b65465a Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 8 Dec 2016 13:36:49 -0500 Subject: Apply a cursor fix for backspace *within* the middle of a line. --- src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp index a92b33f8..6321699e 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp @@ -98,7 +98,7 @@ void TTYProcess::closeTTY(){ void TTYProcess::writeTTY(QByteArray output){ //qDebug() << "Write:" << output; static QList knownFixes; - if(knownFixes.isEmpty()){ knownFixes << "\x1b[C" << "\x1b[D"; } + if(knownFixes.isEmpty()){ knownFixes << "\x1b[C" << "\x1b[D" << "\b"; } fixReply = knownFixes.indexOf(output); ::write(ttyfd, output.data(), output.size()); } @@ -136,22 +136,29 @@ QByteArray TTYProcess::readTTY(){ BA.remove(0, BA.indexOf("\n")+1); starting = false; } - //Apply known fixes for replies to particular inputs + //Apply known fixes for replies to particular inputs (mostly related to cursor position *within* the current line if(fixReply >= 0){ qDebug() << "Fix Reply:" <0){ BA.remove(0,1); BA.prepend("\x1b[C"); //just move the cursor - don't re-print that 1 character } break; - case 1: //Right arrow ("\x1b[D") - PTY reply clears the screen after printing only the first char (not everything) + case 1: //Left arrow ("\x1b[D") - PTY erases the previous character instead of moving the cursor if(BA.startsWith("\b")){ BA.remove(0,1); BA.prepend("\x1b[D"); //just move the cursor - don't send the "back" character (\b) } break; + case 2: //Backspace ("\b") - PTY works fine if on the end of the line, but when in the middle of a line it will backpace a number of times after clearing (same as left arrow issue) + if(BA.contains("\x1b[K")){ + while(BA.indexOf("\x1b[K") < BA.lastIndexOf("\b") ){ + BA.replace( BA.lastIndexOf("\b"), 1, "\x1b[D"); //just move the cursor left - don't send the "back" character (\b) + } + } + break; } fixReply = -1; //done with the fix - resume normal operations //qDebug() << " - Fixed:" << BA; -- cgit From adcdd6418b1b8838e56c50077168074938a51459 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 8 Dec 2016 14:29:28 -0500 Subject: Clean up a bit more of the Terminal interactions. --- .../lumina-terminal/TerminalWidget.cpp | 10 ++----- .../desktop-utils/lumina-terminal/TtyProcess.cpp | 32 ++++++++++++++-------- 2 files changed, 23 insertions(+), 19 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp index 6893915b..398d80c0 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp @@ -120,10 +120,6 @@ void TerminalWidget::applyData(QByteArray data){ i+=end; //move the final loop along - already handled these bytes }else if( data.at(i) != '\r' ){ - //Special Check: if inserting text within a line, clear the rest of this line first - /*if(i==0 && this->textCursor().position() < this->document()->characterCount()-1){ - applyANSI("[K"); - }*/ chars.append(data.at(i)); //Plaintext character - just add it here //qDebug() << "Insert Text:" << data.at(i) << CFMT.foreground().color() << CFMT.background().color(); @@ -136,7 +132,7 @@ void TerminalWidget::applyData(QByteArray data){ void TerminalWidget::applyANSI(QByteArray code){ //Note: the first byte is often the "[" character - qDebug() << "Handle ANSI:" << code; + //qDebug() << "Handle ANSI:" << code; if(code.length()==1){ //KEYPAD MODES if(code.at(0)=='='){ altkeypad = true; } @@ -419,7 +415,7 @@ void TerminalWidget::sendKeyPress(int key){ ba.append("\x1b[F"); break; } - qDebug() << "Forward Input:" << ba; + //qDebug() << "Forward Input:" << ba; if(!ba.isEmpty()){ PROC->writeTTY(ba); } } @@ -467,7 +463,7 @@ void TerminalWidget::keyPressEvent(QKeyEvent *ev){ sendKeyPress(Qt::Key_End); //just in case the cursor is not at the end (TTY will split lines and such - ugly) } QByteArray ba; ba.append(ev->text()); //avoid any byte conversions - qDebug() << "Forward Input:" << ba; + //qDebug() << "Forward Input:" << ba; PROC->writeTTY(ba); } diff --git a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp index 6321699e..e3ec64d8 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp @@ -4,6 +4,8 @@ #include #include +#define DEBUG 0 + TTYProcess::TTYProcess(QObject *parent) : QObject(parent){ childProc = 0; sn = 0; @@ -21,9 +23,9 @@ bool TTYProcess::startTTY(QString prog, QStringList args, QString workdir){ if(workdir=="~"){ workdir = QDir::homePath(); } QDir::setCurrent(workdir); QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); - setenv("TERM","vt220-color",1);//"vt102-color",1); //vt100: VT100 emulation support (QTerminal sets "xterm" here) + setenv("TERM","xterm",1); //"vt220-color",1);//"vt102-color",1); //vt100: VT100 emulation support (QTerminal sets "xterm" here) unsetenv("TERMCAP"); - //setenv("TERMCAP","vt102-color",1); + setenv("TERMCAP","vt220-color",1); /*setenv("TERMCAP",":do=2\E[B:co#80:li#24:cl=50\E[H\E[J:sf=2*\ED:\ :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\ :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\ @@ -60,12 +62,14 @@ bool TTYProcess::startTTY(QString prog, QStringList args, QString workdir){ cargs[i] = NULL; } } - qDebug() << "PTY Start:" << prog; + if(DEBUG){ qDebug() << "PTY Start:" << prog; } //Launch the process attached to a new PTY int FD = 0; pid_t tmp = LaunchProcess(FD, cprog, cargs); - qDebug() << " - PID:" << tmp; - qDebug() << " - FD:" << FD; + if(DEBUG){ + qDebug() << " - PID:" << tmp; + qDebug() << " - FD:" << FD; + } if(tmp<0){ return false; } //error else{ childProc = tmp; @@ -76,7 +80,7 @@ bool TTYProcess::startTTY(QString prog, QStringList args, QString workdir){ sn->setEnabled(true); connect(sn, SIGNAL(activated(int)), this, SLOT(checkStatus(int)) ); ttyfd = FD; - qDebug() << " - PTY:" << ptsname(FD); + if(DEBUG){ qDebug() << " - PTY:" << ptsname(FD); } starting = true; return true; } @@ -98,7 +102,7 @@ void TTYProcess::closeTTY(){ void TTYProcess::writeTTY(QByteArray output){ //qDebug() << "Write:" << output; static QList knownFixes; - if(knownFixes.isEmpty()){ knownFixes << "\x1b[C" << "\x1b[D" << "\b"; } + if(knownFixes.isEmpty()){ knownFixes << "\x1b[C" << "\x1b[D" << "\b" << "\x7F" << "\x08"; } fixReply = knownFixes.indexOf(output); ::write(ttyfd, output.data(), output.size()); } @@ -124,7 +128,7 @@ QByteArray TTYProcess::readTTY(){ fragBA = BA; return readTTY(); }else{ - qDebug() << "Read Data:" << BA; + if(DEBUG){ qDebug() << "Read Data:" << BA; } //BUG BYPASS - 12/7/16 //If the PTY gets input fairly soon after starting, the PTY will re-print the initial line(s) if(starting && !BA.contains("\n") ){ @@ -136,9 +140,11 @@ QByteArray TTYProcess::readTTY(){ BA.remove(0, BA.indexOf("\n")+1); starting = false; } - //Apply known fixes for replies to particular inputs (mostly related to cursor position *within* the current line + //Apply known fixes for replies to particular inputs (mostly related to cursor position *within* the current line) + // This appears to be primarily from the concept that the cursor position is always at the end of the line (old VT limitation?) + // so almost all these fixes are for cursor positioning within the current line if(fixReply >= 0){ - qDebug() << "Fix Reply:" <0){ @@ -152,7 +158,9 @@ QByteArray TTYProcess::readTTY(){ BA.prepend("\x1b[D"); //just move the cursor - don't send the "back" character (\b) } break; - case 2: //Backspace ("\b") - PTY works fine if on the end of the line, but when in the middle of a line it will backpace a number of times after clearing (same as left arrow issue) + case 2: //Backspace or delete - PTY works fine if on the end of the line, but when in the middle of a line it will backpace a number of times after clearing (same as left arrow issue) + case 3: + case 4: if(BA.contains("\x1b[K")){ while(BA.indexOf("\x1b[K") < BA.lastIndexOf("\b") ){ BA.replace( BA.lastIndexOf("\b"), 1, "\x1b[D"); //just move the cursor left - don't send the "back" character (\b) @@ -161,7 +169,7 @@ QByteArray TTYProcess::readTTY(){ break; } fixReply = -1; //done with the fix - resume normal operations - //qDebug() << " - Fixed:" << BA; + if(DEBUG){ qDebug() << " - Fixed:" << BA; } } return BA; } -- cgit From fba4fc2ffdb0eaa9e39e6b4e07e8941d6738d4e9 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 8 Dec 2016 15:51:56 -0500 Subject: Fix up the selection highlighting *during* the mouse movement. --- .../lumina-terminal/TerminalWidget.cpp | 24 +++++++++++++++------- .../desktop-utils/lumina-terminal/TerminalWidget.h | 1 + .../desktop-utils/lumina-terminal/TtyProcess.cpp | 24 ++++++++++++++++++---- 3 files changed, 38 insertions(+), 11 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp index 398d80c0..83474f04 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp @@ -19,7 +19,10 @@ TerminalWidget::TerminalWidget(QWidget *parent, QString dir) : QTextEdit(parent){ //Setup the text widget closing = false; - this->setStyleSheet("QTextEdit{ background: black; color: white; }"); + QPalette P = this->palette(); + P.setColor(QPalette::Base, Qt::black); + P.setColor(QPalette::Text, Qt::white); + this->setPalette(P); this->setLineWrapMode(QTextEdit::WidgetWidth); this->setAcceptRichText(false); this->setOverwriteMode(true); @@ -37,14 +40,15 @@ TerminalWidget::TerminalWidget(QWidget *parent, QString dir) : QTextEdit(parent) QFontDatabase FDB; QStringList fonts = FDB.families(QFontDatabase::Latin); for(int i=0; isetFont(QFont(fonts[i])); qDebug() << "Using Font:" << fonts[i]; break; } + if(FDB.isFixedPitch(fonts[i]) && FDB.isSmoothlyScalable(fonts[i]) ){ this->setFont(QFont(fonts[i])); qDebug() << "Using Font:" << fonts[i]; break; } + //if(FDB.isSmoothlyScalable(fonts[i]) ){ this->setFont(QFont(fonts[i])); qDebug() << "Using Font:" << fonts[i]; break; } } //Create/open the TTY port PROC = new TTYProcess(this); - qDebug() << "Open new TTY"; + //qDebug() << "Open new TTY"; //int fd; bool ok = PROC->startTTY( QProcessEnvironment::systemEnvironment().value("SHELL","/bin/sh"), QStringList(), dir); - qDebug() << " - opened:" << ok; + //qDebug() << " - opened:" << ok; this->setEnabled(PROC->isOpen()); contextMenu = new QMenu(this); copyA = contextMenu->addAction(LXDG::findIcon("edit-copy"), tr("Copy Selection"), this, SLOT(copySelection()) ); @@ -59,10 +63,14 @@ TerminalWidget::~TerminalWidget(){ aboutToClose(); } +void TerminalWidget::setTerminalFont(QFont font){ + this->setFont(font); +} + void TerminalWidget::aboutToClose(){ closing = true; if(PROC->isOpen()){ PROC->closeTTY(); } //TTY PORT - //delete PROC-> + } // ================== @@ -82,7 +90,7 @@ void TerminalWidget::InsertText(QString txt){ sel.cursor = cur; sels << sel; this->setExtraSelections(sels); - //qDebug() << "New Text. Format:" << CFMT.foreground() << CFMT.font(); + //qDebug() << "New Text Format:"<< txt << CFMT.foreground() << CFMT.font() << CFMT.fontWeight(); } void TerminalWidget::applyData(QByteArray data){ @@ -485,9 +493,11 @@ void TerminalWidget::mousePressEvent(QMouseEvent *ev){ } void TerminalWidget::mouseMoveEvent(QMouseEvent *ev){ - if(ev->button()==Qt::LeftButton){ + //qDebug() << "MouseMove Event" << ev->button() << ev->buttons() << Qt::LeftButton; + if(ev->buttons().testFlag(Qt::LeftButton) ){ selCursor.setPosition(this->cursorForPosition(ev->pos()).position(), QTextCursor::KeepAnchor); if(selCursor.hasSelection()){ this->setTextCursor(selCursor); } + //qDebug() << "Mouse Movement:" << selCursor.hasSelection(); }else{ QTextEdit::mouseMoveEvent(ev); } diff --git a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.h b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.h index bdec606b..16509cb4 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.h +++ b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.h @@ -23,6 +23,7 @@ public: TerminalWidget(QWidget *parent =0, QString dir=""); ~TerminalWidget(); + void setTerminalFont(QFont); void aboutToClose(); private: diff --git a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp index e3ec64d8..88eeb1ec 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp @@ -23,9 +23,10 @@ bool TTYProcess::startTTY(QString prog, QStringList args, QString workdir){ if(workdir=="~"){ workdir = QDir::homePath(); } QDir::setCurrent(workdir); QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); - setenv("TERM","xterm",1); //"vt220-color",1);//"vt102-color",1); //vt100: VT100 emulation support (QTerminal sets "xterm" here) - unsetenv("TERMCAP"); - setenv("TERMCAP","vt220-color",1); + setenv("TERM","vt220-color",1);//"vt102-color",1); //vt100: VT100 emulation support (QTerminal sets "xterm" here) + //unsetenv("TERM"); + //unsetenv("TERMCAP"); + setenv("TERMCAP","xterm",1); /*setenv("TERMCAP",":do=2\E[B:co#80:li#24:cl=50\E[H\E[J:sf=2*\ED:\ :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\ :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\ @@ -241,7 +242,22 @@ QByteArray TTYProcess::CleanANSI(QByteArray raw, bool &incomplete){ //Also send the proper reply to this identify request right away writeTTY("\x1b[/Z"); } - +//Terminal Status request + index = raw.indexOf("\x1b[5n"); + while(index>=0){ + raw = raw.remove(index,1); + index = raw.indexOf("\x1b[5n"); + //Also send the proper reply to this identify request right away + writeTTY("\x1b[c"); //everything ok + } +//Terminal Identify request + index = raw.indexOf("\x1b[c"); + while(index>=0){ + raw = raw.remove(index,1); + index = raw.indexOf("\x1b[?1;7c"); + //Also send the proper reply to this identify request right away + writeTTY("\x1b[/Z"); + } incomplete = false; return raw; } -- cgit From 3ef3d00b097a8ea9a4131e70e3c1dbd9ee1c38a5 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 14 Dec 2016 15:07:38 -0500 Subject: Add some more PTY work on the terminal. --- .../lumina-terminal/TerminalWidget.cpp | 3 ++ .../desktop-utils/lumina-terminal/TtyProcess.cpp | 38 ++++++++++++++++++---- 2 files changed, 34 insertions(+), 7 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-terminal') diff --git a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp index 83474f04..e009b1c0 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp @@ -148,6 +148,9 @@ void TerminalWidget::applyANSI(QByteArray code){ else{ qDebug() << "Unhandled ANSI Code:" << code; } + /*}else if(code.startsWith("[@") && code.length()==3){ + //Strange VT220? code - just print the character after the @ + InsertText( QString(code[2]) );*/ }else if(code.startsWith("[")){ // VT100 ESCAPE CODES //CURSOR MOVEMENT diff --git a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp index 88eeb1ec..6fddee39 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp @@ -25,8 +25,8 @@ bool TTYProcess::startTTY(QString prog, QStringList args, QString workdir){ QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); setenv("TERM","vt220-color",1);//"vt102-color",1); //vt100: VT100 emulation support (QTerminal sets "xterm" here) //unsetenv("TERM"); - //unsetenv("TERMCAP"); - setenv("TERMCAP","xterm",1); + unsetenv("TERMCAP"); + //setenv("TERMCAP","xterm",1); /*setenv("TERMCAP",":do=2\E[B:co#80:li#24:cl=50\E[H\E[J:sf=2*\ED:\ :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\ :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\ @@ -42,7 +42,7 @@ bool TTYProcess::startTTY(QString prog, QStringList args, QString workdir){ :K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:pt:sr=2*\EM:xn:\ :sc=2\E7:rc=2\E8:cs=5\E[%i%d;%dr:UP=2\E[%dA:DO=2\E[%dB:RI=2\E[%dC:\ :LE=2\E[%dD:ct=2\E[3g:st=2\EH:ta=^I:ms:bl=^G:cr=^M:eo:it#8:\ - :RA=\E[?7l:SA=\E[?7h:po=\E[5i:pf=\E[4i:",1); //see /etc/termcap as well*/ + :RA=\E[?7l:SA=\E[?7h:po=\E[5i:pf=\E[4i:",1); //see /etc/termcap as well */ QStringList filter = env.keys().filter("XTERM"); for(int i=0; i=0){ + raw = raw.remove(index,3); + index = raw.indexOf("\x1b[@"); + } //VT102 Identify request index = raw.indexOf("\x1b[Z"); @@ -242,7 +248,7 @@ QByteArray TTYProcess::CleanANSI(QByteArray raw, bool &incomplete){ //Also send the proper reply to this identify request right away writeTTY("\x1b[/Z"); } -//Terminal Status request + //Terminal Status request index = raw.indexOf("\x1b[5n"); while(index>=0){ raw = raw.remove(index,1); @@ -250,14 +256,15 @@ QByteArray TTYProcess::CleanANSI(QByteArray raw, bool &incomplete){ //Also send the proper reply to this identify request right away writeTTY("\x1b[c"); //everything ok } -//Terminal Identify request + //Terminal Identify request index = raw.indexOf("\x1b[c"); while(index>=0){ raw = raw.remove(index,1); - index = raw.indexOf("\x1b[?1;7c"); + index = raw.indexOf("\x1b[c"); //Also send the proper reply to this identify request right away writeTTY("\x1b[/Z"); } + incomplete = false; return raw; } @@ -283,7 +290,24 @@ pid_t TTYProcess::LaunchProcess(int& fd, char *prog, char **child_args){ //Adjust the slave side mode to RAW struct termios TSET; rc = tcgetattr(fds, &TSET); //read the current settings - cfmakesane(&TSET); //set the RAW mode on the settings ( cfmakeraw(&TSET); ) + cfmakesane(&TSET); //set the SANE mode on the settings ( cfmakeraw(&TSET); ) + //Set Input Modes + TSET.c_iflag |= IGNPAR; //ignore parity errors + TSET.c_iflag &= ~(IGNBRK | PARMRK | ISTRIP | ICRNL | IXON | IXANY | IXOFF); //ignore special characters + //Set Local Modes + TSET.c_lflag &= (ECHO | ECHONL | ECHOKE); //Echo inputs (normal, newline, and KILL character line break) + TSET.c_lflag &= ~ICANON ; //non-canonical mode (individual inputs - not a line-at-a-time) + //Set Control Modes + TSET.c_cflag |= CLOCAL; //Local Terminal Connection (non-modem) + //TSET.c_lflag &= ~IEXTEN; + //TSET.c_cflag &= ~(CSIZE | PARENB); + //TSET.c_cflag |= CS8; + //tt.c_oflag &= ~OPOST; // disable special output processing + //Set Output Modes + TSET.c_oflag |= OPOST; + //TSET.c_oflag |= OXTABS; + TSET.c_cc[VTIME] = 0; // timeout + //Now apply the settings tcsetattr(fds, TCSANOW, &TSET); //apply the changed settings //Change the controlling terminal in child thread to the slave PTY -- cgit