From 2d88f6f2a819cc251d4e7ec4a3750ce368fa7bf2 Mon Sep 17 00:00:00 2001 From: Jonathan Michalon Date: Fri, 6 Dec 2019 17:49:29 +0100 Subject: clock applet: add a call to ATK to provide the current displayed time --- applets/clock/clock.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/applets/clock/clock.c b/applets/clock/clock.c index 4ff19b55..b5504e94 100644 --- a/applets/clock/clock.c +++ b/applets/clock/clock.c @@ -598,21 +598,26 @@ static void update_clock (ClockData * cd) { gboolean use_markup; - char *utf8; + char *utf8, *text; time (&cd->current_time); utf8 = format_time (cd); use_markup = FALSE; - if (pango_parse_markup (utf8, -1, 0, NULL, NULL, NULL, NULL)) + if (pango_parse_markup (utf8, -1, 0, NULL, &text, NULL, NULL)) use_markup = TRUE; + else + text = g_strdup (utf8); if (use_markup) gtk_label_set_markup (GTK_LABEL (cd->clockw), utf8); else gtk_label_set_text (GTK_LABEL (cd->clockw), utf8); + set_atk_name_description (cd->applet, text, NULL); + g_free (utf8); + g_free (text); update_orient (cd); gtk_widget_queue_resize (cd->panel_button); -- cgit v1.2.1