[ekiga] Fix some compilation errors with GTK 2.24



commit 38d2f3a1dbd3741cd1bd47487fb40d3925dad465
Author: Eugen Dedu <Eugen Dedu pu-pm univ-fcomte fr>
Date:   Fri Apr 8 21:48:57 2011 +0200

    Fix some compilation errors with GTK 2.24

 lib/engine/gui/gtk-core/form-dialog-gtk.cpp |    4 +-
 src/gui/assistant.cpp                       |   56 ++++++++++++++------------
 src/gui/main_window.cpp                     |   12 ------
 3 files changed, 32 insertions(+), 40 deletions(-)
---
diff --git a/lib/engine/gui/gtk-core/form-dialog-gtk.cpp b/lib/engine/gui/gtk-core/form-dialog-gtk.cpp
index 3734188..3f925c9 100644
--- a/lib/engine/gui/gtk-core/form-dialog-gtk.cpp
+++ b/lib/engine/gui/gtk-core/form-dialog-gtk.cpp
@@ -1341,7 +1341,7 @@ FormDialog::submit ()
 {
   Ekiga::FormBuilder builder;
 
-  gtk_widget_hide_all (GTK_WIDGET (window));
+  gtk_widget_hide (GTK_WIDGET (window));
 
   for (std::list<Submitter *>::iterator iter = submitters.begin ();
        iter != submitters.end ();
@@ -1354,7 +1354,7 @@ FormDialog::submit ()
 void
 FormDialog::cancel ()
 {
-  gtk_widget_hide_all (GTK_WIDGET (window));
+  gtk_widget_hide (GTK_WIDGET (window));
   request->cancel ();
 }
 
diff --git a/src/gui/assistant.cpp b/src/gui/assistant.cpp
index b4a14c4..463bedd 100644
--- a/src/gui/assistant.cpp
+++ b/src/gui/assistant.cpp
@@ -1112,30 +1112,26 @@ prepare_audio_devices_page (EkigaAssistant *assistant)
 static void
 apply_audio_devices_page (EkigaAssistant *assistant)
 {
-  GtkComboBox *combo_box;
   gchar *device;
+  GtkTreeIter citer;
 
-  combo_box = GTK_COMBO_BOX (assistant->priv->audio_ringer);
-  device = gtk_combo_box_get_active_text (combo_box);
-  if (device) {
-    gm_conf_set_string (SOUND_EVENTS_KEY "output_device", device);
-    g_free (device);
-  }
-
-  combo_box = GTK_COMBO_BOX (assistant->priv->audio_player);
-  device = gtk_combo_box_get_active_text (combo_box);
-  if (device) {
-    gm_conf_set_string (AUDIO_DEVICES_KEY "output_device", device);
-    g_free (device);
-  }
-
-  combo_box = GTK_COMBO_BOX (assistant->priv->audio_recorder);
-  device = gtk_combo_box_get_active_text (combo_box);
-  if (device) {
-    gm_conf_set_string (AUDIO_DEVICES_KEY "input_device", device);
-    g_free (device);
-  }
-
+  if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->audio_ringer), &citer))
+    g_warn_if_reached ();
+  gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->audio_ringer)), &citer, 0, &device, -1);
+  gm_conf_set_string (SOUND_EVENTS_KEY "output_device", device);
+  g_free (device);
+
+  if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->audio_player), &citer))
+    g_warn_if_reached ();
+  gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->audio_player)), &citer, 0, &device, -1);
+  gm_conf_set_string (AUDIO_DEVICES_KEY "output_device", device);
+  g_free (device);
+
+  if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->audio_recorder), &citer))
+    g_warn_if_reached ();
+  gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->audio_recorder)), &citer, 0, &device, -1);
+  gm_conf_set_string (AUDIO_DEVICES_KEY "input_device", device);
+  g_free (device);
 }
 
 
