diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2012-03-21 23:06:41 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2012-03-21 23:06:41 +0100 |
commit | 3ff7d1f6969cd867ff86554f6c97c425ed0c1e63 (patch) | |
tree | d5dd68f6dfb990e46b5bf62e60b5fad2f4f673c5 | |
parent | f1a65e78c895097f3f2c09c0f187a9b399ddc19e (diff) |
controllers: signal when a client is connected
-rw-r--r-- | gtk/controller/controller.vala | 4 | ||||
-rw-r--r-- | gtk/controller/foreign-menu.vala | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gtk/controller/controller.vala b/gtk/controller/controller.vala index b083f4e..c6cf984 100644 --- a/gtk/controller/controller.vala +++ b/gtk/controller/controller.vala @@ -46,6 +46,8 @@ public class Controller: Object { public signal void show (); public signal void hide (); + public signal void client_connected (); + public void menu_item_click_msg (int32 item_id) { var msg = SpiceProtocol.Controller.MsgValue (); msg.base.size = (uint32)sizeof (SpiceProtocol.Controller.MsgValue); @@ -192,6 +194,8 @@ public class Controller: Object { excl_connection = c; } + client_connected (); + var t = new uint8[sizeof(SpiceProtocol.Controller.Msg)]; for (;;) { read = yield c.input_stream.read_async (t[0:sizeof(SpiceProtocol.Controller.Msg)]); diff --git a/gtk/controller/foreign-menu.vala b/gtk/controller/foreign-menu.vala index 677e2ad..f2406bd 100644 --- a/gtk/controller/foreign-menu.vala +++ b/gtk/controller/foreign-menu.vala @@ -22,6 +22,8 @@ public class ForeignMenu: Object { public Menu menu { get; private set; } public string title { get; private set; } + public signal void client_connected (); + private int nclients; private List<IOStream> clients; @@ -153,6 +155,8 @@ public class ForeignMenu: Object { read = yield c.input_stream.read_async (title[0:title_size]); this.title = (string)title; + client_connected (); + var t = new uint8[sizeof(SpiceProtocol.ForeignMenu.Msg)]; for (;;) { read = yield c.input_stream.read_async (t[0:sizeof(SpiceProtocol.ForeignMenu.Msg)]); |