diff options
author | Ken Moore <moorekou@gmail.com> | 2015-10-15 08:23:28 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-10-15 08:23:28 -0400 |
commit | 6da125237d002ded36cbad6f0e9a9d7e87281775 (patch) | |
tree | a97e4a5215307ef4e4734f46e0ecd5b5d681beae /lumina-fm/MainUI.cpp | |
parent | Fix the status text loading in lumina-fm so that there is never any duplicati... (diff) | |
download | lumina-6da125237d002ded36cbad6f0e9a9d7e87281775.tar.gz lumina-6da125237d002ded36cbad6f0e9a9d7e87281775.tar.bz2 lumina-6da125237d002ded36cbad6f0e9a9d7e87281775.zip |
Change the "New Tab" text to "New Dir Browser" (to better accomodate tabs&columns), and also fix up the auto-loading of a new browser in column mode when the active tab is *not* the browser tab.
Diffstat (limited to 'lumina-fm/MainUI.cpp')
-rw-r--r-- | lumina-fm/MainUI.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index 1305e12d..815f9ed2 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -148,11 +148,18 @@ void MainUI::OpenDirs(QStringList dirs){ int index = tabBar->addTab( LXDG::findIcon("folder-open",""), dirs[i].section("/",-1) ); tabBar->setTabWhatsThis( index, "DW-"+QString::number(id) ); tabBar->setCurrentIndex(index); - }else if(tabBar->count()<1){ - //Need to create the generic Browser tab - int index = tabBar->addTab( LXDG::findIcon("folder-open",""), "Browser" ); - tabBar->setTabWhatsThis( index, "browser" ); - tabBar->setCurrentIndex(index); + }else{ + //Just make sure the browser tab is visible + bool found = false; + for(int i=0; i<tabBar->count() && !found; i++){ + if(tabBar->tabWhatsThis(i)=="browser"){ tabBar->setCurrentIndex(i); found=true; } + } + if(!found){ + //Need to create the generic Browser tab + int index = tabBar->addTab( LXDG::findIcon("folder-open",""), "Browser" ); + tabBar->setTabWhatsThis( index, "browser" ); + tabBar->setCurrentIndex(index); + } } //Initialize the widget with the proper settings @@ -472,7 +479,7 @@ void MainUI::groupModeChanged(bool active){ } //Now create the generic "browser" tab int tab = tabBar->addTab( LXDG::findIcon("folder-open",""), tr("Browser") ); - tabBar->setTabWhatsThis(tab, "Browser" ); + tabBar->setTabWhatsThis(tab, "browser" ); for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->setShowCloseButton(true); } } if(tabBar->currentIndex()<0){ tabBar->setCurrentIndex(0); } |