6

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!

Jorge Castro
  • 73,717

1 Answers1

5

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

mhall119
  • 5,037