[rhythmbox] fix backwards compatibility with recent gtk+ deprecations



commit 1a493daf579a558ac615644827331a61b8a1195b
Author: Jonathan Matthew <jonathan d14n org>
Date:   Tue Nov 2 18:14:48 2010 +1000

    fix backwards compatibility with recent gtk+ deprecations

 lib/gseal-gtk-compat.h |    3 ++-
 widgets/rb-rating.c    |    4 ++++
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/lib/gseal-gtk-compat.h b/lib/gseal-gtk-compat.h
index f4bba01..34b4347 100644
--- a/lib/gseal-gtk-compat.h
+++ b/lib/gseal-gtk-compat.h
@@ -26,8 +26,9 @@ G_BEGIN_DECLS
 
 #if !GTK_CHECK_VERSION (2, 23, 0)
 #define gtk_combo_box_text_new					gtk_combo_box_new_text
-#define gtk_combo_box_text_append_text(box,text)		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (box), text)
+#define gtk_combo_box_text_append_text(box,text)		gtk_combo_box_append_text(GTK_COMBO_BOX (box), text)
 #define gdk_window_get_display(window)				gdk_drawable_get_display(GDK_DRAWABLE (window))
+#define GTK_COMBO_BOX_TEXT(widget)				GTK_COMBO_BOX(widget)
 #endif
 
 #if !GTK_CHECK_VERSION (2, 21, 1)
diff --git a/widgets/rb-rating.c b/widgets/rb-rating.c
index f3c5c1e..fc165b9 100644
--- a/widgets/rb-rating.c
+++ b/widgets/rb-rating.c
@@ -372,8 +372,12 @@ rb_rating_expose (GtkWidget *widget,
 	rating = RB_RATING (widget);
 
 	window = gtk_widget_get_window (widget);
+#if GTK_CHECK_VERSION(2, 24, 0)
 	width = gdk_window_get_width (window);
 	height = gdk_window_get_height (window);
+#else
+	gdk_drawable_get_size (GDK_DRAWABLE (window), &width, &height);
+#endif
 
 	gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
 	if (gtk_widget_has_focus (widget)) {



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