[ekiga] Fix compilation error with gtk 2.18 introduced recently



commit e805a0937e3c074b2930acd0833f34a326c1b639
Author: Thierry Simonnet <t simonnet esiee fr>
Date:   Thu Jun 3 14:07:14 2010 +0200

    Fix compilation error with gtk 2.18 introduced recently

 lib/gui/gmlevelmeter.c |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/lib/gui/gmlevelmeter.c b/lib/gui/gmlevelmeter.c
index 709348a..0a25450 100644
--- a/lib/gui/gmlevelmeter.c
+++ b/lib/gui/gmlevelmeter.c
@@ -152,8 +152,12 @@ gm_level_meter_set_level (GmLevelMeter *lm,
 
   if (level > lm->peak)
     lm->peak = level;
-
+#if GTK_CHECK_VERSION(2,20,0)
   if (gtk_widget_get_realized (GTK_WIDGET (lm)))
+#else
+  if (GTK_WIDGET_REALIZED (lm))
+#endif
+
     gm_level_meter_paint (lm);
 }
 
@@ -164,7 +168,11 @@ gm_level_meter_clear (GmLevelMeter *lm)
   lm->level = 0;
   lm->peak = 0;
 
+#if GTK_CHECK_VERSION(2,20,0)
   if (gtk_widget_get_realized (GTK_WIDGET (lm)))
+#else
+  if (GTK_WIDGET_REALIZED (lm))
+#endif
     gm_level_meter_paint (lm);
 }
 
@@ -178,7 +186,11 @@ gm_level_meter_set_colors (GmLevelMeter* lm,
   if (lm->colorEntries) {
 
     /* free old colors, if they have been allocated; delete old array */
+#if GTK_CHECK_VERSION(2,20,0)
     if (gtk_widget_get_realized (GTK_WIDGET (lm)))
+#else
+    if (GTK_WIDGET_REALIZED (lm))
+#endif
       gm_level_meter_free_colors (lm->colorEntries);
     g_array_free (lm->colorEntries, TRUE);
   }
@@ -193,7 +205,11 @@ gm_level_meter_set_colors (GmLevelMeter* lm,
     g_array_append_val (lm->colorEntries, *entry);
   }
 
+#if GTK_CHECK_VERSION(2,20,0)
   if (gtk_widget_get_realized (GTK_WIDGET (lm))) {
+#else
+  if (GTK_WIDGET_REALIZED (lm)) {
+#endif
 
     gm_level_meter_allocate_colors (lm->colorEntries);
 
@@ -381,7 +397,11 @@ gm_level_meter_create_pixmap (GmLevelMeter *lm)
 
   g_return_if_fail (GM_IS_LEVEL_METER (lm));
 
+#if GTK_CHECK_VERSION(2,20,0)
   if (gtk_widget_get_realized (GTK_WIDGET (lm))) {
+#else
+  if (GTK_WIDGET_REALIZED (lm)) {
+#endif
 
     GtkAllocation allocation;
 
@@ -579,7 +599,11 @@ gm_level_meter_size_allocate (GtkWidget *widget,
   g_return_if_fail (allocation != NULL);
 
   gtk_widget_set_allocation (widget, allocation);
+#if GTK_CHECK_VERSION(2,20,0)
   if (gtk_widget_get_realized (widget)) {
+#else
+  if (GTK_WIDGET_REALIZED (widget)) {
+#endif
 
     gdk_window_move_resize (gtk_widget_get_window (widget),
                             allocation->x, allocation->y,



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