diff options
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit/MainUI.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/MainUI.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp index 613fad04..88f7bf00 100644 --- a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp @@ -10,7 +10,7 @@ #include "syntaxSupport.h" #include <LuminaXDG.h> -#include <LuminaUtils.h> +#include <LUtils.h> #include <QFileDialog> #include <QDir> @@ -89,7 +89,11 @@ MainUI::~MainUI(){ void MainUI::LoadArguments(QStringList args){ //CLI arguments for(int i=0; i<args.length(); i++){ OpenFile( LUtils::PathToAbsolute(args[i]) ); - ui->line_find->setFocus(); + if(ui->groupReplace->isVisible()){ ui->line_find->setFocus(); } + else{ currentEditor()->setFocus(); } + } + if(ui->tabWidget->count()<1){ + NewFile(); } } @@ -261,8 +265,9 @@ void MainUI::updateTab(QString file){ bool changes = cur->hasChange(); //qDebug() << "Update Tab:" << file << cur << changes; ui->tabWidget->setTabText(index,(changes ? "*" : "") + file.section("/",-1)); + ui->tabWidget->setTabToolTip(index, file); ui->actionSave_File->setEnabled(changes); - this->setWindowTitle( ui->tabWidget->tabText( ui->tabWidget->currentIndex() ) ); + this->setWindowTitle( (changes ? "*" : "") + file.section("/",-2) ); } void MainUI::tabChanged(){ @@ -271,7 +276,8 @@ void MainUI::tabChanged(){ if(cur==0){ return; } //should never happen though bool changes = cur->hasChange(); ui->actionSave_File->setEnabled(changes); - this->setWindowTitle( ui->tabWidget->tabText( ui->tabWidget->currentIndex() ) ); + //this->setWindowTitle( ui->tabWidget->tabText( ui->tabWidget->currentIndex() ) ); + this->setWindowTitle( (changes ? "*" : "") + ui->tabWidget->tabToolTip( ui->tabWidget->currentIndex() ).section("/",-2) ); if(!ui->line_find->hasFocus() && !ui->line_replace->hasFocus()){ ui->tabWidget->currentWidget()->setFocus(); } } |