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

How to add new items in the context menu -> Create New

Tags: None
(comma "," separated)
unimous
Registered Member
Posts
1
Karma
0
How can I add new items in the Dolphin's context menu -> Create New. Such as .odt file.
User avatar
google01103
Manager
Posts
6668
Karma
25
I'm pretty sure the "create new" is hard coded, what you'd want to do was to create a new service menu which would add a new item displayed when you right click in Dolphin. This tutorial should help http://techbase.kde.org/Development/Tut ... vice_Menus as might this service menu editor http://www.sharpley.org.uk/node/3


OpenSuse Leap 42.1 x64, Plasma 5.x

wolfi323
Registered Member
Posts
1129
Karma
11
OS
unimous wrote:How can I add new items in the Dolphin's context menu -> Create New. Such as .odt file.

Well, on my system (openSUSE 12.3) I DO have .odt in there.
But you can add new ones. See below.

google01103 wrote:I'm pretty sure the "create new" is hard coded, what you'd want to do was to create a new service menu which would add a new item displayed when you right click in Dolphin. This tutorial should help http://techbase.kde.org/Development/Tut ... vice_Menus as might this service menu editor http://www.sharpley.org.uk/node/3

The service menu is something different.

And the entries in "Create New" are NOT hardcoded.
The templates in the "Create new" context menu are located in /usr/share/kde4/templates/ (on openSUSE at least, this may be slightly different on other distributions).
Just add your own file there (take an existing one as template) and it should appear in that context menu immediately.
wolfi323
Registered Member
Posts
1129
Karma
11
OS
wolfi323 wrote:The templates in the "Create new" context menu are located in /usr/share/kde4/templates/ (on openSUSE at least, this may be slightly different on other distributions).

You can also use the folder ~/.kde4/share/templates/ (or, depending on the distribution, ~/.kde/share/templates/) in your home directory.
Use " kde4-config --path templates" to find out which folders are respected on your system.
User avatar
google01103
Manager
Posts
6668
Karma
25
This package contains templates and context menu entries for KDE and OpenOffice.org3. Now you can right click in file manager or desktop and generate a new file.

http://kde-apps.org/content/show.php?content=123189


OpenSuse Leap 42.1 x64, Plasma 5.x

plepage
Registered Member
Posts
8
Karma
0
Just to say, in KDE Kubuntu 4.13.1, the directory to use for pasting /templates is ~ /.kde/share/
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
To determine the appropriate directory on any system, you can use the following command:
Code: Select all
kde4-config --localprefix


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

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