From: Peter Penz Date: Sat, 9 Oct 2010 15:39:41 +0000 (+0000) Subject: Move the "Add to Places" action upwards when used on the viewport to stay consistent... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/53c36c4758d1e163ff66f0ffb5f27af415527cf9 Move the "Add to Places" action upwards when used on the viewport to stay consistent when showing the context-menu above an item. svn path=/trunk/KDE/kdebase/apps/; revision=1184250 --- diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index ae5bf8698..20be6f4e8 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -325,6 +325,14 @@ void DolphinContextMenu::openViewportContextMenu() // "open_in_new_tab" here, as the current selection should get ignored. m_popup->addAction(m_mainWindow->actionCollection()->action("new_window")); m_popup->addAction(m_mainWindow->actionCollection()->action("new_tab")); + + // Insert 'Add to Places' entry if exactly one item is selected + QAction* addToPlacesAction = 0; + if (!placeExists(m_mainWindow->activeViewContainer()->url())) { + addToPlacesAction = m_popup->addAction(KIcon("bookmark-new"), + i18nc("@action:inmenu Add current folder to places", "Add to Places")); + } + m_popup->addSeparator(); QAction* pasteAction = createPasteAction(); @@ -340,13 +348,6 @@ void DolphinContextMenu::openViewportContextMenu() addVersionControlActions(); - // insert 'Add to Places' entry if exactly one item is selected - QAction* addToPlacesAction = 0; - if (!placeExists(m_mainWindow->activeViewContainer()->url())) { - addToPlacesAction = m_popup->addAction(KIcon("bookmark-new"), - i18nc("@action:inmenu Add current folder to places", "Add to Places")); - } - addCustomActions(); QAction* propertiesAction = m_popup->addAction(i18nc("@action:inmenu", "Properties"));