]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinview.cpp
let Dolphin use the new tab-close-buttons
[dolphin.git] / src / dolphinview.cpp
index 12d6be0d2744dadfe31576cd3974db4ab808e38c..d87571c7e79e2e173694fee1ba1851c2f7f29a75 100644 (file)
@@ -82,7 +82,8 @@ DolphinView::DolphinView(QWidget* parent,
     m_dolphinModel(dolphinModel),
     m_dirLister(dirLister),
     m_proxyModel(proxyModel),
-    m_iconManager(0)
+    m_iconManager(0),
+    m_toolTipManager(0)
 {
     setFocusPolicy(Qt::StrongFocus);
     m_topLayout = new QVBoxLayout(this);
@@ -113,6 +114,8 @@ DolphinView::DolphinView(QWidget* parent,
             this, SLOT(updateAdditionalInfo(const KFileItemDelegate::InformationList&)));
     connect(m_controller, SIGNAL(itemTriggered(const KFileItem&)),
             this, SLOT(triggerItem(const KFileItem&)));
+    connect(m_controller, SIGNAL(tabRequested(const KUrl&)),
+            this, SIGNAL(tabRequested(const KUrl&)));
     connect(m_controller, SIGNAL(activated()),
             this, SLOT(activate()));
     connect(m_controller, SIGNAL(itemEntered(const KFileItem&)),
@@ -750,6 +753,9 @@ void DolphinView::triggerItem(const KFileItem& item)
         return;
     }
 
+    if (m_toolTipManager != 0) {
+        m_toolTipManager->hideTip();
+    }
     emit itemTriggered(item); // caught by DolphinViewContainer or DolphinPart
 }
 
@@ -767,6 +773,10 @@ void DolphinView::openContextMenu(const QPoint& pos)
         item = fileItem(index);
     }
 
+    if (m_toolTipManager != 0) {
+        m_toolTipManager->hideTip();
+    }
+
     m_isContextMenuOpen = true; // TODO: workaround for Qt-issue xxxxxx
     emit requestContextMenu(item, url());
     m_isContextMenuOpen = false;
@@ -1086,7 +1096,7 @@ void DolphinView::createView()
     m_iconManager->setShowPreview(m_showPreview);
 
     if (DolphinSettings::instance().generalSettings()->showToolTips()) {
-        new ToolTipManager(view, m_proxyModel);
+        m_toolTipManager = new ToolTipManager(view, m_proxyModel);
     }
 
     m_topLayout->insertWidget(1, view);
@@ -1112,6 +1122,7 @@ void DolphinView::deleteView()
         m_columnView = 0;
         m_fileItemDelegate = 0;
         m_iconManager = 0;
+        m_toolTipManager = 0;
     }
 }