Changeset View
Changeset View
Standalone View
Standalone View
src/dolphinmainwindow.cpp
Show First 20 Lines • Show All 815 Lines • ▼ Show 20 Line(s) | |||||
816 | { | 816 | { | ||
817 | QPointer<DolphinContextMenu> contextMenu = new DolphinContextMenu(this, pos, item, url); | 817 | QPointer<DolphinContextMenu> contextMenu = new DolphinContextMenu(this, pos, item, url); | ||
818 | contextMenu.data()->setCustomActions(customActions); | 818 | contextMenu.data()->setCustomActions(customActions); | ||
819 | const DolphinContextMenu::Command command = contextMenu.data()->open(); | 819 | const DolphinContextMenu::Command command = contextMenu.data()->open(); | ||
820 | 820 | | |||
821 | switch (command) { | 821 | switch (command) { | ||
822 | case DolphinContextMenu::OpenParentFolder: | 822 | case DolphinContextMenu::OpenParentFolder: | ||
823 | changeUrl(KIO::upUrl(item.url())); | 823 | changeUrl(KIO::upUrl(item.url())); | ||
824 | m_activeViewContainer->view()->markUrlsAsSelected({item.url()}); | ||||
825 | m_activeViewContainer->view()->markUrlAsCurrent(item.url()); | ||||
824 | break; | 826 | break; | ||
825 | 827 | | |||
826 | case DolphinContextMenu::OpenParentFolderInNewWindow: | 828 | case DolphinContextMenu::OpenParentFolderInNewWindow: | ||
827 | Dolphin::openNewWindow({KIO::upUrl(item.url())}, this); | 829 | Dolphin::openNewWindow({item.url()}, this, Dolphin::OpenNewWindowFlag::Select); | ||
828 | break; | 830 | break; | ||
829 | 831 | | |||
830 | case DolphinContextMenu::OpenParentFolderInNewTab: | 832 | case DolphinContextMenu::OpenParentFolderInNewTab: | ||
831 | openNewTab(KIO::upUrl(item.url())); | 833 | openNewTab(KIO::upUrl(item.url())); | ||
832 | break; | 834 | break; | ||
833 | 835 | | |||
elvisangelaccio: Please remove, since this approach doesn't work.
| |||||
834 | case DolphinContextMenu::None: | 836 | case DolphinContextMenu::None: | ||
835 | default: | 837 | default: | ||
836 | break; | 838 | break; | ||
837 | } | 839 | } | ||
838 | 840 | | |||
839 | // Delete the menu, unless it has been deleted in its own nested event loop already. | 841 | // Delete the menu, unless it has been deleted in its own nested event loop already. | ||
840 | if (contextMenu) { | 842 | if (contextMenu) { | ||
841 | contextMenu->deleteLater(); | 843 | contextMenu->deleteLater(); | ||
▲ Show 20 Lines • Show All 789 Lines • Show Last 20 Lines |
Please remove, since this approach doesn't work.