aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-textedit
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-10-21 08:46:04 -0400
committerKen Moore <ken@ixsystems.com>2016-10-21 08:46:04 -0400
commited774582b0c66a7c86c8f8efad84f3248331c4f3 (patch)
tree4f05c8a31038635a05cf29e33c2a95891f2f3327 /src-qt5/desktop-utils/lumina-textedit
parentSetup the calculator to automatically load the last result if the first char ... (diff)
downloadlumina-ed774582b0c66a7c86c8f8efad84f3248331c4f3.tar.gz
lumina-ed774582b0c66a7c86c8f8efad84f3248331c4f3.tar.bz2
lumina-ed774582b0c66a7c86c8f8efad84f3248331c4f3.zip
Add directory context to the lumina-textedit in a couple ways:
1) The window title now shows 1 directory deep in stead of just the filename 2) Each tab has a tooltip which will show the full path for that file.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit')
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/MainUI.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
index 613fad04..c4f4eaca 100644
--- a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
@@ -89,7 +89,8 @@ 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(); }
}
}
@@ -261,8 +262,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 +273,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(); }
}
bgstack15