]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge branch 'KDE/4.11' into KDE/4.12
authorWolfgang Bauer <wbauer@tmo.at>
Wed, 6 Nov 2013 16:07:10 +0000 (17:07 +0100)
committerWolfgang Bauer <wbauer@tmo.at>
Wed, 6 Nov 2013 16:07:10 +0000 (17:07 +0100)
Revert "Files passed as arguments: Ignore unsupported files"

This reverts commit cd9e50ae4f3ded5a78d0cfb09a67684a9c15d726.

See bug#327224 for details.

1  2 
src/dolphinmainwindow.cpp

index 0804f4be9330033130a60f900fc2628fbf550070,b477600f04b9e753ba1d5536d189b2e1571366ec..4c3295434ab643708d55127df0248281f3494502
  #include "panels/information/informationpanel.h"
  #include "settings/dolphinsettingsdialog.h"
  #include "statusbar/dolphinstatusbar.h"
- #include "views/dolphinview.h"
  #include "views/dolphinviewactionhandler.h"
  #include "views/dolphinremoteencoding.h"
  #include "views/draganddrophelper.h"
  #include "views/viewproperties.h"
 +#include "views/dolphinnewfilemenuobserver.h"
  
  #ifndef Q_OS_WIN
  #include "panels/terminal/terminalpanel.h"
@@@ -128,9 -126,6 +127,9 @@@ DolphinMainWindow::DolphinMainWindow() 
      ViewTab& viewTab = m_viewTab[m_tabIndex];
      viewTab.wasActive = true; // The first opened tab is automatically active
  
 +    connect(&DolphinNewFileMenuObserver::instance(), SIGNAL(errorMessage(QString)),
 +            this, SLOT(showErrorMessage(QString)));
 +
      KIO::FileUndoManager* undoManager = KIO::FileUndoManager::self();
      undoManager->setUiInterface(new UndoUiInterface());
  
@@@ -248,20 -243,8 +247,8 @@@ void DolphinMainWindow::openDirectories
          return;
      }
  
-     // dirs could contain URLs that actually point to archives or other files.
-     // Replace them by URLs we can open where possible and filter the rest out.
-     QList<KUrl> urlsToOpen;
-     foreach (const KUrl& rawUrl, dirs) {
-         const KFileItem& item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, rawUrl);
-         item.determineMimeType();
-         const KUrl& url = DolphinView::openItemAsFolderUrl(item);
-         if (!url.isEmpty()) {
-             urlsToOpen.append(url);
-         }
-     }
-     if (urlsToOpen.count() == 1) {
-         m_activeViewContainer->setUrl(urlsToOpen.first());
+     if (dirs.count() == 1) {
+         m_activeViewContainer->setUrl(dirs.first());
          return;
      }
  
  
      // Open each directory inside a new tab. If the "split view" option has been enabled,
      // always show two directories within one tab.
-     QList<KUrl>::const_iterator it = urlsToOpen.constBegin();
-     while (it != urlsToOpen.constEnd()) {
+     QList<KUrl>::const_iterator it = dirs.begin();
+     while (it != dirs.end()) {
          openNewTab(*it);
          ++it;
  
-         if (hasSplitView && (it != urlsToOpen.constEnd())) {
+         if (hasSplitView && (it != dirs.end())) {
              const int tabIndex = m_viewTab.count() - 1;
              m_viewTab[tabIndex].secondaryView->setUrl(*it);
              ++it;
@@@ -1485,7 -1468,7 +1472,7 @@@ DolphinViewContainer* DolphinMainWindow
  void DolphinMainWindow::setupActions()
  {
      // setup 'File' menu
 -    m_newFileMenu = new DolphinNewFileMenu(this);
 +    m_newFileMenu = new DolphinNewFileMenu(actionCollection(), this);
      KMenu* menu = m_newFileMenu->menu();
      menu->setTitle(i18nc("@title:menu Create new folder, file, link, etc.", "Create New"));
      menu->setIcon(KIcon("document-new"));