$ git clone http://tcclient.ion.nu/tc_client.git
commit c1acb870f390bf95c4eba936780e4385fefc344c
Author: Alicia <...>
Date:   Thu Jul 2 13:16:13 2015 +0200

    tc_client-gtk: fixed gtk+2 compatibility (differences in gtk_combo_box API)

diff --git a/ChangeLog b/ChangeLog
index b560875..d29d8cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ Print version info when called with -v/--version (contributed by Jade)
 Flush stdout after printing unknown RTMP types, and return upon <1 reads in b_read.
 tc_client-gtk: fixed windows compatibility (w32_runcmd and strndup)
 tc_client-gtk: added a camera selection (and preview) window when starting to broadcast.
+tc_client-gtk: fixed gtk+2 compatibility (differences in gtk_combo_box API)
 tc_client-gtk and camviewer: added some compatibility macros for older libav versions.
 tc_client-gtk and camviewer: added an abstraction library (libcamera) for cam access.
 modbot: added an option (--disable-lists) to disable playlist requests, instead only the first video linked to will be added to the queue.
diff --git a/utilities/gtk/compat.c b/utilities/gtk/compat.c
index 8d37d3d..abdd374 100644
--- a/utilities/gtk/compat.c
+++ b/utilities/gtk/compat.c
@@ -52,6 +52,16 @@ SECURITY_ATTRIBUTES sa={
     gtk_widget_get_allocation(widget, &alloc);
     return alloc.height;
   }
+  GValue gtk_combo_box_active_id=G_VALUE_INIT;
+  const char* gtk_combo_box_get_active_id(GtkComboBox* combo)
+  {
+    g_value_unset(&gtk_combo_box_active_id);
+    GtkTreeModel* model=gtk_combo_box_get_model(combo);
+    GtkTreeIter iter;
+    gtk_combo_box_get_active_iter(combo, &iter);
+    gtk_tree_model_get_value(model, &iter, 0, &gtk_combo_box_active_id);
+    return g_value_get_string(&gtk_combo_box_active_id);
+  }
   char* newline(char* line)
   {
     unsigned int i;
diff --git a/utilities/gtk/compat.h b/utilities/gtk/compat.h
index 3bce725..18a0c18 100644
--- a/utilities/gtk/compat.h
+++ b/utilities/gtk/compat.h
@@ -30,6 +30,7 @@ extern SECURITY_ATTRIBUTES sa;
   extern GtkWidget* gtk_box_new(int vertical, int spacing);
   extern int gtk_widget_get_allocated_width(GtkWidget* widget);
   extern int gtk_widget_get_allocated_height(GtkWidget* widget);
+  extern const char* gtk_combo_box_get_active_id(GtkComboBox* combo);
 #endif
 #if GTK_MAJOR_VERSION<3 || (GTK_MAJOR_VERSION==3 && GTK_MINOR_VERSION<10)
   #define gtk_button_new_from_icon_name(name, size) gtk_button_new_from_stock(name)
diff --git a/utilities/gtk/media.c b/utilities/gtk/media.c
index 6a4ddb8..60fe39c 100644
--- a/utilities/gtk/media.c
+++ b/utilities/gtk/media.c
@@ -29,6 +29,7 @@
   #include "../libcamera/camera.h"
 #endif
 #include "../compat.h"
+#include "compat.h"
 #include "gui.h"
 #include "media.h"
 struct camera campreview;