This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Remove items from dolphin context menu

Tags: None
(comma "," separated)
thugo
Registered Member
Posts
45
Karma
0
Hello,

Now that I was really successful in adding items to dolphins context menu via new .desktop files ... I am looking for a way to remove existing items like "Open in new Tab". It is useless for me, because a middle-click does exactly the same and does it much faster.

Does anyone know how?

Best greetings
User avatar
Rog131
Registered Member
Posts
828
Karma
10
There are many ways to make the Dolphin context menus. The "Open in new Tab" is from the Dolphin source code. The dolphincontextmenu.cpp - https://cgit.kde.org/dolphin.git/tree/s ... xtmenu.cpp has

Code: Select all
// insert 'Open in new window' and 'Open in new tab' entries
            addAction(m_mainWindow->actionCollection()->action(QStringLiteral("open_in_new_window")));
            addAction(m_mainWindow->actionCollection()->action(QStringLiteral("open_in_new_tab")));


If you disable the 'add action open_in_new_tab' then the context menu won't have it.

Image
Full image: https://imgur.com/LQp1lp6

Building alternative version of the Dolphin: viewtopic.php?f=225&t=136907
thugo
Registered Member
Posts
45
Karma
0
Dear Rog131,

thank you very much again!
I am going to try this. But to be honest ... I'm a bit afraid too!
We'll see how it goes ...
thugo
Registered Member
Posts
45
Karma
0
Hello Rog131,

Thank you very much once more!
I followed your directions from the thread you linked to ... and it worked like a charm!
The entries are gone! Wonderful to have such an uncluttered context menu! :-)

And it was the first time I ever compiled a program! I couldn't believe this went without problems.

One more thing I found already out is: how to remove the close-buttons on the tabs:
By removing the line 'setTabsClosable(true);' from
https://cgit.kde.org/dolphin.git/tree/s ... ar.cpp#n38
... also great!

The only thing else I would like to change is ... to open new tabs in the foreground.
Would this also be possible through simply removing a line? If yes, which one would it be?

Greetings again,
Thomas


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], rockscient, Yahoo [Bot]