]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinpart.cpp
Fix issue that the columns "Link Destination" and "Path" are shown outside the visibl...
[dolphin.git] / src / dolphinpart.cpp
index e005ac29c21ff1a8ce95d10d36c2ee62eed212b6..519d05741dc146a6c460a9cb3ec0429057126a2a 100644 (file)
@@ -106,8 +106,6 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL
             this, SLOT(slotSelectionChanged(KFileItemList)));
     connect(m_view, SIGNAL(requestItemInfo(KFileItem)),
             this, SLOT(slotRequestItemInfo(KFileItem)));
-    connect(m_view, SIGNAL(requestUrlChange(KUrl)),
-            this, SLOT(slotRequestUrlChange(KUrl)));
     connect(m_view, SIGNAL(modeChanged()),
             this, SIGNAL(viewModeChanged())); // relay signal
     connect(m_view, SIGNAL(redirection(KUrl, KUrl)),
@@ -156,7 +154,8 @@ void DolphinPart::createActions()
 {
     // Edit menu
 
-    m_newMenu = new KNewFileMenu(actionCollection(), "new_menu", widget());
+    m_newMenu = new KNewFileMenu(actionCollection(), "new_menu", this);
+    m_newMenu->setParentWidget(widget());
     DolphinNewMenuObserver::instance().attach(m_newMenu);
     connect(m_newMenu->menu(), SIGNAL(aboutToShow()),
             this, SLOT(updateNewMenu()));
@@ -385,8 +384,13 @@ void DolphinPart::slotOpenContextMenu(const KFileItem& _item,
 
     // TODO: We should change the signature of the slots (and signals) for being able
     //       to tell for which items we want a popup.
-    const KFileItemList items = (m_view->selectedItems().count() ? m_view->selectedItems()
-                                 : KFileItemList() << item);
+    KFileItemList items;
+    if (m_view->selectedItems().isEmpty()) {
+        items.append(item);
+    } else {
+        items = m_view->selectedItems();
+    }
+
     KFileItemListProperties capabilities(items);
 
     KParts::BrowserExtension::ActionGroupMap actionGroups;
@@ -455,16 +459,6 @@ void DolphinPart::slotRedirection(const KUrl& oldUrl, const KUrl& newUrl)
     }
 }
 
-void DolphinPart::slotRequestUrlChange(const KUrl& url)
-{
-    if (m_view->url() != url) {
-        // If the view URL is not equal to 'url', then an inner URL change has
-        // been done (e. g. by activating an existing column in the column view).
-        openUrl(url);
-        emit m_extension->openUrlNotify();
-    }
-}
-
 ////
 
 void DolphinPartBrowserExtension::restoreState(QDataStream &stream)