Actually decrement usage count when releasing a service
[gregoa/zavai.git] / src / app_keyboard.vala
index c70b16f7f7ce814d450ecdb5b65243f648dad854..31c049276712cedc55f05c8d74b133e1eca8f3a2 100644 (file)
@@ -42,7 +42,9 @@ public class Keyboard : Service
 
     protected override void start()
     {
-        string[] args = { zavai.config.homedir + "/keyboard", null };
+        string script = zavai.config.find_script("keyboard");
+        if (script == null) return;
+        string[] args = { script, null };
         int opid;
         try {
             Gdk.spawn_on_screen(
@@ -112,41 +114,6 @@ public class KeyboardIcon : Gtk.StatusIcon
     }
 }
 
-/*
-public class GPSRequestLink : Gtk.ToggleButton
-{
-    public GPSRequestLink()
-    {
-        // GPS status icon
-        status_icon = new Gtk.StatusIcon();
-        status_icon.set_visible(true);
-        status_icon.activate += on_status_activate;
-        update_icon();
-    }
-
-    private void on_fix_status_changed(dynamic DBus.Object pos, int fix_status)
-    {
-        this.fix_status = fix_status;
-        update_icon();
-    }
-
-    private void on_toggled(Gtk.Button src)
-    {
-        Service s = zavai.registry.gets(service_name);
-        if (get_active())
-            s.request("servicerequestlink");
-        else
-            s.release("servicerequestlink");
-        set_label(get_active() ? label_stop : label_start);
-        update_icon();
-    }
-
-    private void on_status_activate()
-    {
-        set_active(!get_active());
-    }
-}
-*/
 
 Keyboard keyboard;
 KeyboardIcon icon;