Description: Do not use deprecated API
Author: Aleksey Lim <alsroot@member.fsf.org>
Origin: http://git.sugarlabs.org/projects/sugar-artwork/repos/mainline/commits/5d88c8943e14a0ca31af1dea86e743f869383567
Bug: http://bugs.sugarlabs.org/ticket/1899
Last-Update: 2010-06-25
--- a/gtk/engine/sugar-info.c
+++ b/gtk/engine/sugar-info.c
@@ -71,7 +71,7 @@
     gdouble line_width = info->rc_style->line_width;
 
     if (info->widget) {
-        range_info->focused = GTK_WIDGET_HAS_FOCUS (info->widget);
+        range_info->focused = gtk_widget_has_focus (info->widget);
     } else {
         /* Fall back to unfocused and orientation from the width/height. */
         range_info->focused = FALSE;
--- a/gtk/engine/sugar-style.c
+++ b/gtk/engine/sugar-style.c
@@ -411,7 +411,7 @@
         sugar_draw_button (cr, &info);
 
         /* Spinbutton focus hack. */
-        if (widget && GTK_WIDGET_HAS_FOCUS (widget)) {
+        if (widget && gtk_widget_has_focus (widget)) {
             /* Draw a focus for the spinbutton */
             sugar_style_draw_focus (style, window, GTK_STATE_NORMAL, area, widget, detail, x, y, width, height);
         }
@@ -440,7 +440,7 @@
 
             sugar_fill_generic_info (&info, style, state_type, shadow_type, widget, detail, x, y, width, height);
             
-            if (widget && !GTK_WIDGET_IS_SENSITIVE (widget))
+            if (widget && !gtk_widget_is_sensitive (widget))
                 info.state = GTK_STATE_INSENSITIVE;
 
             /* Needed because the trough and bar are cached in a buffer inside GtkProgress. */
@@ -453,7 +453,7 @@
 
             sugar_fill_generic_info (&info, style, state_type, shadow_type, widget, detail, x, y, width, height);
             
-            if (widget && !GTK_WIDGET_IS_SENSITIVE (widget))
+            if (widget && !gtk_widget_is_sensitive (widget))
                 info.state = GTK_STATE_INSENSITIVE;
             
             if (widget && GTK_IS_PROGRESS_BAR (widget)) {
@@ -580,7 +580,7 @@
 {
     /* Hack to change the entries background when it has the focus. */
     if (DETAIL ("entry_bg")) {
-        if (widget && GTK_WIDGET_HAS_FOCUS (widget)) {
+        if (widget && gtk_widget_has_focus (widget)) {
             state_type = GTK_STATE_ACTIVE;
         }
     } else if (DETAIL ("radiobutton") || DETAIL ("checkbutton")) {
@@ -633,10 +633,10 @@
         /* XXX: This fakes an ACTIVE state for the focused entry.
          *      Getting this changed in GTK+ with a style property would be cleaner
          *      as that also works for the font colors. (see also draw_flat_box) */
-        if (widget && GTK_WIDGET_HAS_FOCUS (widget)) {
+        if (widget && gtk_widget_has_focus (widget)) {
             info.state = GTK_STATE_ACTIVE;
         }
-        if (widget && !GTK_WIDGET_IS_SENSITIVE (widget)) {
+        if (widget && !gtk_widget_is_sensitive (widget)) {
             info.state = GTK_STATE_INSENSITIVE;
         }
 
