diff options
author | Jonathan Michalon <[email protected]> | 2019-12-06 17:49:29 +0100 |
---|---|---|
committer | monsta <[email protected]> | 2020-01-16 16:16:36 +0300 |
commit | f56fabf655d5b2ae9286bd89e103ba284ff616f3 (patch) | |
tree | 6fc0c678fe65bd6d427bf3bacd65bd034095698c /applets/clock/clock.c | |
parent | 611f0b6abf6cf830318e934edb9deff4e2639cac (diff) | |
download | mate-panel-f56fabf655d5b2ae9286bd89e103ba284ff616f3.tar.bz2 mate-panel-f56fabf655d5b2ae9286bd89e103ba284ff616f3.tar.xz |
clock applet: add a call to ATK to provide the current displayed time
Diffstat (limited to 'applets/clock/clock.c')
-rw-r--r-- | applets/clock/clock.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/applets/clock/clock.c b/applets/clock/clock.c index 21f0d3e6..82783fdd 100644 --- a/applets/clock/clock.c +++ b/applets/clock/clock.c @@ -601,21 +601,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); |