[gtk/matthiasc/a11y-logging] a11y: Update GtkProgressBar
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/a11y-logging] a11y: Update GtkProgressBar
- Date: Fri, 17 Jul 2020 17:12:39 +0000 (UTC)
commit edcf9d69ad5c5ea1640e71bbc9468d60ccdc480b
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 17 13:10:18 2020 -0400
a11y: Update GtkProgressBar
Update state and properties as appropriate.
gtk/gtkprogressbar.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index 21c3b790f3..a8064eb461 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -643,6 +643,9 @@ gtk_progress_bar_act_mode_enter (GtkProgressBar *pbar)
gboolean inverted;
gtk_widget_add_css_class (pbar->progress_widget, GTK_STYLE_CLASS_PULSE);
+ gtk_accessible_update_state (GTK_ACCESSIBLE (pbar),
+ GTK_ACCESSIBLE_STATE_BUSY, TRUE,
+ -1);
inverted = pbar->inverted;
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
@@ -680,6 +683,9 @@ gtk_progress_bar_act_mode_leave (GtkProgressBar *pbar)
gtk_widget_remove_tick_callback (GTK_WIDGET (pbar), pbar->tick_id);
pbar->tick_id = 0;
+ gtk_accessible_update_state (GTK_ACCESSIBLE (pbar),
+ GTK_ACCESSIBLE_STATE_BUSY, FALSE,
+ -1);
gtk_widget_remove_css_class (pbar->progress_widget, GTK_STYLE_CLASS_PULSE);
update_node_classes (pbar);
}
@@ -730,6 +736,13 @@ gtk_progress_bar_set_fraction (GtkProgressBar *pbar,
gtk_widget_queue_allocate (pbar->trough_widget);
update_fraction_classes (pbar);
+ gtk_accessible_update_property (GTK_ACCESSIBLE (pbar),
+ GTK_ACCESSIBLE_PROPERTY_VALUE_MAX, 1.0,
+ GTK_ACCESSIBLE_PROPERTY_VALUE_MIN, 0.0,
+ GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, fraction,
+ -1);
+
+
g_object_notify_by_pspec (G_OBJECT (pbar), progress_props[PROP_FRACTION]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]