Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to create a Lens for Unity in 11.10 using vala. This is my daemon.vala:

using Dee;
using Gee;

namespace PidginLens
{
    public class Daemon : GLib.Object, Unity.Activation
    {
        public static void main(string[] args)
        {

        }
    }
}

Now trying to compiling with valac --pkg gee-1.0 --pkg dee-1.0 --pkg unity just says

daemon.vala:6.40-6.55: error: The type name `Unity.Activation' could not be found
public class Daemon : GLib.Object, Unity.Activation
                                   ^^^^^^^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)

libunity4 libunity6 libunity-dev libunity-core-4.0.4 libunity-core-4.0-dev gir1.2-unity-4.0 are all installed, and it obviously finds the unity package (since changing --pkg unity to something like --pkg unity-not-here yields another error. So what's my mistake? why is Unity.Activation not there?

Thanks guys!

share|improve this question
    
Could you provide a pointer to the documentation of Unity.Activation? I can only find Unity.ActivationResponse... –  xubuntix Jan 17 '12 at 12:49
    
So did i, i checked unity.vala on my machine and the only hit i found for 'Activation' was ActivationResponse. I followed the example at wiki.ubuntu.com/Unity/Lenses which brought me to my current problem. :( –  Leopard2A5 Jan 17 '12 at 13:29
1  
Are you trying this on Oneiric (Unity 4) or Precise (Unity 5)? The API has changed slightly. –  mhall119 Jan 17 '12 at 15:34
    
I'm running Ubuntu 11.10 (oneiric) x64 –  Leopard2A5 Jan 17 '12 at 16:22
add comment

1 Answer

The Unity.Activation interface was dropped as of Unity 4 (Ubuntu 11.10). Instead you can hook into the activation callback using signals like this:

scope.activate_uri.connect(on_uri_activated);

If you are not overriding the activation handling, you probably only need remove Unity.Activation and recompile.

Full documentation for Unity 4 (Ubuntu 11.10) can be viewed here: http://developer.ubuntu.com/api/ubuntu-11.10/c/Unity-4.0.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.