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

[Video inside] KAction on steroid

Tags: None
(comma "," separated)
Elv13
Registered Member
Posts
23
Karma
0
OS

[Video inside] KAction on steroid

Sun Apr 04, 2010 5:20 am
Hi, I just made a little proof of concept to add argument support to KAction without modifying the current API or braking anything. At my surprise, it was not that hard. It only add 1 KAction derived class and 1 function to KToolBar and KMenu to handle the new class.

http://www.youtube.com/watch?v=U9PrznRoPWc

-It take idea from the plan9 operating system to improve kaction
-kactions (toolbar button) can now take arguments when you drag and drop stuff on them (or use the middle button)
-it also add a regexp match to the selection in ktextedit so you can add action based on the content of the selection, like zip code, addresses, name, email
-the last thing it does is allowing the text to become active. So you can make macros in ktextedit using qtscript like services menu in dolphin/konqueror

The video is not that clear about the potential, it is more a proof that it can be done. Suggestions are welcome. The QtScript API does not exist yet. The Plan9 ACME editor can show what can be done, my video does not go in depth on the flexibility and power user side of things.

It is like the vi mode, but the total opposite. It work with heavy use of the mouse, regular expression and text selection. Any use case and suggestion are welcome before I try to push this upstream. I know some people wont like it, but as said earlier, it does not brake anything or slow down apps, it just add a new extension capability when enabled/used.

*I will post the code later


Elv13, proud KDE user since KDE 2.2.
john_hudson
Registered Member
Posts
549
Karma
2
OS

Re: [Video inside] KAction on steroid

Mon Apr 05, 2010 10:47 am
From a user perspective, it looks very useful.


John Hudson, proud to be a member of KDE forums since 2008-Oct.
DaSheep
Registered Member
Posts
95
Karma
1
OS

Re: [Video inside] KAction on steroid

Sat May 29, 2010 12:25 pm
Wow very cool

The only problem is that you cannot use the normal context menu anymore, so nor cut/copy/paste/etc mouse actions anymore. If you could find a solution for this issue (implement as a sub menu for example) I would really like to have this.

Have you already proposed it on some dev mailing-list or irc? They might be able to give more feedback...
Elv13
Registered Member
Posts
23
Karma
0
OS
It is fixed, In fact, those menu were mostly hardcoded, they just hijacked the real one when the RegEx was found. Now it have a real insertion method and a less or more working plugin system.

This project have been accepted to the Google Summer of Code program.


Elv13, proud KDE user since KDE 2.2.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], markhm, rblackwell, sethaaaa, Sogou [Bot], Yahoo [Bot]