@@ -1389,7 +1385,9 @@ prepare_summary_page (EkigaAssistant *assistant)
 
   /* The audio ringing device */
   gtk_list_store_append (model, &iter);
-  value = gtk_combo_box_get_active_text (GTK_COMBO_BOX (assistant->priv->audio_ringer));
+  if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->audio_ringer), &citer))
+    g_warn_if_reached ();
+  gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->audio_ringer)), &citer, 0, &value, -1);
   gtk_list_store_set (model, &iter,
                       SUMMARY_KEY_COLUMN, _("Audio Ringing Device"),
                       SUMMARY_VALUE_COLUMN, value,
@@ -1398,7 +1396,9 @@ prepare_summary_page (EkigaAssistant *assistant)
 
   /* The audio playing device */
   gtk_list_store_append (model, &iter);
-  value = gtk_combo_box_get_active_text (GTK_COMBO_BOX (assistant->priv->audio_player));
+  if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->audio_player), &citer))
+    g_warn_if_reached ();
+  gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->audio_player)), &citer, 0, &value, -1);
   gtk_list_store_set (model, &iter,
                       SUMMARY_KEY_COLUMN, _("Audio Output Device"),
                       SUMMARY_VALUE_COLUMN, value,
@@ -1407,7 +1407,9 @@ prepare_summary_page (EkigaAssistant *assistant)
 
   /* The audio recording device */
   gtk_list_store_append (model, &iter);
-  value = gtk_combo_box_get_active_text (GTK_COMBO_BOX (assistant->priv->audio_recorder));
+  if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->audio_recorder), &citer))
+    g_warn_if_reached ();
+  gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->audio_recorder)), &citer, 0, &value, -1);
   gtk_list_store_set (model, &iter,
                       SUMMARY_KEY_COLUMN, _("Audio Input Device"),
                       SUMMARY_VALUE_COLUMN, value,
@@ -1416,7 +1418,9 @@ prepare_summary_page (EkigaAssistant *assistant)
 
   /* The video manager */
   gtk_list_store_append (model, &iter);
-  value = gtk_combo_box_get_active_text (GTK_COMBO_BOX (assistant->priv->video_device));
+  if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->video_device), &citer))
+    g_warn_if_reached ();
+  gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->video_device)), &citer, 0, &value, -1);
   gtk_list_store_set (model, &iter,
                       SUMMARY_KEY_COLUMN, _("Video Input Device"),
                       SUMMARY_VALUE_COLUMN, value,
diff --git a/src/gui/main_window.cpp b/src/gui/main_window.cpp
index db0ad93..f3e1e0a 100644
--- a/src/gui/main_window.cpp
+++ b/src/gui/main_window.cpp
@@ -1980,8 +1980,6 @@ gm_mw_video_settings_window_new (EkigaMainWindow *mw)
   mw->priv->adj_brightness = gtk_adjustment_new (brightness, 0.0,
                                                  255.0, 1.0, 5.0, 1.0);
   hscale_brightness = gtk_hscale_new (GTK_ADJUSTMENT (mw->priv->adj_brightness));
-  gtk_range_set_update_policy (GTK_RANGE (hscale_brightness),
-			       GTK_UPDATE_DELAYED);
   gtk_scale_set_draw_value (GTK_SCALE (hscale_brightness), FALSE);
   gtk_scale_set_value_pos (GTK_SCALE (hscale_brightness), GTK_POS_RIGHT);
   gtk_box_pack_start (GTK_BOX (hbox), hscale_brightness, TRUE, TRUE, 2);
@@ -2001,8 +1999,6 @@ gm_mw_video_settings_window_new (EkigaMainWindow *mw)
   mw->priv->adj_whiteness = gtk_adjustment_new (whiteness, 0.0, 
 						255.0, 1.0, 5.0, 1.0);
   hscale_whiteness = gtk_hscale_new (GTK_ADJUSTMENT (mw->priv->adj_whiteness));
-  gtk_range_set_update_policy (GTK_RANGE (hscale_whiteness),
-			       GTK_UPDATE_DELAYED);
   gtk_scale_set_draw_value (GTK_SCALE (hscale_whiteness), FALSE);
   gtk_scale_set_value_pos (GTK_SCALE (hscale_whiteness), GTK_POS_RIGHT);
   gtk_box_pack_start (GTK_BOX (hbox), hscale_whiteness, TRUE, TRUE, 2);
@@ -2022,8 +2018,6 @@ gm_mw_video_settings_window_new (EkigaMainWindow *mw)
   mw->priv->adj_colour = gtk_adjustment_new (colour, 0.0, 
 					     255.0, 1.0, 5.0, 1.0);
   hscale_colour = gtk_hscale_new (GTK_ADJUSTMENT (mw->priv->adj_colour));
-  gtk_range_set_update_policy (GTK_RANGE (hscale_colour),
-			       GTK_UPDATE_DELAYED);
   gtk_scale_set_draw_value (GTK_SCALE (hscale_colour), FALSE);
   gtk_scale_set_value_pos (GTK_SCALE (hscale_colour), GTK_POS_RIGHT);
   gtk_box_pack_start (GTK_BOX (hbox), hscale_colour, TRUE, TRUE, 2);
@@ -2043,8 +2037,6 @@ gm_mw_video_settings_window_new (EkigaMainWindow *mw)
   mw->priv->adj_contrast = gtk_adjustment_new (contrast, 0.0, 
 					       255.0, 1.0, 5.0, 1.0);
   hscale_contrast = gtk_hscale_new (GTK_ADJUSTMENT (mw->priv->adj_contrast));
-  gtk_range_set_update_policy (GTK_RANGE (hscale_contrast),
-			       GTK_UPDATE_DELAYED);
   gtk_scale_set_draw_value (GTK_SCALE (hscale_contrast), FALSE);
   gtk_scale_set_value_pos (GTK_SCALE (hscale_contrast), GTK_POS_RIGHT);
   gtk_box_pack_start (GTK_BOX (hbox), hscale_contrast, TRUE, TRUE, 2);
@@ -2117,8 +2109,6 @@ gm_mw_audio_settings_window_new (EkigaMainWindow *mw)
   small_vbox = gtk_vbox_new (FALSE, 0);
   mw->priv->adj_output_volume = gtk_adjustment_new (0, 0.0, 101.0, 1.0, 5.0, 1.0);
   hscale_play = gtk_hscale_new (GTK_ADJUSTMENT (mw->priv->adj_output_volume));
-  gtk_range_set_update_policy (GTK_RANGE (hscale_play),
-			       GTK_UPDATE_DELAYED);
   gtk_scale_set_value_pos (GTK_SCALE (hscale_play), GTK_POS_RIGHT); 
   gtk_scale_set_draw_value (GTK_SCALE (hscale_play), FALSE);
   gtk_box_pack_start (GTK_BOX (small_vbox), hscale_play, TRUE, TRUE, 0);
@@ -2153,8 +2143,6 @@ gm_mw_audio_settings_window_new (EkigaMainWindow *mw)
   small_vbox = gtk_vbox_new (FALSE, 0);
   mw->priv->adj_input_volume = gtk_adjustment_new (0, 0.0, 101.0, 1.0, 5.0, 1.0);
   hscale_rec = gtk_hscale_new (GTK_ADJUSTMENT (mw->priv->adj_input_volume));
-  gtk_range_set_update_policy (GTK_RANGE (hscale_rec),
-			       GTK_UPDATE_DELAYED);
   gtk_scale_set_value_pos (GTK_SCALE (hscale_rec), GTK_POS_RIGHT); 
   gtk_scale_set_draw_value (GTK_SCALE (hscale_rec), FALSE);
   gtk_box_pack_start (GTK_BOX (small_vbox), hscale_rec, TRUE, TRUE, 0);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]