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
  • 70,934
  • 124
  • 466
  • 653
Leopard2A5
  • 91
  • 1
  • Could you provide a pointer to the documentation of Unity.Activation? I can only find [Unity.ActivationResponse](https://wiki.ubuntu.com/Unity/Lenses)... – 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 https://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

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,017
  • 15
  • 25