add SmartInfo

Use smartInfoHub API to display relevant advanced information
during a call.

Change-Id: Ia4e19953e69460ee7e006654cba553bfc2d06581
[stepan.salenikovich@savoirfairelinux.com:  got rid of mem leaks; disconnect
 from signal on destructions; improved menu item; perform start/stop action
 in RingClient so that it can be called from anywhere]
Signed-off-by: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
Reviewed-by: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
diff --git a/src/video/video_widget.cpp b/src/video/video_widget.cpp
index d5f12bd..1f7b62a 100644
--- a/src/video/video_widget.cpp
+++ b/src/video/video_widget.cpp
@@ -33,6 +33,7 @@
 #include <mutex>
 #include <call.h>
 #include "xrectsel.h"
+#include <smartinfohub.h>
 
 static constexpr int VIDEO_LOCAL_SIZE            = 150;
 static constexpr int VIDEO_LOCAL_OPACITY_DEFAULT = 255; /* out of 255 */
@@ -172,7 +173,6 @@
     G_OBJECT_CLASS(video_widget_parent_class)->finalize(object);
 }
 
-
 /*
  * video_widget_class_init()
  *
@@ -522,6 +522,15 @@
     g_object_set_data(G_OBJECT(item), JOIN_CALL_KEY, call);
     g_signal_connect(item, "activate", G_CALLBACK(switch_video_input_file), parent);
 
+    /* add separator */
+    gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_separator_menu_item_new());
+
+    /* add SmartInfo */
+    item = gtk_check_menu_item_new_with_mnemonic(_("Show advanced information"));
+    gtk_actionable_set_action_name(GTK_ACTIONABLE(item), "app.display-smartinfo");
+    gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
+    gtk_widget_insert_action_group(menu, "app", G_ACTION_GROUP(g_application_get_default()));
+
     /* show menu */
     gtk_widget_show_all(menu);
     gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event->button, event->time);