summaryrefslogtreecommitdiff
path: root/applets/clock/clock.c
diff options
context:
space:
mode:
authorJonathan Michalon <[email protected]>2019-12-06 17:49:29 +0100
committermonsta <[email protected]>2020-01-16 16:16:36 +0300
commitf56fabf655d5b2ae9286bd89e103ba284ff616f3 (patch)
tree6fc0c678fe65bd6d427bf3bacd65bd034095698c /applets/clock/clock.c
parent611f0b6abf6cf830318e934edb9deff4e2639cac (diff)
downloadmate-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.c9
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);