[gtk+/gtk-3-14] color scale: simplify code a bit



commit a44baab9de089984c6df4301f17caa2b7fb30605
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Feb 18 17:26:20 2015 -0500

    color scale: simplify code a bit
    
    It is not necessary to call gtk_widget_get_accessible repeatedly.

 gtk/gtkcolorscale.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcolorscale.c b/gtk/gtkcolorscale.c
index 9f882ba..81dd685 100644
--- a/gtk/gtkcolorscale.c
+++ b/gtk/gtkcolorscale.c
@@ -309,7 +309,7 @@ scale_set_type (GtkColorScale     *scale,
         atk_object_set_name (atk_obj, C_("Color channel", "Hue"));
       else if (type == GTK_COLOR_SCALE_ALPHA)
         atk_object_set_name (atk_obj, C_("Color channel", "Alpha"));
-      atk_object_set_role (gtk_widget_get_accessible (GTK_WIDGET (scale)), ATK_ROLE_COLOR_CHOOSER);
+      atk_object_set_role (atk_obj, ATK_ROLE_COLOR_CHOOSER);
     }
 }
 


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