2004-04-14 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkcolorsel.c: Add a11y relations between the color
+ wheel and the spin buttons. (#132745)
+
+ * gtk/gtkiconfactory.c (gtk_icon_set_render_icon): Document
+ the meaning of size == -1.
+
+ * gtk/gtkwidget.c (gtk_widget_render_icon): Explicitly accept
+ a size of -1. (#137436, Brian Cameron)
+
* gtk/gtkcombobox.c: Make the arrow and separator regular
children of an hbox inside the button, and propagate state
changes from the button to the cell view. (part of the fix
2004-04-14 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkcolorsel.c: Add a11y relations between the color
+ wheel and the spin buttons. (#132745)
+
+ * gtk/gtkiconfactory.c (gtk_icon_set_render_icon): Document
+ the meaning of size == -1.
+
+ * gtk/gtkwidget.c (gtk_widget_render_icon): Explicitly accept
+ a size of -1. (#137436, Brian Cameron)
+
* gtk/gtkcombobox.c: Make the arrow and separator regular
children of an hbox inside the button, and propagate state
changes from the button to the cell view. (part of the fix
2004-04-14 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkcolorsel.c: Add a11y relations between the color
+ wheel and the spin buttons. (#132745)
+
+ * gtk/gtkiconfactory.c (gtk_icon_set_render_icon): Document
+ the meaning of size == -1.
+
+ * gtk/gtkwidget.c (gtk_widget_render_icon): Explicitly accept
+ a size of -1. (#137436, Brian Cameron)
+
* gtk/gtkcombobox.c: Make the arrow and separator regular
children of an hbox inside the button, and propagate state
changes from the button to the cell view. (part of the fix
2004-04-14 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkcolorsel.c: Add a11y relations between the color
+ wheel and the spin buttons. (#132745)
+
+ * gtk/gtkiconfactory.c (gtk_icon_set_render_icon): Document
+ the meaning of size == -1.
+
+ * gtk/gtkwidget.c (gtk_widget_render_icon): Explicitly accept
+ a size of -1. (#137436, Brian Cameron)
+
* gtk/gtkcombobox.c: Make the arrow and separator regular
children of an hbox inside the button, and propagate state
changes from the button to the cell view. (part of the fix
2004-04-14 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkcolorsel.c: Add a11y relations between the color
+ wheel and the spin buttons. (#132745)
+
+ * gtk/gtkiconfactory.c (gtk_icon_set_render_icon): Document
+ the meaning of size == -1.
+
+ * gtk/gtkwidget.c (gtk_widget_render_icon): Explicitly accept
+ a size of -1. (#137436, Brian Cameron)
+
* gtk/gtkcombobox.c: Make the arrow and separator regular
children of an hbox inside the button, and propagate state
changes from the button to the cell view. (part of the fix
#include "gtkintl.h"
#include "gtkimage.h"
#include "gtkstock.h"
+#include "gtkaccessible.h"
#include <string.h>
static void default_change_palette_func (GdkScreen *screen,
const GdkColor *colors,
gint n_colors);
+static void make_control_relations (AtkObject *atk_obj,
+ GtkWidget *widget);
+static void make_all_relations (AtkObject *atk_obj,
+ ColorSelectionPrivate *priv);
static gpointer parent_class = NULL;
static guint color_selection_signals[LAST_SIGNAL] = { 0 };
GtkWidget *picker_image;
gint i, j;
ColorSelectionPrivate *priv;
+ AtkObject *atk_obj;
gtk_widget_push_composite_child ();
gtk_widget_hide (priv->palette_frame);
}
+ atk_obj = gtk_widget_get_accessible (priv->triangle_colorsel);
+ if (GTK_IS_ACCESSIBLE (atk_obj))
+ {
+ atk_object_set_name (atk_obj, _("Color Wheel"));
+ atk_object_set_role (gtk_widget_get_accessible (GTK_WIDGET (colorsel)), ATK_ROLE_COLOR_CHOOSER);
+ make_all_relations (atk_obj, priv);
+ }
+
gtk_widget_pop_composite_child ();
}
return old;
}
+
+static void
+make_control_relations (AtkObject *atk_obj,
+ GtkWidget *widget)
+{
+ AtkObject *obj;
+
+ obj = gtk_widget_get_accessible (widget);
+ atk_object_add_relationship (atk_obj, ATK_RELATION_CONTROLLED_BY, obj);
+ atk_object_add_relationship (obj, ATK_RELATION_CONTROLLER_FOR, atk_obj);
+}
+
+static void
+make_all_relations (AtkObject *atk_obj,
+ ColorSelectionPrivate *priv)
+{
+ make_control_relations (atk_obj, priv->hue_spinbutton);
+ make_control_relations (atk_obj, priv->sat_spinbutton);
+ make_control_relations (atk_obj, priv->val_spinbutton);
+ make_control_relations (atk_obj, priv->red_spinbutton);
+ make_control_relations (atk_obj, priv->green_spinbutton);
+ make_control_relations (atk_obj, priv->blue_spinbutton);
+}
* @style: a #GtkStyle associated with @widget, or %NULL
* @direction: text direction
* @state: widget state
- * @size: icon size
+ * @size: icon size. A size of (GtkIconSize)-1
+ * means render at the size of the source and don't scale.
* @widget: widget that will display the icon, or %NULL.
* The only use that is typically made of this
* is to determine the appropriate #GdkScreen.
* gtk_widget_render_icon:
* @widget: a #GtkWidget
* @stock_id: a stock ID
- * @size: a stock size
+ * @size: a stock size. A size of (GtkIconSize)-1 means render at
+ the size of the source and don't scale.
* @detail: render detail to pass to theme engine
*
* A convenience function that uses the theme engine and RC file
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
g_return_val_if_fail (stock_id != NULL, NULL);
- g_return_val_if_fail (size > GTK_ICON_SIZE_INVALID, NULL);
+ g_return_val_if_fail (size > GTK_ICON_SIZE_INVALID || size == -1, NULL);
gtk_widget_ensure_style (widget);