aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-06-11 15:50:55 -0400
committerKen Moore <moorekou@gmail.com>2016-06-11 15:50:55 -0400
commit5af38d648e0ed27cc3a7aaf8984a88f53ef560f2 (patch)
treecc6399f88de3501aac63c3278562e2a4afa35d43 /src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp
parentAdd a couple more default mimetype associations for the text editor. (diff)
downloadlumina-5af38d648e0ed27cc3a7aaf8984a88f53ef560f2.tar.gz
lumina-5af38d648e0ed27cc3a7aaf8984a88f53ef560f2.tar.bz2
lumina-5af38d648e0ed27cc3a7aaf8984a88f53ef560f2.zip
Cleanup a bit more of the lumina-terminal. Color support is now in (with "xterm" set as the termcap interface), line wrapping is in as needed, the background is a bit more opaque now, and tabs close properly now.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp
index e8f80f88..d9099452 100644
--- a/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp
+++ b/src-qt5/desktop-utils/lumina-terminal/TerminalWidget.cpp
@@ -18,13 +18,14 @@
TerminalWidget::TerminalWidget(QWidget *parent, QString dir) : QTextEdit(parent){
//Setup the text widget
- this->setStyleSheet("background: black; color: white;");
+ closing = false;
+ this->setStyleSheet("QTextEdit{ background: black; color: white; }");
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->setWordWrapMode(QTextOption::NoWrap);
+ //this->setWordWrapMode(QTextOption::NoWrap);
this->setContextMenuPolicy(Qt::CustomContextMenu);
DEFFMT = this->textCursor().charFormat(); //save the default structure for later
DEFFMT.setForeground(Qt::white);
@@ -59,7 +60,9 @@ TerminalWidget::~TerminalWidget(){
}
void TerminalWidget::aboutToClose(){
+ closing = true;
if(PROC->isOpen()){ PROC->closeTTY(); } //TTY PORT
+ //delete PROC->
}
// ==================
@@ -79,7 +82,7 @@ void TerminalWidget::InsertText(QString txt){
sel.cursor = cur;
sels << sel;
this->setExtraSelections(sels);
- qDebug() << "New Text. Format:" << CFMT.foreground() << CFMT.font();
+ //qDebug() << "New Text. Format:" << CFMT.foreground() << CFMT.font();
}
void TerminalWidget::applyData(QByteArray data){
@@ -429,7 +432,9 @@ void TerminalWidget::UpdateText(){
}
void TerminalWidget::ShellClosed(){
- emit ProcessClosed(this->whatsThis());
+ if(!closing){
+ emit ProcessClosed(this->whatsThis());
+ }
}
void TerminalWidget::copySelection(){
bgstack15