Merge lp:~charlesk/indicator-datetime/lp-1223635 into lp:~indicator-applet-developers/indicator-datetime/trunk.13.10

Proposed by Charles Kerr on 2013-09-11
Status: Merged
Approved by: Ted Gould on 2013-09-11
Approved revision: 257
Merged at revision: 256
Proposed branch: lp:~charlesk/indicator-datetime/lp-1223635
Merge into: lp:~indicator-applet-developers/indicator-datetime/trunk.13.10
Diff against target: 47 lines (+7/-3)
1 file modified
src/service.c (+7/-3)
To merge this branch: bzr merge lp:~charlesk/indicator-datetime/lp-1223635
Reviewer Review Type Date Requested Status
Ted Gould (community) 2013-09-11 Approve on 2013-09-11
PS Jenkins bot (community) continuous-integration Approve on 2013-09-11
Review via email: mp+185108@code.launchpad.net

Description of the change

Adds a title in the header's action state

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/service.c'
2--- src/service.c 2013-09-08 20:17:44 +0000
3+++ src/service.c 2013-09-11 17:21:29 +0000
4@@ -453,6 +453,7 @@
5 gchar * str;
6 gboolean visible;
7 GDateTime * now;
8+ const gchar * title = _("Date and Time");
9
10 visible = g_settings_get_boolean (self->priv->settings, SETTINGS_SHOW_CLOCK_S);
11
12@@ -469,6 +470,7 @@
13 g_variant_builder_init (&b, G_VARIANT_TYPE_VARDICT);
14 g_variant_builder_add (&b, "{sv}", "accessible-desc", g_variant_new_string (str));
15 g_variant_builder_add (&b, "{sv}", "label", g_variant_new_take_string (str));
16+ g_variant_builder_add (&b, "{sv}", "title", g_variant_new_string (title));
17 g_variant_builder_add (&b, "{sv}", "visible", g_variant_new_boolean (visible));
18
19 /* cleanup */
20@@ -489,6 +491,7 @@
21 gchar * label;
22 gboolean has_alarms;
23 gchar * a11y;
24+ gchar * title;
25
26 g_variant_builder_init (&b, G_VARIANT_TYPE_VARDICT);
27
28@@ -517,6 +520,10 @@
29 g_variant_builder_add (&b, "{sv}", "visible", g_variant_new_boolean (TRUE));
30 g_variant_builder_add (&b, "{sv}", "label", g_variant_new_take_string (label));
31
32+ /* title is day-of-week */
33+ title = g_date_time_format (now, _("%A"));
34+ g_variant_builder_add (&b, "{sv}", "title", g_variant_new_take_string (title));
35+
36 /* cleanup */
37 g_date_time_unref (now);
38 return g_variant_builder_end (&b);
39@@ -647,9 +654,6 @@
40 {
41 GMenu * menu = g_menu_new ();
42
43- /* strftime(3) format string to show day of week */
44- add_localtime_menuitem (menu, self, _("%A"), NULL);
45-
46 /* strftime(3) format string to show date */
47 add_localtime_menuitem (menu, self, _("%e %B %Y"), "calendar");
48

Subscribers

People subscribed via source and target branches