diff options
Diffstat (limited to 'lumina-fm')
-rw-r--r-- | lumina-fm/MainUI.cpp | 19 | ||||
-rw-r--r-- | lumina-fm/MainUI.ui | 9 |
2 files changed, 22 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); } diff --git a/lumina-fm/MainUI.ui b/lumina-fm/MainUI.ui index 184df872..3e926dd0 100644 --- a/lumina-fm/MainUI.ui +++ b/lumina-fm/MainUI.ui @@ -124,9 +124,15 @@ <property name="text"> <string>New &Tab</string> </property> + <property name="toolTip"> + <string>New Dir Browser</string> + </property> <property name="shortcut"> <string>Ctrl+T</string> </property> + <property name="shortcutContext"> + <enum>Qt::ApplicationShortcut</enum> + </property> </action> <action name="actionClose"> <property name="text"> @@ -200,6 +206,9 @@ <property name="shortcut"> <string>Ctrl+F</string> </property> + <property name="shortcutContext"> + <enum>Qt::ApplicationShortcut</enum> + </property> </action> <action name="actionTabs"> <property name="text"> |