[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Linphone-developers] [PATCH] linphone & gtk < 2.6.0
From: |
Francois-Xavier KOWALSKI |
Subject: |
[Linphone-developers] [PATCH] linphone & gtk < 2.6.0 |
Date: |
Wed, 12 Apr 2006 10:17:28 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929) |
Hello,
any objections to this patch that restores ability to build linphone on
GTK+ < 2.6.0 systems (e.g. FC3 & RHEL4):
Index: gnome/propertybox.c
===================================================================
RCS file: /sources/linphone/linphone/gnome/propertybox.c,v
retrieving revision 1.54
diff -u -r1.54 propertybox.c
--- gnome/propertybox.c 6 Apr 2006 19:46:04 -0000 1.54
+++ gnome/propertybox.c 12 Apr 2006 08:16:07 -0000
@@ -42,6 +42,18 @@
#define property_box_changed()
gnome_property_box_changed(GNOME_PROPERTY_BOX ( (&uiobj->propbox)->prop))
#define get_main_window() (&uiobj->main_window)
+#if !GTK_CHECK_VERSION(2,6,0)
+static gchar * _lp_combo_box_get_active_text (GtkComboBox *combobox)
+{
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+ gchar *text = NULL;
+ model = gtk_combo_box_get_model (combobox);
+ if (gtk_combo_box_get_active_iter (combobox, &iter) && model)
+ gtk_tree_model_get (model, &iter, 0, &text, -1);
+ return text;
+}
+#endif /* GTK+ < 2.6.0 */
void net_section_init(NetSection *sec, GtkWidget *prop)
{
@@ -565,7 +577,11 @@
on_play_card_changed (GtkComboBox *combobox,
gpointer user_data)
{
+#if GTK_CHECK_VERSION(2,6,0)
char *dev=gtk_combo_box_get_active_text(combobox);
+#else /* GTK < 2.6.0 */
+ char *dev=_lp_combo_box_get_active_text(combobox);
+#endif /* GTK < 2.6.0 */
linphone_core_set_playback_device(get_core(),dev);
property_box_changed();
g_free(dev);
@@ -576,7 +592,11 @@
on_capt_card_changed (GtkComboBox *combobox,
gpointer user_data)
{
+#if GTK_CHECK_VERSION(2,6,0)
char * dev=gtk_combo_box_get_active_text(combobox);
+#else /* GTK < 2.6.0 */
+ char * dev=_lp_combo_box_get_active_text(combobox);
+#endif /* GTK < 2.6.0 */
linphone_core_set_capture_device(get_core(),dev);
property_box_changed();
g_free(dev);
@@ -586,7 +606,11 @@
on_ring_card_changed (GtkComboBox *combobox,
gpointer user_data)
{
+#if GTK_CHECK_VERSION(2,6,0)
char * dev=gtk_combo_box_get_active_text(combobox);
+#else /* GTK < 2.6.0 */
+ char * dev=_lp_combo_box_get_active_text(combobox);
+#endif /* GTK < 2.6.0 */
linphone_core_set_ringer_device(get_core(),dev);
property_box_changed();
g_free(dev);
--
Francois-Xavier "FiX" KOWALSKI /_ __ Tel:+33 (0)4 76 14 63 27
OpenCall Business Unit -- OCBU / //_/ Fax:+33 (0)4 76 14 51 62
Media-Processing Engineering / http://www.hp.com/go/opencall
i n v e n t
- [Linphone-developers] [PATCH] linphone & gtk < 2.6.0,
Francois-Xavier KOWALSKI <=