[libgda] Applied patch for bug #609684



commit 718db2a40c354bdff63e5bac337e317aaf40faef
Author: Vivien Malerba <malerba gnome-db org>
Date:   Sat Mar 13 20:36:33 2010 +0100

    Applied patch for bug #609684
    
    
    use accessor functions instead direct access
    for GTK_REALIZED and GTK_WIDGET_MAPPED

 control-center/cc-gray-bar.c    |    6 +++++-
 tools/browser/browser-spinner.c |   12 ++++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/control-center/cc-gray-bar.c b/control-center/cc-gray-bar.c
index 1071a3a..3e00811 100644
--- a/control-center/cc-gray-bar.c
+++ b/control-center/cc-gray-bar.c
@@ -84,7 +84,11 @@ cc_gray_bar_realize (GtkWidget *widget)
 {
 	gint border_width;
 
-	GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); /* GTK3 FIXME */
+#if GTK_CHECK_VERSION (2,19,5)
+	gtk_widget_set_realized (widget, TRUE);
+#else
+	GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+#endif
 	border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
 	GdkWindowAttr attributes;
 	gint attributes_mask;
diff --git a/tools/browser/browser-spinner.c b/tools/browser/browser-spinner.c
index 22dcc40..4a34da5 100644
--- a/tools/browser/browser-spinner.c
+++ b/tools/browser/browser-spinner.c
@@ -705,7 +705,11 @@ browser_spinner_start (BrowserSpinner *spinner)
 
 	priv->spinning = TRUE;
 
-	if (GTK_WIDGET_MAPPED (GTK_WIDGET (spinner)) && /* GTK3 FIXME */
+#if GTK_CHECK_VERSION (2,19,5)
+	if (gtk_widget_get_mapped (GTK_WIDGET (spinner)) &&
+#else
+	if (GTK_WIDGET_MAPPED (GTK_WIDGET (spinner)) &&
+#endif
 	    priv->timer_task == 0 &&
 	    browser_spinner_load_images (spinner)) {
 		/* the 0th frame is the 'rest' icon */
@@ -748,7 +752,11 @@ browser_spinner_stop (BrowserSpinner *spinner)
 	if (priv->timer_task != 0) {
 		browser_spinner_remove_update_callback (spinner);
 
-		if (GTK_WIDGET_MAPPED (GTK_WIDGET (spinner))) /* GTK3 FIXME */
+#if GTK_CHECK_VERSION (2,19,4)
+		if (gtk_widget_get_mapped (GTK_WIDGET (spinner)))
+#else
+		if (GTK_WIDGET_MAPPED (GTK_WIDGET (spinner)))
+#endif
 			gtk_widget_queue_draw (GTK_WIDGET (spinner));
 	}
 }



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