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

New menu item in Konqueror

Tags: None
(comma "," separated)
Szymek
Registered Member
Posts
2
Karma
0
OS

New menu item in Konqueror

Fri Sep 11, 2009 9:48 pm
I have a couple of tools, that are quite handy for file browsing.

I would like to add new menu items to Konqueror's Tools menu.
Any ideas how to do it the simple way?
Elv13
Registered Member
Posts
23
Karma
0
OS

Re: New menu item in Konqueror

Fri Sep 18, 2009 10:03 pm
Does the simple way can include recompiling KDE (you are a gentoo user, it might not be that hard ;) )? KXMLGuiWindow have some limits, you can't "create" new functions using it.

You will have to read the KDE developpement tutorial available in wiki.kde.org and add few new KActions and function calling your tools. If they are external programs or script, the easy way is using the system() function with a ' &' at the end (if you don't add &, konqueror will freez until the command end). The clean way would be to fork and use execvp, it is a little more complicated (but faster).


Elv13, proud KDE user since KDE 2.2.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: New menu item in Konqueror

Sat Sep 19, 2009 1:16 am
Note that using QProcess::startDetached is the correct method for running external applications in that manner, not using system().


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Szymek
Registered Member
Posts
2
Karma
0
OS

Re: New menu item in Konqueror

Sat Sep 19, 2009 5:33 am
Thank you for replies.

I thought about creating an extension, but I wanted to make sure, there are no easier ways to do it.


Bookmarks



Who is online

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