Changeset View
Changeset View
Standalone View
Standalone View
src/views/dolphinview.cpp
Show First 20 Lines • Show All 847 Lines • ▼ Show 20 Line(s) | 835 | { | |||
---|---|---|---|---|---|
848 | KFileItemList items; | 848 | KFileItemList items; | ||
849 | items.reserve(indexes.count()); | 849 | items.reserve(indexes.count()); | ||
850 | 850 | | |||
851 | for (int index : indexes) { | 851 | for (int index : indexes) { | ||
852 | KFileItem item = m_model->fileItem(index); | 852 | KFileItem item = m_model->fileItem(index); | ||
853 | const QUrl& url = openItemAsFolderUrl(item); | 853 | const QUrl& url = openItemAsFolderUrl(item); | ||
854 | 854 | | |||
855 | if (!url.isEmpty()) { // Open folders in new tabs | 855 | if (!url.isEmpty()) { // Open folders in new tabs | ||
856 | emit tabRequested(url); | 856 | emit tabRequested(url, DolphinTabWidget::AfterLastTab); | ||
857 | } else { | 857 | } else { | ||
858 | items.append(item); | 858 | items.append(item); | ||
859 | } | 859 | } | ||
860 | } | 860 | } | ||
861 | 861 | | |||
862 | if (items.count() == 1) { | 862 | if (items.count() == 1) { | ||
863 | emit itemActivated(items.first()); | 863 | emit itemActivated(items.first()); | ||
864 | } else if (items.count() > 1) { | 864 | } else if (items.count() > 1) { | ||
865 | emit itemsActivated(items); | 865 | emit itemsActivated(items); | ||
866 | } | 866 | } | ||
867 | } | 867 | } | ||
868 | 868 | | |||
869 | void DolphinView::slotItemMiddleClicked(int index) | 869 | void DolphinView::slotItemMiddleClicked(int index) | ||
870 | { | 870 | { | ||
871 | const KFileItem& item = m_model->fileItem(index); | 871 | const KFileItem& item = m_model->fileItem(index); | ||
872 | const QUrl& url = openItemAsFolderUrl(item); | 872 | const QUrl& url = openItemAsFolderUrl(item); | ||
873 | if (!url.isEmpty()) { | 873 | if (!url.isEmpty()) { | ||
874 | emit tabRequested(url); | 874 | emit tabRequested(url, DolphinTabWidget::AfterCurrentTab); | ||
875 | } else if (isTabsForFilesEnabled()) { | 875 | } else if (isTabsForFilesEnabled()) { | ||
876 | emit tabRequested(item.url()); | 876 | emit tabRequested(item.url(), DolphinTabWidget::AfterCurrentTab); | ||
877 | } | 877 | } | ||
878 | } | 878 | } | ||
879 | 879 | | |||
880 | void DolphinView::slotItemContextMenuRequested(int index, const QPointF& pos) | 880 | void DolphinView::slotItemContextMenuRequested(int index, const QPointF& pos) | ||
881 | { | 881 | { | ||
882 | // Force emit of a selection changed signal before we request the | 882 | // Force emit of a selection changed signal before we request the | ||
883 | // context menu, to update the edit-actions first. (See Bug 294013) | 883 | // context menu, to update the edit-actions first. (See Bug 294013) | ||
884 | if (m_selectionChangedTimer->isActive()) { | 884 | if (m_selectionChangedTimer->isActive()) { | ||
▲ Show 20 Lines • Show All 958 Lines • Show Last 20 Lines |