[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.1/kdebase/apps/dolphin/src
From:       Peter Penz <peter.penz () gmx ! at>
Date:       2008-08-12 18:59:52
Message-ID: 1218567592.601805.18472.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 845996 by ppenz:

Backport of 845995: Assure that the "Close Tab" action gets disabled when only one \
tab is open.

CCBUG: 168904

 M  +5 -1      dolphinmainwindow.cpp  


--- branches/KDE/4.1/kdebase/apps/dolphin/src/dolphinmainwindow.cpp #845995:845996
@@ -275,6 +275,8 @@
     viewTab.primaryView->view()->reload();
 
     m_viewTab.append(viewTab);
+    
+    actionCollection()->action("close_tab")->setEnabled(true);
 }
 
 void DolphinMainWindow::toggleActiveView()
@@ -724,7 +726,8 @@
     // if only one tab is left, also remove the tab entry so that
     // closing the last tab is not possible
     if (m_viewTab.count() == 1) {
-        m_tabBar->removeTab(0);
+        m_tabBar->removeTab(0);   
+        actionCollection()->action("close_tab")->setEnabled(false);
     } else {
         m_tabBar->blockSignals(false);
     }
@@ -914,6 +917,7 @@
 
     QAction* closeTab = new QAction(KIcon("tab-close"), i18nc("@action:inmenu File", \
"Close Tab"), this);  closeTab->setShortcut(Qt::CTRL | Qt::Key_W);
+    closeTab->setEnabled(false);
     connect(closeTab, SIGNAL(triggered()), this, SLOT(closeTab()));
     actionCollection()->addAction("close_tab", closeTab);
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic