viewTab.primaryView->view()->reload();
m_viewTab.append(viewTab);
+
+ actionCollection()->action("close_tab")->setEnabled(true);
}
void DolphinMainWindow::toggleActiveView()
// closing the last tab is not possible
if (m_viewTab.count() == 1) {
m_tabBar->removeTab(0);
+ actionCollection()->action("close_tab")->setEnabled(false);
} else {
m_tabBar->blockSignals(false);
}
}
}
+void DolphinMainWindow::slotTestCanDecode(const QDragMoveEvent* event, bool& canDecode)
+{
+ canDecode = KUrl::List::canDecode(event->mimeData());
+}
+
void DolphinMainWindow::init()
{
DolphinSettings& settings = DolphinSettings::instance();
this, SLOT(openTabContextMenu(int, const QPoint&)));
connect(m_tabBar, SIGNAL(newTabRequest()),
this, SLOT(openNewTab()));
+ connect(m_tabBar, SIGNAL(testCanDecode(const QDragMoveEvent*, bool&)),
+ this, SLOT(slotTestCanDecode(const QDragMoveEvent*, bool&)));
m_tabBar->blockSignals(true); // signals get unblocked after at least 2 tabs are open
QWidget* centralWidget = new QWidget(this);
}
updateViewActions();
+ QAction* showFilterBarAction = actionCollection()->action("show_filter_bar");
+ showFilterBarAction->setChecked(generalSettings->filterBar());
+
if (firstRun) {
// assure a proper default size if Dolphin runs the first time
resize(750, 500);
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);