Adding a "Rapid Paste" Feature

Asked by nnutter


I haven't done any Vala or even really GUI programming before but I was thinking about trying to add a feature to Diodon but I wanted to check with you first to see whether you would be interested in it if the quality is good enough.

I currently use a clipboard manager on OS X called Clyppan that has a "rapid paste" feature where when you press the keyboard shortcut it pastes the top item in the history and then shifts it to the bottom of the history (rather than just discarding it). This lets you copy several items sequentially and then paste them rather than having to swap back and forth over and over.

If I were able to write good enough code to add this feature would you be willing to review it and possible merge it?

Thank you,

Question information

English Edit question
Diodon Edit question
No assignee Edit question
Solved by:
Oliver Sauder
Last query:
Last reply:
Revision history for this message
Oliver Sauder (sao) said :

Sure contributions are always welcome.

There is even a blueprint for this feature to be found here: I do prefer the name rapid paste for this feature though... ;)

So best you can write a plugin for this, first independently from Diodon. See blog post here to get started.

If the plugin is working well I would also consider to merge it into diodon (in this case the package diodon-plugins). Just create a bug report and propose a merge. But best do that after the plugin has been evolved and is working well.

Let me know when you have any question. I try to connect to IRC channel #diodon on Freenode frequently so you should be able to meet me there (nick name sao).

Revision history for this message
nnutter (nnutter) said :

I'll try to catch up with you on IRC then. I was able to build and install the sample plugins after figuring out a couple things but they aren't showing up in Diodon. I'll try to troubleshoot more later.

In order to get `./wap configure` to work I also had to `apt-get install libgee-dev valac`; they don't seem to be depended on by diodon-dev though that may make sense.

Revision history for this message
Best Oliver Sauder (sao) said :

That diodon-dev is not depending on libgee-dev is definitely a bug as this way the binding does not work at all. I have fixed this and should be available in the daily ppa. valac though is depending on the code which you want to compile and not on the binding itself. So this still needs to be installed. I change the blog post though so this is clear how to do it.

About plugins not appearing: I can imagine what the issue could be. Currently the plugin sample installs to /usr/local but the official Diodon installations only looks in /usr path. I will need to think about whether it makes sense for the the packaged Diodon version to look in /usr/local as well.

However for now you can install the plugins to ~/.local/share/diodon/plugins. I have updated the plugin-sample source code so you can use following commands to do so:
./waf configure --libdir ~/.local/share/
./waf build
./waf install

Now also no root rights are needed to do testing with the plugins.

Hope this helps.

Revision history for this message
nnutter (nnutter) said :

This is great! =)