]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge branch 'KDE/4.9'
authorLuca Beltrame <lbeltrame@kde.org>
Tue, 20 Nov 2012 06:44:59 +0000 (07:44 +0100)
committerLuca Beltrame <lbeltrame@kde.org>
Tue, 20 Nov 2012 06:44:59 +0000 (07:44 +0100)
Conflicts:
konqueror/settings/kio/kcookiespolicies.cpp [master only changes]
konqueror/settings/kio/kcookiespolicies.h [ditto]

1  2 
src/views/dolphinview.cpp

index df49634d4a0e0c94618d90d7e79a3140864829ce,13db9896e66ae83f616ead6f46653e6dc9a6da01..e677613bac2ca45714e2d763f250aa027e8e1cd8
@@@ -73,7 -73,7 +73,7 @@@
  #include "zoomlevelinfo.h"
  
  #ifdef HAVE_NEPOMUK
 -    #include <Nepomuk/ResourceManager>
 +    #include <Nepomuk2/ResourceManager>
  #endif
  
  namespace {
@@@ -154,7 -154,6 +154,7 @@@ DolphinView::DolphinView(const KUrl& ur
  
      connect(m_model, SIGNAL(directoryLoadingStarted()),       this, SLOT(slotDirectoryLoadingStarted()));
      connect(m_model, SIGNAL(directoryLoadingCompleted()),     this, SLOT(slotDirectoryLoadingCompleted()));
 +    connect(m_model, SIGNAL(directoryLoadingCanceled()),      this, SIGNAL(directoryLoadingCanceled()));
      connect(m_model, SIGNAL(directoryLoadingProgress(int)),   this, SIGNAL(directoryLoadingProgress(int)));
      connect(m_model, SIGNAL(directorySortingProgress(int)),   this, SIGNAL(directorySortingProgress(int)));
      connect(m_model, SIGNAL(itemsChanged(KItemRangeList,QSet<QByteArray>)),
@@@ -638,25 -637,25 +638,25 @@@ void DolphinView::clearSelection(
  void DolphinView::renameSelectedItems()
  {
      const KFileItemList items = selectedItems();
 -     if (items.isEmpty()) {
 -         return;
 -     }
 -
 -     if (items.count() == 1 && GeneralSettings::renameInline()) {
 -         const int index = m_model->index(items.first());
 -         m_view->editRole(index, "text");
 -     } else {
 -         RenameDialog* dialog = new RenameDialog(this, items);
 -         dialog->setAttribute(Qt::WA_DeleteOnClose);
 -         dialog->show();
 -         dialog->raise();
 -         dialog->activateWindow();
 -     }
 -
 -     // Assure that the current index remains visible when KFileItemModel
 -     // will notify the view about changed items (which might result in
 -     // a changed sorting).
 -     m_assureVisibleCurrentIndex = true;
 +    if (items.isEmpty()) {
 +        return;
 +    }
 +
 +    if (items.count() == 1 && GeneralSettings::renameInline()) {
 +        const int index = m_model->index(items.first());
 +        m_view->editRole(index, "text");
 +    } else {
 +        RenameDialog* dialog = new RenameDialog(this, items);
 +        dialog->setAttribute(Qt::WA_DeleteOnClose);
 +        dialog->show();
 +        dialog->raise();
 +        dialog->activateWindow();
 +    }
 +
 +    // Assure that the current index remains visible when KFileItemModel
 +    // will notify the view about changed items (which might result in
 +    // a changed sorting).
 +    m_assureVisibleCurrentIndex = true;
  }
  
  void DolphinView::trashSelectedItems()
@@@ -799,14 -798,6 +799,14 @@@ void DolphinView::slotItemsActivated(co
          items.append(m_model->fileItem(index));
      }
  
 +    if (items.count() > 5) {
 +        QString question = QString("Are you sure you want to open %1 items?").arg(items.count());
 +        const int answer = KMessageBox::warningYesNo(this, question);
 +        if (answer != KMessageBox::Yes) {
 +            return;
 +        }
 +    }
 +
      foreach (const KFileItem& item, items) {
          if (item.isDir()) {
              emit tabRequested(item.url());
@@@ -847,7 -838,7 +847,7 @@@ void DolphinView::slotHeaderContextMenu
      bool nepomukRunning = false;
      bool indexingEnabled = false;
  #ifdef HAVE_NEPOMUK
 -    nepomukRunning = (Nepomuk::ResourceManager::instance()->initialized());
 +    nepomukRunning = (Nepomuk2::ResourceManager::instance()->initialized());
      if (nepomukRunning) {
          KConfig config("nepomukserverrc");
          indexingEnabled = config.group("Service-nepomukfileindexer").readEntry("autostart", false);
@@@ -1182,8 -1173,11 +1182,11 @@@ QString DolphinView::viewPropertiesCont
  
  void DolphinView::observeCreatedItem(const KUrl& url)
  {
-     markUrlAsCurrent(url);
-     markUrlsAsSelected(QList<KUrl>() << url);
+     if (m_active) {
+         clearSelection();
+         markUrlAsCurrent(url);
+         markUrlsAsSelected(QList<KUrl>() << url);
+     }
  }
  
  void DolphinView::slotDirectoryRedirection(const KUrl& oldUrl, const KUrl& newUrl)