summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorJonathan Michalon <[email protected]>2019-12-06 17:49:29 +0100
committerlukefromdc <[email protected]>2019-12-13 04:03:07 +0000
commit2d88f6f2a819cc251d4e7ec4a3750ce368fa7bf2 (patch)
tree5038ee574512ff43cdf685c05b5a6366ebdbea9d /applets
parent5715290e278e74e7bad2dfa3f64e5f0b1a6a5446 (diff)
downloadmate-panel-2d88f6f2a819cc251d4e7ec4a3750ce368fa7bf2.tar.bz2
mate-panel-2d88f6f2a819cc251d4e7ec4a3750ce368fa7bf2.tar.xz
clock applet: add a call to ATK to provide the current displayed time
Diffstat (limited to 'applets')
-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 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);