diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 9 | ||||
-rw-r--r-- | gtk/gtkcolorsel.c | 37 | ||||
-rw-r--r-- | gtk/gtkiconfactory.c | 3 | ||||
-rw-r--r-- | gtk/gtkwidget.c | 5 |
8 files changed, 87 insertions, 3 deletions
@@ -1,5 +1,14 @@ 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 diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 63b8814447..d0b1e824ef 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,14 @@ 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 diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 63b8814447..d0b1e824ef 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,5 +1,14 @@ 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 diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 63b8814447..d0b1e824ef 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,14 @@ 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 diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 63b8814447..d0b1e824ef 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,14 @@ 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 diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c index b0d8856d5a..af2bb8d0b1 100644 --- a/gtk/gtkcolorsel.c +++ b/gtk/gtkcolorsel.c @@ -58,6 +58,7 @@ #include "gtkintl.h" #include "gtkimage.h" #include "gtkstock.h" +#include "gtkaccessible.h" #include <string.h> @@ -170,6 +171,10 @@ static void default_noscreen_change_palette_func (const GdkColor *colo 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 }; @@ -1813,6 +1818,7 @@ gtk_color_selection_init (GtkColorSelection *colorsel) GtkWidget *picker_image; gint i, j; ColorSelectionPrivate *priv; + AtkObject *atk_obj; gtk_widget_push_composite_child (); @@ -1975,6 +1981,14 @@ gtk_color_selection_init (GtkColorSelection *colorsel) 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 (); } @@ -2755,3 +2769,26 @@ gtk_color_selection_set_change_palette_with_screen_hook (GtkColorSelectionChange 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); +} diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c index a496cecf3f..37fa891892 100644 --- a/gtk/gtkiconfactory.c +++ b/gtk/gtkiconfactory.c @@ -1738,7 +1738,8 @@ render_fallback_image (GtkStyle *style, * @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. diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 952a21fef9..14d27f7f9a 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -5015,7 +5015,8 @@ gtk_widget_create_pango_layout (GtkWidget *widget, * 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 @@ -5043,7 +5044,7 @@ gtk_widget_render_icon (GtkWidget *widget, 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); |