diff options
Diffstat (limited to 'src-qt5/desktop-utils/lumina-terminal')
18 files changed, 239 insertions, 86 deletions
diff --git a/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp b/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp index b400ac6e..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()) ); - //Now set the defaults screennum = 0; //default value setTopOfScreen(true); //default value @@ -282,6 +286,12 @@ void TermWindow::AnimFinished(){ animRunning = -1; //done } +void TermWindow::activeStatusChanged(){ + if(animRunning>=0){ return; } //ignore this event - already changing + QWidget *active = QApplication::activeWindow(); + if(active==0 && 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..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(); @@ -56,7 +57,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..e009b1c0 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; i<fonts.length(); i++){ - if(FDB.isFixedPitch(fonts[i])){ this->setFont(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){ @@ -93,10 +101,15 @@ void TerminalWidget::applyData(QByteArray data){ //qDebug() << "Data:" << data; for(int i=0; i<data.size(); i++){ if( data.at(i)=='\b' ){ - //Flush current text buffer to widget - //Simple cursor backward 1 (NOT backspace in this context!! - this widget should be in "insert" mode instead) - InsertText(chars); chars.clear(); - this->moveCursor(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' ){ @@ -115,10 +128,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(); @@ -131,7 +140,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; } @@ -139,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 @@ -414,7 +426,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); } } @@ -471,6 +483,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){ @@ -483,9 +496,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/TrayIcon.cpp b/src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp index ea970df9..5198146e 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp @@ -9,7 +9,7 @@ #include <QDir> #include <QDesktopWidget> -#include <LuminaUtils.h> +#include <LUtils.h> TrayIcon::TrayIcon() : QSystemTrayIcon(){ //Create the child widgets here @@ -145,6 +145,7 @@ void TrayIcon::updateScreenMenu(){ } } ScreenMenu->setVisible(!ScreenMenu->isEmpty()); + ScreenMenu->setEnabled(!ScreenMenu->isEmpty()); } void TrayIcon::TrayActivated(QSystemTrayIcon::ActivationReason reason){ @@ -169,4 +170,4 @@ void TrayIcon::TermHidden(){ void TrayIcon::TermVisible(){ termVisible = true; -}
\ No newline at end of file +} diff --git a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp index 24124348..6fddee39 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp @@ -2,11 +2,16 @@ #include <QDir> #include <QProcessEnvironment> +#include <QTimer> + +#define DEBUG 0 TTYProcess::TTYProcess(QObject *parent) : QObject(parent){ childProc = 0; sn = 0; ttyfd = 0; + starting = true; + fixReply = -1; } TTYProcess::~TTYProcess(){ @@ -18,10 +23,26 @@ 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("TERM"); 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","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:\ + :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<filter.length(); i++){ unsetenv(filter[i].toLocal8Bit().data()); } //if(env.contains("TERM")){ unsetenv("TERM"); } @@ -42,12 +63,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; @@ -58,7 +81,8 @@ 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; } } @@ -78,6 +102,9 @@ void TTYProcess::closeTTY(){ void TTYProcess::writeTTY(QByteArray output){ //qDebug() << "Write:" << output; + static QList<QByteArray> knownFixes; + if(knownFixes.isEmpty()){ knownFixes << "\x1b[C" << "\x1b[D" << "\b" << "\x7F" << "\x08"; } + fixReply = knownFixes.indexOf(output); ::write(ttyfd, output.data(), output.size()); } @@ -97,12 +124,54 @@ 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(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") ){ + //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; + } + //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){ + if(DEBUG){ qDebug() << "Fix Reply:" <<fixReply << BA; } + switch(fixReply){ + case 0: //Right arrow ("\x1b[C") - PTY reply re-prints the next character rather than moving the cursor + if(BA.length()>0){ + BA.remove(0,1); + BA.prepend("\x1b[C"); //just move the cursor - don't re-print that 1 character + } + break; + 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 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) + } + } + break; + } + fixReply = -1; //done with the fix - resume normal operations + if(DEBUG){ qDebug() << " - Fixed:" << BA; } + } return BA; } } @@ -164,6 +233,37 @@ QByteArray TTYProcess::CleanANSI(QByteArray raw, bool &incomplete){ raw = raw.remove(index,1); index = raw.indexOf("\x07"); } + //VT220(?) print character code + index=raw.indexOf("\x1b[@"); + while(index>=0){ + raw = raw.remove(index,3); + index = raw.indexOf("\x1b[@"); + } + + //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"); + } + //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[c"); + //Also send the proper reply to this identify request right away + writeTTY("\x1b[/Z"); + } incomplete = false; return raw; @@ -190,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 diff --git a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h index 9b3873b0..c2b483a9 100644 --- a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h +++ b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h @@ -60,6 +60,8 @@ private: int ttyfd; 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 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..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 @@ -6,12 +6,12 @@ <message> <location filename="../TerminalWidget.cpp" line="50"/> <source>Copy Selection</source> - <translation type="unfinished"></translation> + <translation>Copia la selecció</translation> </message> <message> <location filename="../TerminalWidget.cpp" line="51"/> <source>Paste</source> - <translation type="unfinished"></translation> + <translation>Enganxa</translation> </message> </context> <context> @@ -19,27 +19,27 @@ <message> <location filename="../TrayIcon.cpp" line="123"/> <source>Trigger Terminal</source> - <translation type="unfinished"></translation> + <translation>Activa el terminal</translation> </message> <message> <location filename="../TrayIcon.cpp" line="125"/> <source>Top of Screen</source> - <translation type="unfinished"></translation> + <translation>A dalt de tot de la pantalla</translation> </message> <message> <location filename="../TrayIcon.cpp" line="130"/> <source>Close Terminal</source> - <translation type="unfinished"></translation> + <translation>Tanca el terminal</translation> </message> <message> <location filename="../TrayIcon.cpp" line="139"/> <source>Move To Monitor</source> - <translation type="unfinished"></translation> + <translation>Desplaça al monitor</translation> </message> <message> <location filename="../TrayIcon.cpp" line="142"/> <source>Monitor %1</source> - <translation type="unfinished"></translation> + <translation>Monitor %1</translation> </message> </context> </TS> 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..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 @@ -6,12 +6,12 @@ <message> <location filename="../TerminalWidget.cpp" line="50"/> <source>Copy Selection</source> - <translation type="unfinished"></translation> + <translation>Kopírovat výběr</translation> </message> <message> <location filename="../TerminalWidget.cpp" line="51"/> <source>Paste</source> - <translation type="unfinished"></translation> + <translation>Vložit</translation> </message> </context> <context> @@ -29,7 +29,7 @@ <message> <location filename="../TrayIcon.cpp" line="130"/> <source>Close Terminal</source> - <translation type="unfinished"></translation> + <translation>Zavřít terminál</translation> </message> <message> <location filename="../TrayIcon.cpp" line="139"/> @@ -39,7 +39,7 @@ <message> <location filename="../TrayIcon.cpp" line="142"/> <source>Monitor %1</source> - <translation type="unfinished"></translation> + <translation>Obrazovka %1</translation> </message> </context> </TS> 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..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 @@ -6,12 +6,12 @@ <message> <location filename="../TerminalWidget.cpp" line="50"/> <source>Copy Selection</source> - <translation type="unfinished"></translation> + <translation>Αντιγραφή Επιλογής</translation> </message> <message> <location filename="../TerminalWidget.cpp" line="51"/> <source>Paste</source> - <translation type="unfinished"></translation> + <translation>Επικόλληση</translation> </message> </context> <context> @@ -19,27 +19,27 @@ <message> <location filename="../TrayIcon.cpp" line="123"/> <source>Trigger Terminal</source> - <translation type="unfinished"></translation> + <translation>Εμφάνιση/Απόκρυψη Γραμμής Εντολών</translation> </message> <message> <location filename="../TrayIcon.cpp" line="125"/> <source>Top of Screen</source> - <translation type="unfinished"></translation> + <translation>Επάνω Μέρος της Οθόνης</translation> </message> <message> <location filename="../TrayIcon.cpp" line="130"/> <source>Close Terminal</source> - <translation type="unfinished"></translation> + <translation>Κλείσιμο Γραμμής Εντολών</translation> </message> <message> <location filename="../TrayIcon.cpp" line="139"/> <source>Move To Monitor</source> - <translation type="unfinished"></translation> + <translation>Μετακίνηση στην Οθόνη</translation> </message> <message> <location filename="../TrayIcon.cpp" line="142"/> <source>Monitor %1</source> - <translation type="unfinished"></translation> + <translation>Οθόνη %1</translation> </message> </context> </TS> 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..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 @@ -6,12 +6,12 @@ <message> <location filename="../TerminalWidget.cpp" line="50"/> <source>Copy Selection</source> - <translation type="unfinished"></translation> + <translation>Kijelöltek Másolása</translation> </message> <message> <location filename="../TerminalWidget.cpp" line="51"/> <source>Paste</source> - <translation type="unfinished"></translation> + <translation>Beilleszt</translation> </message> </context> <context> @@ -19,27 +19,27 @@ <message> <location filename="../TrayIcon.cpp" line="123"/> <source>Trigger Terminal</source> - <translation type="unfinished"></translation> + <translation>Terminál Kiszögezése</translation> </message> <message> <location filename="../TrayIcon.cpp" line="125"/> <source>Top of Screen</source> - <translation type="unfinished"></translation> + <translation>Képernyő teteje</translation> </message> <message> <location filename="../TrayIcon.cpp" line="130"/> <source>Close Terminal</source> - <translation type="unfinished"></translation> + <translation>Terminál Bezárása</translation> </message> <message> <location filename="../TrayIcon.cpp" line="139"/> <source>Move To Monitor</source> - <translation type="unfinished"></translation> + <translation>Monitorra mozgatás</translation> </message> <message> <location filename="../TrayIcon.cpp" line="142"/> <source>Monitor %1</source> - <translation type="unfinished"></translation> + <translation>%1. ik Montior</translation> </message> </context> </TS> 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..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 @@ -11,7 +11,7 @@ <message> <location filename="../TerminalWidget.cpp" line="51"/> <source>Paste</source> - <translation type="unfinished"></translation> + <translation>Incolla</translation> </message> </context> <context> @@ -29,7 +29,7 @@ <message> <location filename="../TrayIcon.cpp" line="130"/> <source>Close Terminal</source> - <translation type="unfinished"></translation> + <translation>Chiudi terminale</translation> </message> <message> <location filename="../TrayIcon.cpp" line="139"/> 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..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 @@ -6,12 +6,12 @@ <message> <location filename="../TerminalWidget.cpp" line="50"/> <source>Copy Selection</source> - <translation type="unfinished"></translation> + <translation>選択された範囲をコピー</translation> </message> <message> <location filename="../TerminalWidget.cpp" line="51"/> <source>Paste</source> - <translation type="unfinished"></translation> + <translation>貼り付け</translation> </message> </context> <context> @@ -29,7 +29,7 @@ <message> <location filename="../TrayIcon.cpp" line="130"/> <source>Close Terminal</source> - <translation type="unfinished"></translation> + <translation>端末を閉じる</translation> </message> <message> <location filename="../TrayIcon.cpp" line="139"/> @@ -39,7 +39,7 @@ <message> <location filename="../TrayIcon.cpp" line="142"/> <source>Monitor %1</source> - <translation type="unfinished"></translation> + <translation>モニター %1</translation> </message> </context> </TS> 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..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 @@ -6,12 +6,12 @@ <message> <location filename="../TerminalWidget.cpp" line="50"/> <source>Copy Selection</source> - <translation type="unfinished"></translation> + <translation>Kopijuoti žymėjimą</translation> </message> <message> <location filename="../TerminalWidget.cpp" line="51"/> <source>Paste</source> - <translation type="unfinished"></translation> + <translation>Įdėti</translation> </message> </context> <context> @@ -19,27 +19,27 @@ <message> <location filename="../TrayIcon.cpp" line="123"/> <source>Trigger Terminal</source> - <translation type="unfinished"></translation> + <translation>Perjungti terminalą</translation> </message> <message> <location filename="../TrayIcon.cpp" line="125"/> <source>Top of Screen</source> - <translation type="unfinished"></translation> + <translation>Ekrano viršuje</translation> </message> <message> <location filename="../TrayIcon.cpp" line="130"/> <source>Close Terminal</source> - <translation type="unfinished"></translation> + <translation>Užverti terminalą</translation> </message> <message> <location filename="../TrayIcon.cpp" line="139"/> <source>Move To Monitor</source> - <translation type="unfinished"></translation> + <translation>Perkelti į monitorių</translation> </message> <message> <location filename="../TrayIcon.cpp" line="142"/> <source>Monitor %1</source> - <translation type="unfinished"></translation> + <translation>Monitorius %1</translation> </message> </context> </TS> 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..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 @@ -6,12 +6,12 @@ <message> <location filename="../TerminalWidget.cpp" line="50"/> <source>Copy Selection</source> - <translation type="unfinished"></translation> + <translation>Копировать выбранное</translation> </message> <message> <location filename="../TerminalWidget.cpp" line="51"/> <source>Paste</source> - <translation type="unfinished"></translation> + <translation>Вставить</translation> </message> </context> <context> @@ -19,27 +19,27 @@ <message> <location filename="../TrayIcon.cpp" line="123"/> <source>Trigger Terminal</source> - <translation type="unfinished"></translation> + <translation>Запуск терминала</translation> </message> <message> <location filename="../TrayIcon.cpp" line="125"/> <source>Top of Screen</source> - <translation type="unfinished"></translation> + <translation>Всегда наверху</translation> </message> <message> <location filename="../TrayIcon.cpp" line="130"/> <source>Close Terminal</source> - <translation type="unfinished"></translation> + <translation>Закрыть терминал</translation> </message> <message> <location filename="../TrayIcon.cpp" line="139"/> <source>Move To Monitor</source> - <translation type="unfinished"></translation> + <translation>Переместить на экран</translation> </message> <message> <location filename="../TrayIcon.cpp" line="142"/> <source>Monitor %1</source> - <translation type="unfinished"></translation> + <translation>Экран: %1</translation> </message> </context> </TS> 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..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 @@ -6,12 +6,12 @@ <message> <location filename="../TerminalWidget.cpp" line="50"/> <source>Copy Selection</source> - <translation type="unfinished"></translation> + <translation>Kopiera markering</translation> </message> <message> <location filename="../TerminalWidget.cpp" line="51"/> <source>Paste</source> - <translation type="unfinished"></translation> + <translation>Klistra in</translation> </message> </context> <context> @@ -29,17 +29,17 @@ <message> <location filename="../TrayIcon.cpp" line="130"/> <source>Close Terminal</source> - <translation type="unfinished"></translation> + <translation>Stäng terminal</translation> </message> <message> <location filename="../TrayIcon.cpp" line="139"/> <source>Move To Monitor</source> - <translation type="unfinished"></translation> + <translation>Flytta till skärm</translation> </message> <message> <location filename="../TrayIcon.cpp" line="142"/> <source>Monitor %1</source> - <translation type="unfinished"></translation> + <translation>Skärm %1</translation> </message> </context> </TS> 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 \ 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(); |