From 8eba2f4ad58f6f9cc087e544e5f69a3285a99f10 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 27 Apr 2017 23:48:24 -0400 Subject: Move the unfinished utilities in Lumina over to an "experimental" directory. --- .../desktop-utils/lumina-terminal/TermWindow.cpp | 316 ------------ src-qt5/desktop-utils/lumina-terminal/TermWindow.h | 73 --- .../lumina-terminal/TerminalWidget.cpp | 570 --------------------- .../desktop-utils/lumina-terminal/TerminalWidget.h | 73 --- src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp | 173 ------- src-qt5/desktop-utils/lumina-terminal/TrayIcon.h | 59 --- .../desktop-utils/lumina-terminal/TtyProcess.cpp | 381 -------------- src-qt5/desktop-utils/lumina-terminal/TtyProcess.h | 87 ---- .../lumina-terminal/i18n/l-terminal_af.ts | 45 -- .../lumina-terminal/i18n/l-terminal_ar.ts | 45 -- .../lumina-terminal/i18n/l-terminal_az.ts | 45 -- .../lumina-terminal/i18n/l-terminal_bg.ts | 45 -- .../lumina-terminal/i18n/l-terminal_bn.ts | 45 -- .../lumina-terminal/i18n/l-terminal_bs.ts | 45 -- .../lumina-terminal/i18n/l-terminal_ca.ts | 45 -- .../lumina-terminal/i18n/l-terminal_cs.ts | 45 -- .../lumina-terminal/i18n/l-terminal_cy.ts | 45 -- .../lumina-terminal/i18n/l-terminal_da.ts | 45 -- .../lumina-terminal/i18n/l-terminal_de.ts | 45 -- .../lumina-terminal/i18n/l-terminal_el.ts | 45 -- .../lumina-terminal/i18n/l-terminal_en_GB.ts | 45 -- .../lumina-terminal/i18n/l-terminal_en_ZA.ts | 45 -- .../lumina-terminal/i18n/l-terminal_es.ts | 45 -- .../lumina-terminal/i18n/l-terminal_et.ts | 45 -- .../lumina-terminal/i18n/l-terminal_eu.ts | 45 -- .../lumina-terminal/i18n/l-terminal_fa.ts | 45 -- .../lumina-terminal/i18n/l-terminal_fi.ts | 45 -- .../lumina-terminal/i18n/l-terminal_fr.ts | 45 -- .../lumina-terminal/i18n/l-terminal_fr_CA.ts | 45 -- .../lumina-terminal/i18n/l-terminal_gl.ts | 45 -- .../lumina-terminal/i18n/l-terminal_he.ts | 45 -- .../lumina-terminal/i18n/l-terminal_hi.ts | 45 -- .../lumina-terminal/i18n/l-terminal_hr.ts | 45 -- .../lumina-terminal/i18n/l-terminal_hu.ts | 45 -- .../lumina-terminal/i18n/l-terminal_id.ts | 45 -- .../lumina-terminal/i18n/l-terminal_is.ts | 45 -- .../lumina-terminal/i18n/l-terminal_it.ts | 45 -- .../lumina-terminal/i18n/l-terminal_ja.ts | 45 -- .../lumina-terminal/i18n/l-terminal_ka.ts | 45 -- .../lumina-terminal/i18n/l-terminal_ko.ts | 45 -- .../lumina-terminal/i18n/l-terminal_lt.ts | 45 -- .../lumina-terminal/i18n/l-terminal_lv.ts | 45 -- .../lumina-terminal/i18n/l-terminal_mk.ts | 45 -- .../lumina-terminal/i18n/l-terminal_mn.ts | 45 -- .../lumina-terminal/i18n/l-terminal_ms.ts | 45 -- .../lumina-terminal/i18n/l-terminal_mt.ts | 45 -- .../lumina-terminal/i18n/l-terminal_nb.ts | 45 -- .../lumina-terminal/i18n/l-terminal_nl.ts | 45 -- .../lumina-terminal/i18n/l-terminal_pa.ts | 45 -- .../lumina-terminal/i18n/l-terminal_pl.ts | 45 -- .../lumina-terminal/i18n/l-terminal_pt.ts | 45 -- .../lumina-terminal/i18n/l-terminal_pt_BR.ts | 45 -- .../lumina-terminal/i18n/l-terminal_ro.ts | 45 -- .../lumina-terminal/i18n/l-terminal_ru.ts | 45 -- .../lumina-terminal/i18n/l-terminal_sk.ts | 45 -- .../lumina-terminal/i18n/l-terminal_sl.ts | 45 -- .../lumina-terminal/i18n/l-terminal_sr.ts | 45 -- .../lumina-terminal/i18n/l-terminal_sv.ts | 45 -- .../lumina-terminal/i18n/l-terminal_sw.ts | 45 -- .../lumina-terminal/i18n/l-terminal_ta.ts | 45 -- .../lumina-terminal/i18n/l-terminal_tg.ts | 45 -- .../lumina-terminal/i18n/l-terminal_th.ts | 45 -- .../lumina-terminal/i18n/l-terminal_tr.ts | 45 -- .../lumina-terminal/i18n/l-terminal_uk.ts | 45 -- .../lumina-terminal/i18n/l-terminal_uz.ts | 45 -- .../lumina-terminal/i18n/l-terminal_vi.ts | 45 -- .../lumina-terminal/i18n/l-terminal_zh_CN.ts | 45 -- .../lumina-terminal/i18n/l-terminal_zh_HK.ts | 45 -- .../lumina-terminal/i18n/l-terminal_zh_TW.ts | 45 -- .../lumina-terminal/i18n/l-terminal_zu.ts | 45 -- .../lumina-terminal/lumina-terminal.desktop | 9 - .../lumina-terminal/lumina-terminal.pro | 102 ---- src-qt5/desktop-utils/lumina-terminal/main.cpp | 47 -- 73 files changed, 4680 deletions(-) delete mode 100644 src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp delete mode 100644 src-qt5/desktop-utils/lumina-terminal/TermWindow.h delete mode 100644 src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp delete mode 100644 src-qt5/desktop-utils/lumina-terminal/TerminalWidget.h delete mode 100644 src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp delete mode 100644 src-qt5/desktop-utils/lumina-terminal/TrayIcon.h delete mode 100644 src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp delete mode 100644 src-qt5/desktop-utils/lumina-terminal/TtyProcess.h delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_af.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ar.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_az.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_bg.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_bn.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_bs.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cy.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_da.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_de.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_el.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_en_GB.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_en_ZA.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_es.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_et.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_eu.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fa.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fi.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fr.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fr_CA.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_gl.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_he.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hi.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hr.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hu.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_id.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_is.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_it.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ja.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ka.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ko.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_lt.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_lv.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_mk.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_mn.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ms.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_mt.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_nb.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_nl.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pa.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pl.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pt.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pt_BR.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ro.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ru.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sk.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sl.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sr.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sv.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sw.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ta.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_tg.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_th.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_tr.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_uk.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_uz.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_vi.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zh_CN.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zh_HK.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zh_TW.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zu.ts delete mode 100644 src-qt5/desktop-utils/lumina-terminal/lumina-terminal.desktop delete mode 100644 src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro delete mode 100644 src-qt5/desktop-utils/lumina-terminal/main.cpp (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 deleted file mode 100644 index 812d3679..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp +++ /dev/null @@ -1,316 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "TermWindow.h" -//#include "ui_TermWindow.h" - -#include -#include -#include -#include -#include -#include "TerminalWidget.h" - -// =============== -// PUBLIC -// =============== -TermWindow::TermWindow(QSettings *set) : QWidget(0, Qt::Window | Qt::BypassWindowManagerHint){//, ui(new Ui::TermWindow){ - this->setWindowOpacity(0.85); - CLOSING = false; //internal flag - settings = set; - //Create the Window - this->setLayout(new QVBoxLayout()); - this->setCursor(Qt::SplitVCursor); - tabWidget = new QTabWidget(this); - tabWidget->clear(); //just in case - tabWidget->setCursor(Qt::ArrowCursor); - tabWidget->setTabBarAutoHide(true); - tabWidget->setTabsClosable(true); - tabWidget->setMovable(true); - tabWidget->setUsesScrollButtons(true); - tabWidget->setFocusPolicy(Qt::ClickFocus); - this->layout()->addWidget(tabWidget); - //Setup the animation - 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); - newTabS = new QShortcut(QKeySequence::AddTab,this); - closeTabS = new QShortcut(QKeySequence::Close,this); - prevTabS = new QShortcut(QKeySequence::PreviousChild,this); - nextTabS = new QShortcut(QKeySequence::NextChild,this); - //Print out all the keyboard shortcuts onto the screen - qDebug() << "New Tab Shortcut:" << QKeySequence::keyBindings(QKeySequence::AddTab); - qDebug() << "Close Tab Shortcut:" << QKeySequence::keyBindings(QKeySequence::Close); - qDebug() << "Next Tab Shortcut:" << QKeySequence::keyBindings(QKeySequence::NextChild); - qDebug() << "Previous Tab Shortcut:" << QKeySequence::keyBindings(QKeySequence::PreviousChild); - //Connect the signals/slots - connect(tabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(Close_Tab(int)) ); - connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(focusOnWidget()) ); - connect(closeTabS, SIGNAL(activated()), this, SLOT(Close_Tab()) ); - connect(newTabS, SIGNAL(activated()), this, SLOT(New_Tab()) ); - //connect(hideS, SIGNAL(activated()), this, SLOT(HideWindow()) ); - 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 - if(settings->contains("lastSize")){ - //qDebug() << "Re-use last size:" << settings->value("lastSize").toSize(); - this->resize( settings->value("lastSize").toSize() ); - CalculateGeom(); - //qDebug() << "After size:" << this->size(); - } - - //this->resize(this->width(),300); - //this->setMinimumSize(20, 300); - -} - - -TermWindow::~TermWindow(){ - -} - -void TermWindow::cleanup(){ - //called right before the window is closed - //Make sure to close any open tabs/processes - CLOSING = true; - for(int i=0; icount(); i++){ - static_cast(tabWidget->widget(i))->aboutToClose(); - } -} - -void TermWindow::OpenDirs(QStringList dirs){ - for(int i=0; isetWhatsThis(ID); - tabWidget->addTab(page, ID); - tabWidget->setCurrentWidget(page); - QTimer::singleShot(500, this, SLOT(focusOnWidget()));//page->setFocus(); - qDebug() << "New Tab:" << ID << dirs[i]; - connect(page, SIGNAL(ProcessClosed(QString)), this, SLOT(Close_Tab(QString)) ); - } -} - -void TermWindow::setCurrentScreen(int num){ - screennum = num; - QTimer::singleShot(0,this, SLOT(ReShowWindow())); -} - -void TermWindow::setTopOfScreen(bool ontop){ - onTop = ontop; - this->layout()->setContentsMargins(0, (onTop ? 0 : 3), 0, (onTop ? 3 : 0)); - tabWidget->setTabPosition(onTop ? QTabWidget::South : QTabWidget::North); - QTimer::singleShot(0,this, SLOT(ReShowWindow())); -} - -// ======================= -// PUBLIC SLOTS -// ======================= -void TermWindow::ShowWindow(){ - if(animRunning>=0){ return; } //something running - animRunning = 1; - this->hide(); - QApplication::processEvents(); - CalculateGeom(); - //Now setup the animation - ANIM->setEndValue(this->geometry()); - if(onTop){ //use top edge - ANIM->setStartValue( QRect(this->x(), this->y(), this->width(), 0) ); //same location - no height - }else{ - ANIM->setStartValue( QRect(this->x(), this->geometry().bottom(), this->width(), 0) ); //same location - no height - } - this->show(); - //qDebug() << "Start Animation" << ANIM->startValue() << ANIM->endValue(); - ANIM->start(); -} - -void TermWindow::HideWindow(){ - if(animRunning>=0){ return; } //something running - //Now setup the animation - //Note: Do *not* use the private settings/variables because it may be changing right now - use the current geometry *ONLY* - animRunning = 0; - ANIM->setStartValue(this->geometry()); - QDesktopWidget *desk = QApplication::desktop(); - int screen = desk->screenNumber(this); //which screen it is currently on - if(desk->availableGeometry(screen).top() == this->geometry().top()){ //use top edge - ANIM->setEndValue( QRect(this->x(), this->y(), this->width(), 0) ); //same location - no height - }else{ - ANIM->setEndValue( QRect(this->x(), this->y()+this->height(), this->width(), 0) ); //same location - no height - } - this->show(); - ANIM->start(); -} - -void TermWindow::CloseWindow(){ - if(animRunning>=0){ return; } //something running - //Now setup the animation - animRunning = 2; - ANIM->setStartValue(this->geometry()); - if(onTop){ //use top edge - ANIM->setEndValue( QRect(this->x(), this->y(), this->width(), 0) ); //same location - no height - }else{ - ANIM->setEndValue( QRect(this->x(), this->geometry().bottom(), this->width(), 0) ); //same location - no height - } - this->show(); - ANIM->start(); -} - -void TermWindow::ReShowWindow(){ - if(this->isVisible()){ - HideWindow(); //start with same animation as hide - animRunning = 3; //flag as a re-show (hide, then show); - }else{ - //Already hidden, just show it - ShowWindow(); - } -} -// ======================= -// PRIVATE -// ======================= -void TermWindow::CalculateGeom(){ - //qDebug() << "Calculating Geom:" << this->size(); - QDesktopWidget *desk = QApplication::desktop(); - if(desk->screenCount() <= screennum){ screennum = desk->primaryScreen(); } //invalid screen detected - //Now align the window with the proper screen edge - QRect workarea = desk->availableGeometry(screennum); //this respects the WORKAREA property - if(onTop){ - this->setGeometry( workarea.x(), workarea.y(), workarea.width(), this->height()); //maintain current hight of window - - }else{ - this->setGeometry( workarea.x(), workarea.y() + workarea.height() - this->height(), workarea.width(), this->height()); //maintain current hight of window - } - this->setFixedWidth(this->width()); //Make sure the window is not re-sizeable in the width dimension - this->setMinimumHeight(0); -} - -QString TermWindow::GenerateTabID(){ - //generate a unique ID for this new tab - int num = 1; - for(int i=0; icount(); i++){ - if(tabWidget->widget(i)->whatsThis().toInt() >= num){ num = tabWidget->widget(i)->whatsThis().toInt()+1; } - } - return QString::number(num); -} - -// ======================= -// PRIVATE SLOTS -// ======================= - -//Tab Interactions -void TermWindow::New_Tab(){ - OpenDirs(QStringList() << QDir::homePath()); -} - -void TermWindow::Close_Tab(int tab){ - qDebug() << "Close Tab:" << tab; - if(tab<0){ tab = tabWidget->currentIndex(); } - static_cast(tabWidget->widget(tab))->aboutToClose(); - tabWidget->widget(tab)->deleteLater(); //delete the page within the tag - tabWidget->removeTab(tab); // remove the tab itself - //Let the tray know when the last terminal is closed - if(tabWidget->count() < 1){ - emit TerminalFinished(); - } -} - -void TermWindow::Close_Tab(QString ID){ - //Close a tab based on it's ID instead of it's tab number - qDebug() << "Close Tab by ID:" << ID; - for(int i=0; icount(); i++){ - if(tabWidget->widget(i)->whatsThis()==ID){ - qDebug() << " - Start close by number:" << i; - Close_Tab(i); - return; //all done - } - } -} - -void TermWindow::Next_Tab(){ - qDebug() << "Next Tab"; - int next = tabWidget->currentIndex()+1; - if(next>=tabWidget->count()){ next = 0; } - tabWidget->setCurrentIndex(next); -} - -void TermWindow::Prev_Tab(){ - qDebug() << "Previous Tab"; - int next = tabWidget->currentIndex()-1; - if(next<0){ next = tabWidget->count()-1; } - tabWidget->setCurrentIndex(next); -} - -void TermWindow::focusOnWidget(){ - if(tabWidget->currentWidget()!=0){ - //qDebug() << "Focus on Widget"; - tabWidget->currentWidget()->setFocus(); - } -} - -//Animation finishing -void TermWindow::AnimFinished(){ - if(animRunning <0){ return; } //nothing running - if(animRunning==0){ - //Hide Event - this->hide(); //need to hide the whole thing now - this->setGeometry( ANIM->startValue().toRect() ); //reset back to initial size after hidden - emit TerminalHidden(); - }else if(animRunning==1){ - //Show Event - this->activateWindow(); - tabWidget->currentWidget()->setFocus(); - emit TerminalVisible(); - }else if(animRunning==2){ - //Close Event - this->hide(); //need to hide the whole thing now - emit TerminalClosed(); - }else if(animRunning>2){ - //Re-Show event - this->hide(); - this->setGeometry( ANIM->startValue().toRect() ); //reset back to initial size after hidden - //Now re-show it - QTimer::singleShot(0,this, SLOT(ShowWindow())); - } - 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 -// =================== -void TermWindow::mouseMoveEvent(QMouseEvent *ev){ - //Note: With mouse tracking turned off, this event only happens when the user is holding down the mouse button - if(onTop){ - //Move the bottom edge to the current point - if( (ev->globalPos().y() - this->y()) < 50){ return; } //quick check that the window is not smaller than 20 pixels - QRect geom = this->geometry(); - geom.setBottom(ev->globalPos().y()); - this->setGeometry(geom); - }else{ - //Move the top edge to the current point - if( (this->y() + this->height() -ev->globalPos().y()) < 50){ return; } //quick check that the window is not smaller than 20 pixels - QRect geom = this->geometry(); - geom.setTop(ev->globalPos().y()); - this->setGeometry(geom); - } - settings->setValue("lastSize",this->geometry().size()); -} diff --git a/src-qt5/desktop-utils/lumina-terminal/TermWindow.h b/src-qt5/desktop-utils/lumina-terminal/TermWindow.h deleted file mode 100644 index 5f583126..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/TermWindow.h +++ /dev/null @@ -1,73 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_UTILITIES_TERMINAL_MAIN_WINDOW_H -#define _LUMINA_DESKTOP_UTILITIES_TERMINAL_MAIN_WINDOW_H - -#include -#include -#include -#include -#include -#include -#include - -class TermWindow : public QWidget{ - Q_OBJECT -public: - TermWindow(QSettings *set); - ~TermWindow(); - - void cleanup(); //called right before the window is closed - void OpenDirs(QStringList); - - void setCurrentScreen(int num = 0); - void setTopOfScreen(bool ontop); - -public slots: - void ShowWindow(); - void HideWindow(); - void CloseWindow(); - void ReShowWindow(); - -private: - QTabWidget *tabWidget; - QSettings *settings; - QShortcut *hideS, *closeS, *newTabS, *closeTabS, *prevTabS, *nextTabS; - int screennum; - 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(); - QString GenerateTabID(); - -private slots: - //Tab Interactions - void New_Tab(); - void Close_Tab(int tab = -1); - void Close_Tab(QString ID); //alternate form of the close routine - based on tab ID - void Next_Tab(); - void Prev_Tab(); - void focusOnWidget(); - //Animation finishing - void AnimFinished(); - //Window focus/active status changed - void activeStatusChanged(); - -protected: - void mouseMoveEvent(QMouseEvent*); - -signals: - void TerminalHidden(); - void TerminalVisible(); - void TerminalClosed(); - void TerminalFinished(); -}; - -#endif diff --git a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp deleted file mode 100644 index 7601ae9f..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp +++ /dev/null @@ -1,570 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "TerminalWidget.h" - -#include -#include -#include -#include -#include - -#include - -#define DEBUG 0 - -//Special control code ending symbols (aside from letters) - -TerminalWidget::TerminalWidget(QWidget *parent, QString dir) : QTextEdit(parent){ - //Setup the text widget - closing = false; - 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); - this->setFocusPolicy(Qt::StrongFocus); - this->setTabStopWidth( 8 * this->fontMetrics().width(" ") ); //8 character spaces per tab (UNIX standard) - this->setTabChangesFocus(false); - //this->setWordWrapMode(QTextOption::NoWrap); - this->setContextMenuPolicy(Qt::CustomContextMenu); - resizeTimer = new QTimer(this); - resizeTimer->setInterval(20); - resizeTimer->setSingleShot(true); - connect(resizeTimer, SIGNAL(timeout()), this, SLOT(updateTermSize()) ); - DEFFMT = this->textCursor().charFormat(); //save the default structure for later - DEFFMT.setForeground(Qt::white); - CFMT = DEFFMT; //current format - selCursor = this->textCursor(); //used for keeping track of selections - lastCursor = this->textCursor(); - startrow = endrow = -1; - altkeypad = false; - QFontDatabase FDB; - QStringList fonts = FDB.families(QFontDatabase::Latin); - for(int i=0; isetFont(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"; - //int fd; - bool ok = PROC->startTTY( QProcessEnvironment::systemEnvironment().value("SHELL","/bin/sh"), QStringList(), dir); - //qDebug() << " - opened:" << ok; - this->setEnabled(false); - contextMenu = new QMenu(this); - copyA = contextMenu->addAction(LXDG::findIcon("edit-copy"), tr("Copy Selection"), this, SLOT(copySelection()) ); - pasteA = contextMenu->addAction(LXDG::findIcon("edit-paste"), tr("Paste"), this, SLOT(pasteSelection()) ); - //Connect the signals/slots - connect(PROC, SIGNAL(readyRead()), this, SLOT(UpdateText()) ); - connect(PROC, SIGNAL(processClosed()), this, SLOT(ShellClosed()) ); - -} - -TerminalWidget::~TerminalWidget(){ - aboutToClose(); -} - -void TerminalWidget::setTerminalFont(QFont font){ - - this->setFont(font); -} - -void TerminalWidget::aboutToClose(){ - closing = true; - if(PROC->isOpen()){ PROC->closeTTY(); } //TTY PORT - -} - -// ================== -// PRIVATE -// ================== -void TerminalWidget::InsertText(QString txt){ - if(txt.isEmpty()){ return; } - //qDebug() << "Insert Text:" << txt << "Cursor Pos:" << this->textCursor().position() << "Column:" << this->textCursor().columnNumber(); - QTextCursor cur = this->textCursor(); - cur.setCharFormat(CFMT); - this->setTextCursor(cur); //ensure the current cursor has the proper format - this->insertPlainText(txt); - /*cur.setPosition( this->textCursor().position(), QTextCursor::KeepAnchor); - //cur.setCharFormat(CFMT); - //Now make sure the new characters are the right color - QList sels = this->extraSelections(); - QTextEdit::ExtraSelection sel; - sel.format = CFMT; - sel.cursor = cur; - sels << sel; - this->setExtraSelections(sels);*/ - if(DEBUG){ - qDebug() << "Insert Text:"<< txt << "Font Color:" << CFMT.foreground() << "Background Color:" << CFMT.background() << "Font Weight:" << CFMT.fontWeight(); - } -} - -void TerminalWidget::applyData(QByteArray data){ - this->setEnabled(true); - if(DEBUG){ qDebug() << "Got Data: " << data; } - //Make sure the current cursor is the right cursor - if(this->textCursor()==selCursor){ this->setTextCursor(lastCursor); } - //Iterate through the data and apply it when possible - QByteArray chars; - //qDebug() << "Data:" << data; - for(int i=0; itextCursor(); - 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' ){ - //Flush current text buffer to widget - if(!chars.isEmpty()){ InsertText(chars); chars.clear(); } - //ANSI Control Code start - //Look for the end of the code - int end = -1; - for(int j=1; j<(data.size()-i) && end<0; j++){ - if(QChar(data.at(i+j)).isLetter() || (QChar(data.at(i+j)).isSymbol() && data.at(i+j)!=';') ){ end = j; } - else if(data.at(i+j)=='\x1B'){ end = j-1; } //start of the next control code - } - if(end<0){ return; } //skip everything else - no end to code found - applyANSI(data.mid(i+1, end)); - //qDebug() << "Code:" << data.mid(i+1, end) << "Next Char:" << data[i+end+2]; - i+=end; //move the final loop along - already handled these bytes - - }else if( data.at(i) == '\r' ){ - //Move cursor to end of line - //qDebug() << "Got a return char"; - QTextCursor cur = this->textCursor(); - cur.movePosition(QTextCursor::EndOfLine, QTextCursor::MoveAnchor, 1); - cur.removeSelectedText(); - this->setTextCursor(cur); - }else{ - chars.append(data.at(i)); //Add the character to the buffer - } - } //end loop over data - if(!chars.isEmpty()){ InsertText(chars); } -} - -void TerminalWidget::applyANSI(QByteArray code){ - //Note: the first byte is often the "[" character - //qDebug() << "Handle ANSI:" << code; - if(code.length()==1){ - //KEYPAD MODES - if(code.at(0)=='='){ altkeypad = true; } - else if(code.at(0)=='>'){ altkeypad = false; } - else{ - qDebug() << "Unhandled ANSI Code:" << code; - } - - }else if(code.startsWith("[") && code.contains("@")){ - code = code.remove(0, code.indexOf("@")+1); - InsertText(code); //insert character (cursor position already accounted for with other systems) - }else if(code.startsWith("[")){ - // VT100 ESCAPE CODES - //CURSOR MOVEMENT - if( code.endsWith("A") ){ //Move Up - int num = 1; - if(code.size()>2){ num = code.mid(1, code.size()-2).toInt(); } //everything in the middle - QTextCursor cur = this->textCursor(); - cur.movePosition(QTextCursor::Up, QTextCursor::MoveAnchor, num); - this->setTextCursor(cur); - }else if(code.endsWith("B")){ //Move Down - int num = 1; - if(code.size()>2){ num = code.mid(1, code.size()-2).toInt(); } //everything in the middle - QTextCursor cur = this->textCursor(); - cur.movePosition(QTextCursor::Down, QTextCursor::MoveAnchor, num); - this->setTextCursor(cur); - }else if(code.endsWith("C")){ //Move Forward - int num = 1; - if(code.size()>2){ num = code.mid(1, code.size()-2).toInt(); } //everything in the middle - QTextCursor cur = this->textCursor(); - cur.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, num); - this->setTextCursor(cur); - }else if(code.endsWith("D")){ //Move Back - int num = 1; - if(code.size()>2){ num = code.mid(1, code.size()-2).toInt(); } //everything in the middle - QTextCursor cur = this->textCursor(); - cur.movePosition(QTextCursor::Left, QTextCursor::MoveAnchor, num); - this->setTextCursor(cur); - }else if(code.endsWith("E")){ //Move Next/down Lines (go toward end) - int num = 1; - if(code.size()>2){ num = code.mid(1, code.size()-2).toInt(); } //everything in the middle - QTextCursor cur = this->textCursor(); - cur.movePosition(QTextCursor::NextRow, QTextCursor::MoveAnchor, num); - this->setTextCursor(cur); - }else if(code.endsWith("F")){ //Move Previous/up Lines (go to beginning) - int num = 1; - if(code.size()>2){ num = code.mid(1, code.size()-2).toInt(); } //everything in the middle - QTextCursor cur = this->textCursor(); - cur.movePosition(QTextCursor::PreviousRow, QTextCursor::MoveAnchor, num); - this->setTextCursor(cur); - }else if(code.endsWith("G")){ //Move to specific column - int num = 1; - if(code.size()>2){ num = code.mid(1, code.size()-2).toInt(); } //everything in the middle - QTextCursor cur = this->textCursor(); - cur.setPosition(num); - this->setTextCursor(cur); - }else if(code.endsWith("H") || code.endsWith("f") ){ //Move to specific position (row/column) - int mid = code.indexOf(";"); - if(mid>1){ - int numR, numC; numR = numC = 1; - if(mid >=2){ numR = code.mid(1,mid-1).toInt(); } - if(mid < code.size()-1){ numC = code.mid(mid+1,code.size()-mid-2).toInt(); } - - if(startrow>=0 && endrow>=0){ - if(numR == startrow){ numR = 0;} - else if(numR==endrow){ numR = this->document()->lineCount()-1; } - } - qDebug() << "Set Text Position (absolute):" << "Code:" << code << "Row:" << numR << "Col:" << numC; - //qDebug() << " - Current Pos:" << this->textCursor().position() << "Line Count:" << this->document()->lineCount(); - //if(!this->textCursor().movePosition(QTextCursor::Start, QTextCursor::MoveAnchor,1) ){ qDebug() << "Could not go to start"; } - QTextCursor cur(this->textCursor()); - cur.setPosition(QTextCursor::Start, QTextCursor::MoveAnchor); //go to start of document - //qDebug() << " - Pos After Start Move:" << cur.position(); - if( !cur.movePosition(QTextCursor::Down, QTextCursor::MoveAnchor, numR) ){ qDebug() << "Could not go to row:" << numR; } - //qDebug() << " - Pos After Down Move:" << cur.position(); - if( !cur.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, numC) ){ qDebug() << "Could not go to col:" << numC; } - /*this->textCursor().setPosition( this->document()->findBlockByLineNumber(numR).position() ); - qDebug() << " - Pos After Row Move:" << this->textCursor().position(); - if( !this->textCursor().movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, numC) ){ qDebug() << "Could not go to col:" << numC; }*/ - //qDebug() << " - Ending Pos:" << cur.position(); - this->setTextCursor(cur); - }else{ - //Go to home position - this->moveCursor(QTextCursor::Start); - } - - // CURSOR MANAGEMENT - }else if(code.endsWith("r")){ //Tag top/bottom lines as perticular numbers - int mid = code.indexOf(";"); - qDebug() << "New Row Codes:" << code << "midpoint:" << mid; - if(mid>1){ - if(mid >=2){ startrow = code.mid(1,mid-1).toInt(); } - if(mid < code.size()-1){ endrow = code.mid(mid+1,code.size()-mid-2).toInt(); } - } - qDebug() << "New Row Codes:" << startrow << endrow; - // DISPLAY CLEAR CODES - }else if(code.endsWith("J")){ //ED - Erase Display - int num = 0; - if(code.size()>2){ num = code.mid(1, code.size()-2).toInt(); } //everything in the middle - //qDebug() << "Erase Display:" << num; - if(num==1){ - //Clear from cursor to beginning of screen - QTextCursor cur = this->textCursor(); - cur.movePosition(QTextCursor::Start, QTextCursor::KeepAnchor, 1); - cur.removeSelectedText(); - this->setTextCursor(cur); - }else if(num==2){ - //Clear the whole screen - qDebug() << "Clear Screen:" << this->document()->lineCount(); - this->clear(); - }else{ - //Clear from cursor to end of screen - QTextCursor cur = this->textCursor(); - cur.movePosition(QTextCursor::End, QTextCursor::KeepAnchor, 1); - cur.removeSelectedText(); - this->setTextCursor(cur); - } - }else if(code.endsWith("K")){ //EL - Erase in Line - int num = 0; - if(code.size()>2){ num = code.mid(1, code.size()-2).toInt(); } //everything in the middle - //qDebug() << "Erase Number" << num; - //Now determine what should be cleared based on code - if(num==1){ - //Clear from current cursor to beginning of line - QTextCursor cur = this->textCursor(); - cur.movePosition(QTextCursor::StartOfLine, QTextCursor::KeepAnchor, 1); - cur.removeSelectedText(); - this->setTextCursor(cur); - }else if(num==2){ - //Clear the entire line - QTextCursor cur = this->textCursor(); - cur.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor, 1); - cur.movePosition(QTextCursor::EndOfLine, QTextCursor::KeepAnchor, 1); - cur.removeSelectedText(); - this->setTextCursor(cur); - }else{ - //Clear from current cursor to end of line - QTextCursor cur = this->textCursor(); - cur.movePosition(QTextCursor::EndOfLine, QTextCursor::KeepAnchor, 1); - cur.removeSelectedText(); - this->setTextCursor(cur); - } - }else if(code.endsWith("g")){ - //Tab Clear codes (0 or 3 only) - int num = 0; - if(code.size()>2){ num = code.mid(1, code.size()-2).toInt(); } //everything in the middle - if(num==0){ //clear current column (delete key analogue) - QTextCursor cur = this->textCursor(); - cur.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor, 1); - cur.removeSelectedText(); - this->setTextCursor(cur); - }else if(num==3){ //clear all - this->clear(); - } - //SCROLL MOVEMENT CODES - //}else if(code.endsWith("S")){ // SU - Scroll Up - //qDebug() << "Scroll Up:" << code; - //}else if(code.endsWith("T")){ // SD - Scroll Down - //qDebug() << "Scroll Down:" << code; - - // GRAPHICS RENDERING - }else if(code.endsWith("m")){ - //Format: "[;m" (no limit to sections separated by ";") - //qDebug() << "Got Graphics Code:" << code; - code.chop(1); //chop the "m" off the end - int start = 1; - int end = code.indexOf(";"); - while(end>start){ - //qDebug() << "Color Code:" << code << start << end << code.mid(start, end-start); - applyANSIColor(code.mid(start, end-start).toInt()); - //Now update the iterators and try again - start = end; - end = code.indexOf(";",start); //go to the next one - //qDebug() << "Next end:" << end; - } - //Need the last section as well - end = code.size(); - if(start>1){ start ++; } - //qDebug() << "Color Code:" << code << start << end << code.mid(start, end-start); - if(end>start){ applyANSIColor(code.mid(start, end-start).toInt());} - else{ applyANSIColor(0); } - - - // GRAPHICS MODES - //}else if(code.endsWith("h")){ - - //}else if(code.endsWith("l")){ - - }else{ - qDebug() << "Unhandled Control Code:" << code; - } - - } //End VT100 control codes - else{ - qDebug() << "Unhandled Control Code:" << code; - } -} - -void TerminalWidget::applyANSIColor(int code){ - //qDebug() << "Apply Color code:" << code; - if(code <=0){ CFMT = DEFFMT; } //Reset back to default - else if(code==1){ CFMT.setFontWeight(75); } //BOLD font - else if(code==2){ CFMT.setFontWeight(25); } //Faint font (smaller than normal by a bit) - else if(code==3){ CFMT.setFontWeight(75); } //Italic font - else if(code==4){ CFMT.setFontUnderline(true); } //Underline - //5-6: Blink text (unsupported) - //7: Reverse foreground/background (unsupported) - //8: Conceal (unsupported) - else if(code==9){ CFMT.setFontStrikeOut(true); } //Crossed out - //10-19: Change font family (unsupported) - //20: Fraktur Font (unsupported) - //21: Bold:off or Underline:Double (unsupported) - else if(code==22){ CFMT.setFontWeight(50); } //Normal weight - //23: Reset font (unsupported) - else if(code==24){ CFMT.setFontUnderline(false); } //disable underline - //25: Disable blinking (unsupported) - //26: Reserved - //27: Reset reversal (7) (unsupported) - //28: Reveal (cancel 8) (unsupported) - else if(code==29){ CFMT.setFontStrikeOut(false); } //Not Crossed out - else if(code>=30 && code<=39){ - //Set the font color - QColor color; - if(code==30){color=QColor(Qt::black); } - else if(code==31){ color=QColor(Qt::red); } - else if(code==32){ color=QColor(Qt::green); } - else if(code==33){ color=QColor(Qt::yellow); } - else if(code==34){ color=QColor(Qt::blue); } - else if(code==35){ color=QColor(Qt::magenta); } - else if(code==36){ color=QColor(Qt::cyan); } - else if(code==37){ color=QColor(Qt::white); } - //48: Special extended color setting (unsupported) - else if(code==39){ color= DEFFMT.foreground().color(); } //reset to default color - QBrush brush = CFMT.foreground(); - color.setAlpha(255); //fully opaque - brush.setColor(color); - CFMT.setForeground( brush ); - //this->setTextColor(color); //just in case the format is not used - } - else if(code>=40 && code<=49){ - //Set the font color - QColor color; - if(code==40){color=QColor(Qt::black); } - else if(code==41){ color=QColor(Qt::red); } - else if(code==42){ color=QColor(Qt::green); } - else if(code==43){ color=QColor(Qt::yellow); } - else if(code==44){ color=QColor(Qt::blue); } - else if(code==45){ color=QColor(Qt::magenta); } - else if(code==46){ color=QColor(Qt::cyan); } - else if(code==47){ color=QColor(Qt::white); } - //48: Special extended color setting (unsupported) - else if(code==49){ color= DEFFMT.background().color(); } //reset to default color - QBrush brush = CFMT.background(); - color.setAlpha(255); //fully opaque - brush.setColor(color); - CFMT.setBackground( brush ); - } - //50: Reserved - //51: Framed - //52: Encircled - else if(code==53){ CFMT.setFontOverline(true); } //enable overline - //54: Not framed/circled (51/52) - else if(code==55){ CFMT.setFontOverline(false); } //disable overline - //56-59: Reserved - //60+: Not generally supported (special code for particular terminals such as aixterm) - else{ qDebug() << "Unknown Color Code:" << code; } -} - -//Outgoing Data parsing -void TerminalWidget::sendKeyPress(int key){ - QByteArray ba; - //if(this->textCursor()==selCursor){ this->setTextCursor(lastCursor); } - //int fromEnd = this->document()->characterCount() - this->textCursor().position(); - //Check for special keys - switch(key){ - case Qt::Key_Delete: - ba.append("\e[3~"); - break; - case Qt::Key_Backspace: - ba.append("\x08"); - break; - case Qt::Key_Left: - if(altkeypad){ ba.append("^[D"); } - else{ ba.append("\x1b[D"); } - break; - case Qt::Key_Right: - if(altkeypad){ ba.append("^[C"); } - else{ ba.append("\x1b[C"); } - break; - case Qt::Key_Up: - if(altkeypad){ ba.append("^[A"); } - else{ ba.append("\x1b[A"); } - break; - case Qt::Key_Down: - if(altkeypad){ ba.append("^[B"); } - else{ ba.append("\x1b[B"); } - break; - case Qt::Key_Home: - ba.append("\x1b[H"); - break; - case Qt::Key_End: - ba.append("\x1b[F"); - break; - } - //qDebug() << "Forward Input:" << ba; - if(!ba.isEmpty()){ PROC->writeTTY(ba); } -} - -// ================== -// PRIVATE SLOTS -// ================== -void TerminalWidget::UpdateText(){ - //read the data from the process - //qDebug() << "UpdateText"; - if(!PROC->isOpen()){ return; } - applyData(PROC->readTTY()); - //adjust the scrollbar as needed - this->ensureCursorVisible(); -} - -void TerminalWidget::ShellClosed(){ - if(!closing){ - emit ProcessClosed(this->whatsThis()); - } -} - -void TerminalWidget::copySelection(){ - QApplication::clipboard()->setText( selCursor.selectedText() ); -} - -void TerminalWidget::pasteSelection(){ - QString text = QApplication::clipboard()->text(); - if(!text.isEmpty()){ - QByteArray ba; ba.append(text); //avoid any byte conversions - PROC->writeTTY(ba); - } -} - -void TerminalWidget::updateTermSize(){ - if(!PROC->isOpen()){ return; } - QSize pix = this->size(); //pixels - QSize chars; - chars.setWidth( pix.width()/this->fontMetrics().width("W") ); - chars.setHeight( pix.height()/this->fontMetrics().lineSpacing() ); - - PROC->setTerminalSize(chars,pix); -} - -// ================== -// PROTECTED -// ================== -void TerminalWidget::keyPressEvent(QKeyEvent *ev){ - - if(ev->text().isEmpty() || ev->text()=="\b" ){ - sendKeyPress(ev->key()); - }else{ - QByteArray ba; ba.append(ev->text()); //avoid any byte conversions - //qDebug() << "Forward Input:" << ba; - PROC->writeTTY(ba); - } - - ev->ignore(); -} - -void TerminalWidget::mousePressEvent(QMouseEvent *ev){ - this->setFocus(); - this->activateWindow(); - if(ev->button()==Qt::RightButton){ - QTextEdit::mousePressEvent(ev); - }else if(ev->button()==Qt::MiddleButton){ - pasteSelection(); - }else if(ev->button()==Qt::LeftButton){ - if(this->textCursor()!=selCursor){ lastCursor = this->textCursor(); } - selCursor = this->cursorForPosition(ev->pos()); - } - Q_UNUSED(ev); -} - -void TerminalWidget::mouseMoveEvent(QMouseEvent *ev){ - //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); - } -} - -void TerminalWidget::mouseReleaseEvent(QMouseEvent *ev){ - if(ev->button()==Qt::LeftButton){ - selCursor.setPosition(this->cursorForPosition(ev->pos()).position(), QTextCursor::KeepAnchor); - if(selCursor.hasSelection()){ this->setTextCursor(selCursor); } - else{ this->setTextCursor(lastCursor); } - }else if(ev->button()==Qt::RightButton){ - copyA->setEnabled( selCursor.hasSelection() ); - pasteA->setEnabled( !QApplication::clipboard()->text().isEmpty() ); - contextMenu->popup( this->mapToGlobal(ev->pos()) ); - } - Q_UNUSED(ev); -} - -void TerminalWidget::mouseDoubleClickEvent(QMouseEvent *ev){ - Q_UNUSED(ev); -} - -void TerminalWidget::resizeEvent(QResizeEvent *ev){ - resizeTimer->start(); - QTextEdit::resizeEvent(ev); -} diff --git a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.h b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.h deleted file mode 100644 index 616919c3..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.h +++ /dev/null @@ -1,73 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_UTILITIES_TERMINAL_PROCESS_WIDGET_H -#define _LUMINA_DESKTOP_UTILITIES_TERMINAL_PROCESS_WIDGET_H - -#include -#include -#include -#include -#include -#include -#include - -#include "TtyProcess.h" - -class TerminalWidget : public QTextEdit{ - Q_OBJECT -public: - TerminalWidget(QWidget *parent =0, QString dir=""); - ~TerminalWidget(); - - void setTerminalFont(QFont); - void aboutToClose(); - -private: - TTYProcess *PROC; - QTimer *resizeTimer; - QTextCharFormat DEFFMT, CFMT; //default/current text format - QTextCursor selCursor, lastCursor; - QMenu *contextMenu; - QAction *copyA, *pasteA; - int selectionStart; - bool closing; - - //Incoming Data parsing - void InsertText(QString); - void applyData(QByteArray data); //overall data parsing - void applyANSI(QByteArray code); //individual code application - void applyANSIColor(int code); //Add the designated color code to the CFMT structure - - //Outgoing Data parsing - void sendKeyPress(int key); - - //Special incoming data flags - int startrow, endrow; //indexes for the first/last row ("\x1b[A;Br" CC) - bool altkeypad; -private slots: - void UpdateText(); - void ShellClosed(); - - void copySelection(); - void pasteSelection(); - - void updateTermSize(); - -signals: - void ProcessClosed(QString); - -protected: - void keyPressEvent(QKeyEvent *ev); - void mousePressEvent(QMouseEvent *ev); - void mouseMoveEvent(QMouseEvent *ev); - void mouseReleaseEvent(QMouseEvent *ev); - void mouseDoubleClickEvent(QMouseEvent *ev); - //void contextMenuEvent(QContextMenuEvent *ev); - void resizeEvent(QResizeEvent *ev); -}; - -#endif diff --git a/src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp b/src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp deleted file mode 100644 index 5198146e..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/TrayIcon.cpp +++ /dev/null @@ -1,173 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "TrayIcon.h" - -#include -#include - -#include - -TrayIcon::TrayIcon() : QSystemTrayIcon(){ - //Create the child widgets here - settings = new QSettings("lumina-desktop","lumina-terminal"); - this->setContextMenu(new QMenu()); - ScreenMenu = new QMenu(); - connect(ScreenMenu, SIGNAL(triggered(QAction*)), this, SLOT(ChangeScreen(QAction*)) ); - TERM = new TermWindow(settings); - //Load the current settings - TERM->setTopOfScreen(settings->value("TopOfScreen",true).toBool()); - TERM->setCurrentScreen(settings->value("OnScreen",0).toInt()); - connect(TERM, SIGNAL(TerminalHidden()), this, SLOT(TermHidden())); - connect(TERM, SIGNAL(TerminalVisible()), this, SLOT(TermVisible())); - connect(TERM, SIGNAL(TerminalClosed()), this, SLOT(startCleanup())); - connect(TERM, SIGNAL(TerminalFinished()), this, SLOT(stopApplication())); - connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(TrayActivated(QSystemTrayIcon::ActivationReason)) ); -} - -TrayIcon::~TrayIcon(){ - delete TERM; - delete ScreenMenu; -} - -// ============= -// PUBLIC -// ============= -void TrayIcon::parseInputs(QStringList inputs){ - //Note that this is only run on the primary process - otherwise inputs are sent to the slotSingleInstance() below - termVisible = !inputs.contains("-toggle"); //will automatically show the terminal on first run, even if "-toggle" is set - - setupContextMenu(); - updateIcons(); - inputs = adjustInputs(inputs); //will adjust termVisible as necessary - if(inputs.isEmpty()){ inputs << QDir::homePath(); } //always start up with one terminal minimum - TERM->OpenDirs(inputs); - if(termVisible){ QTimer::singleShot(0, TERM, SLOT(ShowWindow())); } -} - -// ================= -// PUBLIC SLOTS -// ================= -void TrayIcon::slotSingleInstance(QStringList inputs){ - //Note that this is only run for a secondary process forwarding its inputs - //qDebug() << "Single Instance Event:" << inputs << termVisible; - bool visible = termVisible; - inputs = adjustInputs(inputs); //will adjust termVisible as necessary - if(!inputs.isEmpty()){ TERM->OpenDirs(inputs); } - //Only adjust the window if there was a change in the visibility status - //qDebug() << "Set Visible:" << termVisible; - if(!visible && termVisible){ QTimer::singleShot(0, TERM, SLOT(ShowWindow())); } - else if(visible && !termVisible){ QTimer::singleShot(0, TERM, SLOT(HideWindow())); } -} - -void TrayIcon::updateIcons(){ - this->setIcon(LXDG::findIcon("utilities-terminal","")); -} - -// ================ -// PRIVATE -// ================ -QStringList TrayIcon::adjustInputs(QStringList inputs){ - bool hasHide = false; - //Look for the special CLI flags just for the tray icon and trim them out - for(int i=0; icleanup(); -} - -void TrayIcon::stopApplication(){ - QApplication::exit(0); -} - -void TrayIcon::ChangeTopBottom(bool ontop){ - TERM->setTopOfScreen(ontop); - settings->setValue("TopOfScreen",ontop); //save for later -} - -void TrayIcon::ChangeScreen(QAction *act){ - int screen = act->whatsThis().toInt(); - TERM->setCurrentScreen(screen); - settings->setValue("OnScreen",screen); - updateScreenMenu(); -} - -void TrayIcon::setupContextMenu(){ - this->contextMenu()->clear(); - this->contextMenu()->addAction(LXDG::findIcon("edit-select",""), tr("Trigger Terminal"), this, SLOT(ToggleVisibility()) ); - this->contextMenu()->addSeparator(); - QAction * act = this->contextMenu()->addAction(tr("Top of Screen"), this, SLOT(ChangeTopBottom(bool)) ); - act->setCheckable(true); - act->setChecked(settings->value("TopOfScreen",true).toBool() ); - this->contextMenu()->addMenu(ScreenMenu); - this->contextMenu()->addSeparator(); - this->contextMenu()->addAction(LXDG::findIcon("application-exit",""), tr("Close Terminal"), this, SLOT(stopApplication()) ); - updateScreenMenu(); -} - -void TrayIcon::updateScreenMenu(){ - ScreenMenu->clear(); - QDesktopWidget *desk = QApplication::desktop(); - int cscreen = settings->value("OnScreen",0).toInt(); - if(cscreen>=desk->screenCount()){ cscreen = desk->primaryScreen(); } - ScreenMenu->setTitle(tr("Move To Monitor")); - for(int i=0; iscreenCount(); i++){ - if(i!=cscreen){ - QAction *act = new QAction( QString(tr("Monitor %1")).arg(QString::number(i+1)),ScreenMenu); - act->setWhatsThis(QString::number(i)); - ScreenMenu->addAction(act); - } - } - ScreenMenu->setVisible(!ScreenMenu->isEmpty()); - ScreenMenu->setEnabled(!ScreenMenu->isEmpty()); -} - -void TrayIcon::TrayActivated(QSystemTrayIcon::ActivationReason reason){ - switch(reason){ - case QSystemTrayIcon::Context: - this->contextMenu()->popup(this->geometry().center()); - break; - default: - ToggleVisibility(); - } -} - -//Slots for the window visibility -void TrayIcon::ToggleVisibility(){ - if(termVisible){ QTimer::singleShot(0, TERM, SLOT(HideWindow())); } - else{ QTimer::singleShot(0, TERM, SLOT(ShowWindow())); } -} - -void TrayIcon::TermHidden(){ - termVisible = false; -} - -void TrayIcon::TermVisible(){ - termVisible = true; -} diff --git a/src-qt5/desktop-utils/lumina-terminal/TrayIcon.h b/src-qt5/desktop-utils/lumina-terminal/TrayIcon.h deleted file mode 100644 index 961aaa90..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/TrayIcon.h +++ /dev/null @@ -1,59 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_UTILITIES_TERMINAL_TRAY_ICON_H -#define _LUMINA_DESKTOP_UTILITIES_TERMINAL_TRAY_ICON_H -// QT Includes -#include -#include -#include -#include -#include - -#include - -#include "TermWindow.h" - -class TrayIcon : public QSystemTrayIcon { - Q_OBJECT - -public: - TrayIcon(); - ~TrayIcon(); - - //First run - void parseInputs(QStringList); //Note that this is only run on the primary process - otherwise it gets sent to the singleInstance slot below - -public slots: - void slotSingleInstance(QStringList inputs = QStringList()); - void updateIcons(); - -private: - bool termVisible; - TermWindow *TERM; - QMenu *ScreenMenu; - QStringList adjustInputs(QStringList); - QSettings *settings; -private slots: - //Action Buttons - void startCleanup(); - void stopApplication(); - void ChangeTopBottom(bool ontop); - void ChangeScreen(QAction*); - - //Tray Updates - void setupContextMenu(); - void updateScreenMenu(); - void TrayActivated(QSystemTrayIcon::ActivationReason); - - //Slots for the window visibility - void ToggleVisibility(); - void TermHidden(); - void TermVisible(); - -}; - -#endif diff --git a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp deleted file mode 100644 index b6ef8f6d..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp +++ /dev/null @@ -1,381 +0,0 @@ -#include "TtyProcess.h" - -#include -#include -#include - -#define DEBUG 1 - -TTYProcess::TTYProcess(QObject *parent) : QObject(parent){ - childProc = 0; - sn = 0; - ttyfd = 0; - starting = true; - fixReply = -1; -} - -TTYProcess::~TTYProcess(){ - closeTTY(); //make sure everything is closed properly -} - -// === PUBLIC === -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("TERMINFO","/etc/termcap",0); - unsetenv("WINDOWID"); - //unsetenv("TERMCAP"); - //setenv("TERMCAP","/etc/termcap",1); - //setenv("TERMCAP","vt220-color",1); - //setenv("TERMCAP","vt102|vt220-color|dec vt102:' :do=^J:co#80:li#24:cl=50\E[;H\E[2J: :le=^H:bs: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[1;24r\E[24;1H: :rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>: :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H: :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:vt#3: :sc=\E7:rc=\E8:cs=\E[%i%d;%dr:vs=\E[?7l:ve=\E[?7h: :mi:al=\E[L:dc=\E[P:dl=\E[M:ei=\E[4l:im=\E[4h:' vi $*",1); - /*setenv("TERMCAP","'vt220-color' :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; isetEnabled(true); - connect(sn, SIGNAL(activated(int)), this, SLOT(checkStatus(int)) ); - ttyfd = FD; - if(DEBUG){ qDebug() << " - PTY:" << ptsname(FD); } - starting = true; - return true; - } -} - -void TTYProcess::closeTTY(){ - int junk; - if(0==waitpid(childProc, &junk, WNOHANG)){ - kill(childProc, SIGKILL); - } - if(ttyfd!=0 && sn!=0){ - sn->setEnabled(false); - ::close(ttyfd); - ttyfd = 0; - emit processClosed(); - } -} - -void TTYProcess::writeTTY(QByteArray output){ - //qDebug() << "Write:" << output; - static QList knownFixes; - if(knownFixes.isEmpty()){ knownFixes << "\x1b[C" << "\x1b[D" << "\b" << "\x7F" << "\x08"; }//<<"\x1b[H"<<"\x1b[F"; } - fixReply = knownFixes.indexOf(output); - ::write(ttyfd, output.data(), output.size()); -} - -QByteArray TTYProcess::readTTY(){ - QByteArray BA; - //qDebug() << "Read TTY"; - if(sn==0){ return BA; } //not setup yet - char buffer[64]; - ssize_t rtot = read(sn->socket(),&buffer,64); - //buffer[rtot]='\0'; - BA = QByteArray(buffer, rtot); - //qDebug() << " - Got Data:" << BA; - if(!fragBA.isEmpty()){ - //Have a leftover fragment, include this too - BA = BA.prepend(fragBA); - fragBA.clear(); - } - bool bad = true; - BA = CleanANSI(BA, bad); - if(bad){ - //incomplete fragent - read some more first - fragBA = BA; - return readTTY(); - }else{ - 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("tset\n"); //Terminal Setup utility (uses the TERM env variable) - 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:" <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; - case 5: //Home Key - BA = "\x1b[H"; - break; - case 6: //End Key - BA = "\x1b[F"; - break; - } - fixReply = -1; //done with the fix - resume normal operations - if(DEBUG){ qDebug() << " - Fixed:" << BA; } - } - return BA; - } -} - -void TTYProcess::setTerminalSize(QSize chars, QSize pixels){ - if(ttyfd==0){ return; } - struct winsize c_sz; - c_sz.ws_row = chars.height(); - c_sz.ws_col = chars.width(); - c_sz.ws_xpixel = pixels.width(); - c_sz.ws_ypixel = pixels.height(); - if( ioctl(ttyfd, TIOCSWINSZ, &ws) ){ - qDebug() << "Error settings terminal size"; - }else{ - //qDebug() <<"Set Terminal Size:" << pixels << chars; - } -} - -bool TTYProcess::isOpen(){ - return (ttyfd!=0); -} - -QByteArray TTYProcess::CleanANSI(QByteArray raw, bool &incomplete){ - incomplete = true; - //qDebug() << "Clean ANSI Data:" << raw; - //IN_LINE TERMINAL COLOR CODES (ANSI Escape Codes) "\x1B[m" - // - Just remove them for now - - //Special XTERM encoding (legacy support) - int index = raw.indexOf("\x1B]"); - while(index>=0){ - //The end character of this sequence is the Bell command ("\x07") - int end = raw.indexOf("\x07"); - if(end<0){ return raw; } //incomplete raw array - raw = raw.remove(index, end-index+1); - index = raw.indexOf("\x1B]"); - } - - // GENERIC ANSI CODES ((Make sure the output is not cut off in the middle of a code) - index = raw.indexOf("\x1B"); - while(index>=0){ - //CURSOR MOVEMENT - int end = 0; - for(int i=1; i=0){ - //qDebug() << "Remove Bell:" << index; - raw = raw.remove(index,1); - index = raw.indexOf("\x07"); - } - //VT220(?) print character code (cut out the code, leave the character) - 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,3); - 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,4); - 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,3); - index = raw.indexOf("\x1b[c"); - //Also send the proper reply to this identify request right away - writeTTY("\x1b[1c"); //VT220 reply code - } - //Terminal Identify request (xterm/termcap?) - /*index = raw.indexOf("\x1b[P"); - while(index>=0){ - raw = raw.remove(index,3); - index = raw.indexOf("\x1b[P"); - //Also send the proper reply to this identify request right away - qDebug() << " - Got XTERM/TERMCAP identify request ([P)"; - writeTTY("\x1b[/Z"); - }*/ - - incomplete = false; - return raw; -} - -// === PRIVATE === -pid_t TTYProcess::LaunchProcess(int& fd, char *prog, char **child_args){ - //Returns: -1 for errors, positive value (file descriptor) for the master side of the TTY to watch - //First open/setup a new pseudo-terminal file/device on the system (master side) - //fd = posix_openpt(O_RDWR | O_NOCTTY); //open read/write - pid_t PID = forkpty( &fd, 0, 0, 0); - if(PID==0){ - //Child process - int rc = execvp(prog, child_args); - //::close(fds); //no need to keep original file descriptor open any more - exit(rc); - }else{ - //Master process - return PID; - } - /*if(fd<0){ return -1; } //could not create pseudo-terminal - int rc = grantpt(fd); //set permissions - if(rc!=0){ return -1; } - rc = unlockpt(fd); //unlock file (ready for use) - //rc = fchown(fd, getuid(), getgid()); - setupTtyFd(fd); - if(rc!=0){ return -1; } - //Now fork, return the Master device and setup the child - pid_t PID = fork(); - if(PID==0){ - //SLAVE/child - int fds = ::open(ptsname(fd), O_RDWR | O_NOCTTY); //open slave side read/write - rc = fchown(fds, getuid(), getgid()); - ::close(fd); //close the master side from the slave thread - - //Adjust the slave side mode to SANE - setupTtyFd(fds); - //Change the controlling terminal in child thread to the slave PTY - ::close(0); //close current terminal standard input - ::close(1); //close current terminal standard output - ::close(2); //close current terminal standard error - dup(fds); // Set slave PTY as standard input (0); - dup(fds); // Set slave PTY as standard output (1); - dup(fds); // Set slave PTY as standard error (2); - - setsid(); //Make current process new session leader (so we can set controlling terminal) - ioctl(0,TIOCSCTTY, 1); //Set the controlling terminal to the slave PTY - - //Execute the designated program - //rc = execvp("tset", NULL); - rc = execvp(prog, child_args); - ::close(fds); //no need to keep original file descriptor open any more - exit(rc); - }*/ - //MASTER thread (or error) - return PID; -} - -void TTYProcess::setupTtyFd(int fd){ - struct termios TSET; - tcgetattr(fd, &TSET); //read the current settings - cfmakesane(&TSET); //set the SANE mode on the settings ( RAW: 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 - //TSET.c_iflag &= IUTF8; //enable UTF-8 support - //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(fd, TCSANOW, &TSET); //apply the changed settings -} - -// === PRIVATE SLOTS === -void TTYProcess::checkStatus(int sock){ - //This is run when the socket gets activated - if(sock!=ttyfd){ - - } - //Make sure the child PID is still active - int junk; - if(0!=waitpid(childProc, &junk, WNOHANG)){ - this->closeTTY(); //clean up everything else - }else{ - emit readyRead(); - } -} diff --git a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h deleted file mode 100644 index 42684112..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h +++ /dev/null @@ -1,87 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This is basically a replacement for QProcess, where all process/terminal outputs -// are redirected and not just the standard input/output channels. This allows it -// to be used for terminal-like apps (shells) which directly modify the terminal output -// rather than stick to input/output channels for communication. -//=========================================== -// IMPLEMENTATION NOTE -//====================== -// The process requires/uses ANSI control codes (\x1B[) for special operations -// such as moving the cursor, erasing characters, etc.. -// It is recommended that you pair this class with the graphical "TerminalWidget.h" class -// or some other ANSI-compatible display widget. -//=========================================== -#ifndef _LUMINA_DESKTOP_UTILITIES_TERMINAL_TTY_PROCESS_WIDGET_H -#define _LUMINA_DESKTOP_UTILITIES_TERMINAL_TTY_PROCESS_WIDGET_H - -#include -#include -#include - -//Standard C library functions for PTY access/setup -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class TTYProcess : public QObject{ - Q_OBJECT -public: - TTYProcess(QObject *parent = 0); - ~TTYProcess(); - - bool startTTY(QString prog, QStringList args = QStringList(), QString workdir = "~"); - void closeTTY(); - - //Primary read/write functions - void writeTTY(QByteArray output); - QByteArray readTTY(); - - //Setup the terminal size (characters and pixels) - void setTerminalSize(QSize chars, QSize pixels); - - //Status update checks - bool isOpen(); - - //Functions for handling ANSI escape codes (typically not used by hand) - QByteArray CleanANSI(QByteArray, bool &incomplete); - -private: - pid_t childProc; - 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 - // Inputs: - // int &fd: (output) file descriptor for the master PTY (positive integer if valid) - // char *prog: program to run - // char **args: program arguments - // Returns: - // -1 for errors, child process PID (positive integer) if successful - //==================================== - pid_t LaunchProcess(int& fd, char *prog, char **child_args); - void setupTtyFd(pid_t fd); - -private slots: - void checkStatus(int); - -signals: - void readyRead(); - void processClosed(); -}; - -#endif diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_af.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_af.ts deleted file mode 100644 index 3b15b029..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_af.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ar.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ar.ts deleted file mode 100644 index 1ecc3145..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ar.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_az.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_az.ts deleted file mode 100644 index ab5b56bc..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_az.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_bg.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_bg.ts deleted file mode 100644 index cde31900..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_bg.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_bn.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_bn.ts deleted file mode 100644 index 9097c03d..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_bn.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_bs.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_bs.ts deleted file mode 100644 index af47e3ba..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_bs.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - 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 deleted file mode 100644 index c99bbf27..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - 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 - - - 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 deleted file mode 100644 index 2ad36a83..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - Kopírovat výběr - - - - Paste - Vložit - - - - TrayIcon - - - Trigger Terminal - Spustit terminál - - - - Top of Screen - Nahoře na obrazovce - - - - Close Terminal - Zavřít terminál - - - - Move To Monitor - Přesunout na obrazovku - - - - Monitor %1 - Obrazovka %1 - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cy.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cy.ts deleted file mode 100644 index a06a1461..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cy.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_da.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_da.ts deleted file mode 100644 index 18990a04..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_da.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - Kopiér valgte - - - - Paste - Indsæt - - - - TrayIcon - - - Trigger Terminal - Udløs terminal - - - - Top of Screen - Øverst på skærmen - - - - Close Terminal - Luk terminal - - - - Move To Monitor - Flyt til skærm - - - - Monitor %1 - Skærm %1 - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_de.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_de.ts deleted file mode 100644 index 041be5a7..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_de.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - Auswahl kopieren - - - - Paste - Einfügen - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - Oben am Bildschirm - - - - Close Terminal - Terminal schließen - - - - Move To Monitor - - - - - Monitor %1 - Monitor %1 - - - 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 deleted file mode 100644 index 2efd8fe8..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_el.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - Αντιγραφή Επιλογής - - - - Paste - Επικόλληση - - - - 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_en_GB.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_en_GB.ts deleted file mode 100644 index 99b84253..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_en_GB.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_en_ZA.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_en_ZA.ts deleted file mode 100644 index 4b623bf9..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_en_ZA.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_es.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_es.ts deleted file mode 100644 index aa46327c..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_es.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_et.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_et.ts deleted file mode 100644 index b728da20..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_et.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_eu.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_eu.ts deleted file mode 100644 index 8ce0109f..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_eu.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fa.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fa.ts deleted file mode 100644 index 9699380f..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fa.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fi.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fi.ts deleted file mode 100644 index e2267e94..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fi.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fr.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fr.ts deleted file mode 100644 index 5e2fab13..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fr.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fr_CA.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fr_CA.ts deleted file mode 100644 index 5854840a..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_fr_CA.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_gl.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_gl.ts deleted file mode 100644 index 559b5579..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_gl.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_he.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_he.ts deleted file mode 100644 index 0ffdc091..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_he.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hi.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hi.ts deleted file mode 100644 index 2a702315..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hi.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hr.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hr.ts deleted file mode 100644 index 4ce13144..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hr.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %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 deleted file mode 100644 index 5fba3d17..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_hu.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - Kijelöltés másolása - - - - Paste - Beillesztés - - - - TrayIcon - - - Trigger Terminal - Terminál Kiszögezése - - - - Top of Screen - Képernyő tetejére - - - - Close Terminal - Terminál bezárása - - - - Move To Monitor - Monitorra mozgatás - - - - Monitor %1 - %1. montior - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_id.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_id.ts deleted file mode 100644 index 4eb7642d..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_id.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_is.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_is.ts deleted file mode 100644 index 6fe84485..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_is.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - 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 deleted file mode 100644 index 2c88a58c..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_it.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - Copia selezione - - - - Paste - Incolla - - - - TrayIcon - - - Trigger Terminal - Azione eseguita da terminale - - - - Top of Screen - Alto dello schermo - - - - Close Terminal - Chiudi terminale - - - - Move To Monitor - Spostarsi sullo schermo - - - - Monitor %1 - Schermo %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 deleted file mode 100644 index 81b6ca9e..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ja.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - 選択された範囲をコピー - - - - Paste - 貼り付け - - - - 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_ka.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ka.ts deleted file mode 100644 index 55fb9b6c..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ka.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ko.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ko.ts deleted file mode 100644 index 0c6e3f07..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ko.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %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 deleted file mode 100644 index c0acd806..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_lt.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - 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 - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_lv.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_lv.ts deleted file mode 100644 index 539cc1ad..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_lv.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_mk.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_mk.ts deleted file mode 100644 index 47e0efd6..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_mk.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_mn.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_mn.ts deleted file mode 100644 index d31a4617..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_mn.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ms.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ms.ts deleted file mode 100644 index 06408c44..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ms.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_mt.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_mt.ts deleted file mode 100644 index b18f7eb5..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_mt.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_nb.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_nb.ts deleted file mode 100644 index 300214c3..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_nb.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_nl.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_nl.ts deleted file mode 100644 index 5e9c63dd..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_nl.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pa.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pa.ts deleted file mode 100644 index 2f478abb..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pa.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pl.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pl.ts deleted file mode 100644 index 52453174..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pl.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - Kopiuj - - - - Paste - Wklej - - - - TrayIcon - - - Trigger Terminal - Uruchom terminal - - - - Top of Screen - Górna krawędź ekranu - - - - Close Terminal - Zamknij terminal - - - - Move To Monitor - Przenieś na monitor - - - - Monitor %1 - Monitor %1 - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pt.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pt.ts deleted file mode 100644 index 26e200d4..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pt.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pt_BR.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pt_BR.ts deleted file mode 100644 index 1f3f6996..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_pt_BR.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - Copiar seleção - - - - Paste - Colar - - - - TrayIcon - - - Trigger Terminal - Gatilhar Terminal - - - - Top of Screen - Topo da tela - - - - Close Terminal - Fechar Terminal - - - - Move To Monitor - Mover para o Monitor - - - - Monitor %1 - Monitor %1 - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ro.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ro.ts deleted file mode 100644 index 9f6811a6..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ro.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %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 deleted file mode 100644 index 8e298489..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ru.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - Копировать выбранное - - - - Paste - Вставить - - - - 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_sk.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sk.ts deleted file mode 100644 index bd12e022..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sk.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sl.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sl.ts deleted file mode 100644 index c7b29746..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sl.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sr.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sr.ts deleted file mode 100644 index db230f12..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sr.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %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 deleted file mode 100644 index 5f6ea3bd..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sv.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - 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 - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sw.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sw.ts deleted file mode 100644 index 7aa406a3..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_sw.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ta.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ta.ts deleted file mode 100644 index e6da4e4a..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ta.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_tg.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_tg.ts deleted file mode 100644 index 16976b60..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_tg.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_th.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_th.ts deleted file mode 100644 index 35b1b00b..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_th.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_tr.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_tr.ts deleted file mode 100644 index 8311f8a0..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_tr.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_uk.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_uk.ts deleted file mode 100644 index e4bf575d..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_uk.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_uz.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_uz.ts deleted file mode 100644 index ed0d17de..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_uz.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_vi.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_vi.ts deleted file mode 100644 index 2f5d2d9c..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_vi.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zh_CN.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zh_CN.ts deleted file mode 100644 index c899062c..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zh_CN.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zh_HK.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zh_HK.ts deleted file mode 100644 index a809bad6..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zh_HK.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zh_TW.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zh_TW.ts deleted file mode 100644 index 7d136d08..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zh_TW.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zu.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zu.ts deleted file mode 100644 index 1e330c7d..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_zu.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TerminalWidget - - - Copy Selection - - - - - Paste - - - - - TrayIcon - - - Trigger Terminal - - - - - Top of Screen - - - - - Close Terminal - - - - - Move To Monitor - - - - - Monitor %1 - - - - diff --git a/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.desktop b/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.desktop deleted file mode 100644 index 7d11a19d..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Exec=lumina-terminal %F -Icon=utilities-terminal -Terminal=false -Type=Application -StartupNotify=true -Categories=Utility; -Name=Lumina Terminal -Comment=Dropdown diff --git a/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro b/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro deleted file mode 100644 index 5216372c..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro +++ /dev/null @@ -1,102 +0,0 @@ -include("$${PWD}/../../OS-detect.pri") - -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 \ - TtyProcess.h - -SOURCES += main.cpp \ - TrayIcon.cpp \ - TermWindow.cpp \ - TerminalWidget.cpp \ - TtyProcess.cpp - - -LIBS += -lutil - - -TRANSLATIONS = i18n/l-terminal_af.ts \ - i18n/l-terminal_ar.ts \ - i18n/l-terminal_az.ts \ - i18n/l-terminal_bg.ts \ - i18n/l-terminal_bn.ts \ - i18n/l-terminal_bs.ts \ - i18n/l-terminal_ca.ts \ - i18n/l-terminal_cs.ts \ - i18n/l-terminal_cy.ts \ - i18n/l-terminal_da.ts \ - i18n/l-terminal_de.ts \ - i18n/l-terminal_el.ts \ - i18n/l-terminal_en_GB.ts \ - i18n/l-terminal_en_ZA.ts \ - i18n/l-terminal_es.ts \ - i18n/l-terminal_et.ts \ - i18n/l-terminal_eu.ts \ - i18n/l-terminal_fa.ts \ - i18n/l-terminal_fi.ts \ - i18n/l-terminal_fr.ts \ - i18n/l-terminal_fr_CA.ts \ - i18n/l-terminal_gl.ts \ - i18n/l-terminal_he.ts \ - i18n/l-terminal_hi.ts \ - i18n/l-terminal_hr.ts \ - i18n/l-terminal_hu.ts \ - i18n/l-terminal_id.ts \ - i18n/l-terminal_is.ts \ - i18n/l-terminal_it.ts \ - i18n/l-terminal_ja.ts \ - i18n/l-terminal_ka.ts \ - i18n/l-terminal_ko.ts \ - i18n/l-terminal_lt.ts \ - i18n/l-terminal_lv.ts \ - i18n/l-terminal_mk.ts \ - i18n/l-terminal_mn.ts \ - i18n/l-terminal_ms.ts \ - i18n/l-terminal_mt.ts \ - i18n/l-terminal_nb.ts \ - i18n/l-terminal_nl.ts \ - i18n/l-terminal_pa.ts \ - i18n/l-terminal_pl.ts \ - i18n/l-terminal_pt.ts \ - i18n/l-terminal_pt_BR.ts \ - i18n/l-terminal_ro.ts \ - i18n/l-terminal_ru.ts \ - i18n/l-terminal_sk.ts \ - i18n/l-terminal_sl.ts \ - i18n/l-terminal_sr.ts \ - i18n/l-terminal_sv.ts \ - i18n/l-terminal_sw.ts \ - i18n/l-terminal_ta.ts \ - i18n/l-terminal_tg.ts \ - i18n/l-terminal_th.ts \ - i18n/l-terminal_tr.ts \ - i18n/l-terminal_uk.ts \ - i18n/l-terminal_uz.ts \ - i18n/l-terminal_vi.ts \ - i18n/l-terminal_zh_CN.ts \ - i18n/l-terminal_zh_HK.ts \ - i18n/l-terminal_zh_TW.ts \ - i18n/l-terminal_zu.ts - -dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/ -dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ - -desktop.files=lumina-terminal.desktop -desktop.path=$${L_SHAREDIR}/applications/ - -INSTALLS += target desktop - -WITH_I18N{ - INSTALLS += dotrans -} diff --git a/src-qt5/desktop-utils/lumina-terminal/main.cpp b/src-qt5/desktop-utils/lumina-terminal/main.cpp deleted file mode 100644 index a316ff35..00000000 --- a/src-qt5/desktop-utils/lumina-terminal/main.cpp +++ /dev/null @@ -1,47 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include -#include - -#include -#include - -#include - -#include "TrayIcon.h" -int main(int argc, char *argv[]) { - LTHEME::LoadCustomEnvSettings(); - LSingleApplication a(argc, argv, "lumina-terminal"); - if( !a.isPrimaryProcess() ){ return 0; } //poked the current process instead - - //First make sure a system tray is available - qDebug() << "Checking for system tray"; - bool ready = false; - for(int i=0; i<60 && !ready; i++){ - ready = QSystemTrayIcon::isSystemTrayAvailable(); - if(!ready){ - //Pause for 5 seconds - sleep(5); //don't worry about stopping event handling - nothing really running yet - } - } - if(!ready){ - qDebug() << "Could not find any available system tray after 5 minutes: exiting...."; - return 1; - } - - //Now go ahead and setup the app - //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()) ); - tray.parseInputs(a.inputlist); - tray.show(); - return a.exec(); -} -- cgit