$ git clone http://tcclient.ion.nu/tc_client.git
commit 6ca99554d032618d6be1d755cc3baae065c33e85
Author: Alicia <...>
Date:   Thu May 5 13:16:59 2016 +0200

    tc_client-gtk: added menu item to hide a camera upon right-click.

diff --git a/ChangeLog b/ChangeLog
index b54a2d5..11c2b85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@ tc_client-gtk: if we failed to open the camera, just give a grey screen.
 tc_client-gtk: made the settings accessible from the start window (previously only accessible from the main window, after already joining a channel)
 tc_client-gtk: added an option to use the --cookies parameter of the core to keep/reuse HTTP cookies.
 tc_client-gtk: when automatically opening cameras is disabled don't open the ones that are active when joining either, and notify when someone cams up.
+tc_client-gtk: added menu item to hide a camera upon right-click.
 tc_client-gtk and camviewer: fixed compatibility with newer libavutil.
 tc_client-gtk and camviewer: added compatibility fallbacks for av_image_get_buffer_size() and av_packet_unref()
 libcamera(v4l2): if we failed to read the frame, give grey instead.
diff --git a/gtkgui.glade b/gtkgui.glade
index 83ae919..ca86a70 100644
--- a/gtkgui.glade
+++ b/gtkgui.glade
@@ -545,6 +545,14 @@
         <property name="use_underline">True</property>
       </object>
     </child>
+    <child>
+      <object class="GtkMenuItem" id="cam_menu_hide">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Hide camera</property>
+        <property name="use_underline">True</property>
+      </object>
+    </child>
   </object>
   <object class="GtkAdjustment" id="camcolors_max_brightness">
     <property name="upper">255</property>
diff --git a/utilities/gtk/camviewer.c b/utilities/gtk/camviewer.c
index 0ce8732..afab7fd 100644
--- a/utilities/gtk/camviewer.c
+++ b/utilities/gtk/camviewer.c
@@ -1063,6 +1063,8 @@ int main(int argc, char** argv)
   g_signal_connect(gtk_builder_get_object(gui, "camcolors_auto"), "toggled", G_CALLBACK(camcolors_toggle_auto), 0);
   g_signal_connect(gtk_builder_get_object(gui, "camcolors_flip_horizontal"), "toggled", G_CALLBACK(camcolors_toggle_flip), 0);
   g_signal_connect(gtk_builder_get_object(gui, "camcolors_flip_vertical"), "toggled", G_CALLBACK(camcolors_toggle_flip), (void*)1);
+  // Connect signal for hiding cameras
+  g_signal_connect(gtk_builder_get_object(gui, "cam_menu_hide"), "activate", G_CALLBACK(gui_hide_cam), 0);
   // Populate saved channels
   GtkWidget* startbox=GTK_WIDGET(gtk_builder_get_object(gui, "startbox"));
   int channelcount=config_get_int("channelcount");
diff --git a/utilities/gtk/gui.c b/utilities/gtk/gui.c
index debf7ce..06853e3 100644
--- a/utilities/gtk/gui.c
+++ b/utilities/gtk/gui.c
@@ -26,6 +26,7 @@
 #include "gui.h"
 
 extern void startsession(GtkButton* button, void* x);
+extern int tc_client_in[2];
 GtkBuilder* gui;
 
 char autoscroll_before(GtkAdjustment* scroll)
@@ -535,3 +536,12 @@ void camcolors_toggle_flip(GtkToggleButton* button, void* vertical)
     cam->postproc.flip_horizontal=v;
   }
 }
+
+void gui_hide_cam(GtkMenuItem* menuitem, void* x)
+{
+  if(!menu_context_cam){return;}
+  struct camera* cam=camera_find(menu_context_cam);
+  if(!cam){return;}
+  dprintf(tc_client_in[1], "/closecam %s\n", cam->nick);
+  camera_remove(menu_context_cam);
+}
diff --git a/utilities/gtk/gui.h b/utilities/gtk/gui.h
index 4c90984..e383117 100644
--- a/utilities/gtk/gui.h
+++ b/utilities/gtk/gui.h
@@ -44,5 +44,6 @@ extern void camcolors_adjust_min(GtkAdjustment* adjustment, void* x);
 extern void camcolors_adjust_max(GtkAdjustment* adjustment, void* x);
 extern void camcolors_toggle_auto(GtkToggleButton* button, void* x);
 extern void camcolors_toggle_flip(GtkToggleButton* button, void* vertical);
+extern void gui_hide_cam(GtkMenuItem* menuitem, void* x);
 
 extern GtkBuilder* gui;