Merge lp:~indicator-applet-developers/indicator-datetime/ubuntu into lp:~ubuntu-desktop/indicator-datetime/ubuntu

Proposed by Ted Gould
Status: Merged
Merged at revision: 58
Proposed branch: lp:~indicator-applet-developers/indicator-datetime/ubuntu
Merge into: lp:~ubuntu-desktop/indicator-datetime/ubuntu
Diff against target: 306 lines (+88/-38)
8 files modified
AUTHORS (+1/-0)
ChangeLog (+41/-0)
configure (+10/-10)
configure.ac (+1/-1)
debian/changelog (+9/-0)
src/datetime-prefs.c (+1/-1)
src/datetime-service.c (+15/-15)
src/indicator-datetime.c (+10/-11)
To merge this branch: bzr merge lp:~indicator-applet-developers/indicator-datetime/ubuntu
Reviewer Review Type Date Requested Status
Ken VanDine Approve
Review via email: mp+72103@code.launchpad.net

Description of the change

Fun fixes!

To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'AUTHORS'
2--- AUTHORS 2011-08-11 16:29:05 +0000
3+++ AUTHORS 2011-08-18 20:39:24 +0000
4@@ -6,6 +6,7 @@
5 Evgeni Golov
6 Gabor Kelemen
7 Javier Jardón
8+ Jeremy Bicha
9 karl-qdh
10 Ken VanDine
11 Kyle Nitzsche
12
13=== modified file 'ChangeLog'
14--- ChangeLog 2011-08-11 16:29:05 +0000
15+++ ChangeLog 2011-08-18 20:39:24 +0000
16@@ -1,5 +1,46 @@
17 # Generated by Makefile. Do not edit.
18
19+2011-08-18 Ted Gould <ted@gould.cx>
20+
21+ 0.2.93
22+
23+2011-08-17 Ted Gould <ted@gould.cx>
24+
25+ Use cleaner gdatetime
26+
27+2011-08-17 Javier Jardón <javier.jardon@codethink.co.uk>
28+
29+ Set the correct month number
30+
31+ g_datetime_get_ymd() gets the Gregorian month number but
32+ gtk_calendar_set_month() needs a value between [0,11]
33+
34+2011-08-16 Javier Jardón <javier.jardon@codethink.co.uk>
35+
36+ Use the new GDateTime glib API to deal with time
37+
38+2011-08-17 Ted Gould <ted@gould.cx>
39+
40+ Use locale prefered date format
41+
42+2011-08-16 Javier Jardón <javier.jardon@codethink.co.uk>
43+
44+ Show the preferred date representation for the current locale
45+
46+ Fixes https://bugs.launchpad.net/indicator-datetime/+bug/729056
47+
48+2011-08-17 Ted Gould <ted@gould.cx>
49+
50+ Fixing ellipsis to be true ellipsis
51+
52+2011-08-05 Jeremy Bicha <jbicha@ubuntu.com>
53+
54+ Use real ellipsis (LP: #621339)
55+
56+2011-08-05 Jeremy Bicha <jbicha@ubuntu.com>
57+
58+ Spell out "and" to match other System Settings panels
59+
60 2011-08-11 Ted Gould <ted@gould.cx>
61
62 0.2.92
63
64=== modified file 'configure'
65--- configure 2011-08-11 16:29:05 +0000
66+++ configure 2011-08-18 20:39:24 +0000
67@@ -1,6 +1,6 @@
68 #! /bin/sh
69 # Guess values for system-dependent variables and create Makefiles.
70-# Generated by GNU Autoconf 2.68 for indicator-datetime 0.2.92.
71+# Generated by GNU Autoconf 2.68 for indicator-datetime 0.2.93.
72 #
73 # Report bugs to <http://bugs.launchpad.net/indicator-datetime>.
74 #
75@@ -572,8 +572,8 @@
76 # Identity of this package.
77 PACKAGE_NAME='indicator-datetime'
78 PACKAGE_TARNAME='indicator-datetime'
79-PACKAGE_VERSION='0.2.92'
80-PACKAGE_STRING='indicator-datetime 0.2.92'
81+PACKAGE_VERSION='0.2.93'
82+PACKAGE_STRING='indicator-datetime 0.2.93'
83 PACKAGE_BUGREPORT='http://bugs.launchpad.net/indicator-datetime'
84 PACKAGE_URL='http://launchpad.net/indicator-datetime'
85
86@@ -1375,7 +1375,7 @@
87 # Omit some internal or obsolete options to make the list less imposing.
88 # This message is too long to be a string in the A/UX 3.1 sh.
89 cat <<_ACEOF
90-\`configure' configures indicator-datetime 0.2.92 to adapt to many kinds of systems.
91+\`configure' configures indicator-datetime 0.2.93 to adapt to many kinds of systems.
92
93 Usage: $0 [OPTION]... [VAR=VALUE]...
94
95@@ -1446,7 +1446,7 @@
96
97 if test -n "$ac_init_help"; then
98 case $ac_init_help in
99- short | recursive ) echo "Configuration of indicator-datetime 0.2.92:";;
100+ short | recursive ) echo "Configuration of indicator-datetime 0.2.93:";;
101 esac
102 cat <<\_ACEOF
103
104@@ -1578,7 +1578,7 @@
105 test -n "$ac_init_help" && exit $ac_status
106 if $ac_init_version; then
107 cat <<\_ACEOF
108-indicator-datetime configure 0.2.92
109+indicator-datetime configure 0.2.93
110 generated by GNU Autoconf 2.68
111
112 Copyright (C) 2010 Free Software Foundation, Inc.
113@@ -1949,7 +1949,7 @@
114 This file contains any messages produced by compilers while
115 running configure, to aid debugging if configure makes a mistake.
116
117-It was created by indicator-datetime $as_me 0.2.92, which was
118+It was created by indicator-datetime $as_me 0.2.93, which was
119 generated by GNU Autoconf 2.68. Invocation command line was
120
121 $ $0 $@
122@@ -2773,7 +2773,7 @@
123
124 # Define the identity of the package.
125 PACKAGE='indicator-datetime'
126- VERSION='0.2.92'
127+ VERSION='0.2.93'
128
129
130 cat >>confdefs.h <<_ACEOF
131@@ -14609,7 +14609,7 @@
132 # report actual input values of CONFIG_FILES etc. instead of their
133 # values after options handling.
134 ac_log="
135-This file was extended by indicator-datetime $as_me 0.2.92, which was
136+This file was extended by indicator-datetime $as_me 0.2.93, which was
137 generated by GNU Autoconf 2.68. Invocation command line was
138
139 CONFIG_FILES = $CONFIG_FILES
140@@ -14676,7 +14676,7 @@
141 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
142 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
143 ac_cs_version="\\
144-indicator-datetime config.status 0.2.92
145+indicator-datetime config.status 0.2.93
146 configured by $0, generated by GNU Autoconf 2.68,
147 with options \\"\$ac_cs_config\\"
148
149
150=== modified file 'configure.ac'
151--- configure.ac 2011-08-11 16:29:05 +0000
152+++ configure.ac 2011-08-18 20:39:24 +0000
153@@ -1,5 +1,5 @@
154 AC_INIT([indicator-datetime],
155- [0.2.92],
156+ [0.2.93],
157 [http://bugs.launchpad.net/indicator-datetime],
158 [indicator-datetime],
159 [http://launchpad.net/indicator-datetime])
160
161=== modified file 'debian/changelog'
162--- debian/changelog 2011-08-16 21:43:44 +0000
163+++ debian/changelog 2011-08-18 20:39:24 +0000
164@@ -1,3 +1,12 @@
165+indicator-datetime (0.2.93-0ubuntu1~ppa1) oneiric; urgency=low
166+
167+ * New upstream release.
168+ ∘ Use cleaner GDateTime API
169+ ∘ Use locale preferred date format (LP: #729056)
170+ ∘ Use real ellipsis (LP: #621339)
171+
172+ -- Ted Gould <ted@ubuntu.com> Thu, 18 Aug 2011 15:36:21 -0500
173+
174 indicator-datetime (0.2.92-0ubuntu1) oneiric; urgency=low
175
176 * New upstream release.
177
178=== modified file 'src/datetime-prefs.c'
179--- src/datetime-prefs.c 2011-06-29 13:10:25 +0000
180+++ src/datetime-prefs.c 2011-08-18 20:39:24 +0000
181@@ -478,7 +478,7 @@
182 }
183 }
184 else {
185- format = "%Y-%m-%d";
186+ format = "%x";
187 }
188
189 GDateTime * datetime = g_date_time_new_from_unix_local (gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinner)));
190
191=== modified file 'src/datetime-service.c'
192--- src/datetime-service.c 2011-08-11 16:29:05 +0000
193+++ src/datetime-service.c 2011-08-18 20:39:24 +0000
194@@ -299,25 +299,25 @@
195 static gboolean
196 update_datetime (gpointer user_data)
197 {
198+ GDateTime *datetime;
199+ gchar *utf8;
200+
201 g_debug("Updating Date/Time");
202
203- gchar longstr[128];
204- time_t t;
205- struct tm *ltime;
206-
207- t = time(NULL);
208- ltime = localtime(&t);
209- if (ltime == NULL) {
210+ datetime = g_date_time_new_now_local ();
211+ if (datetime == NULL) {
212 g_warning("Error getting local time");
213 dbusmenu_menuitem_property_set(date, DBUSMENU_MENUITEM_PROP_LABEL, _("Error getting time"));
214+ g_date_time_unref (datetime);
215 return FALSE;
216 }
217
218- /* Translators: strftime(3) style date format on top of the menu when you click on the clock */
219- strftime(longstr, 128, _("%A, %e %B %Y"), ltime);
220-
221- gchar * utf8 = g_locale_to_utf8(longstr, -1, NULL, NULL, NULL);
222+ /* eranslators: strftime(3) style date format on top of the menu when you click on the clock */
223+ utf8 = g_date_time_format (datetime, _("%A, %e %B %Y"));
224+
225 dbusmenu_menuitem_property_set(date, DBUSMENU_MENUITEM_PROP_LABEL, utf8);
226+
227+ g_date_time_unref (datetime);
228 g_free(utf8);
229
230 return FALSE;
231@@ -492,7 +492,7 @@
232 dbusmenu_menuitem_property_set(events_separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
233 dbusmenu_menuitem_child_add_position(root, events_separator, 2);
234 add_appointment = dbusmenu_menuitem_new();
235- dbusmenu_menuitem_property_set (add_appointment, DBUSMENU_MENUITEM_PROP_LABEL, _("Add Event..."));
236+ dbusmenu_menuitem_property_set (add_appointment, DBUSMENU_MENUITEM_PROP_LABEL, _("Add Event…"));
237 dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
238 g_signal_connect(G_OBJECT(add_appointment), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_cb), "evolution -c calendar");
239 dbusmenu_menuitem_child_add_position (root, add_appointment, 3);
240@@ -701,7 +701,7 @@
241
242 // Get today & work out query times
243 time(&curtime);
244- struct tm *today = localtime(&curtime);
245+ struct tm *today = localtime(&curtime);
246 const int mday = today->tm_mday;
247 const int mon = today->tm_mon;
248 const int year = today->tm_year;
249@@ -1064,7 +1064,7 @@
250 g_debug("Building Menus.");
251 if (date == NULL) {
252 date = dbusmenu_menuitem_new();
253- dbusmenu_menuitem_property_set (date, DBUSMENU_MENUITEM_PROP_LABEL, _("No date yet..."));
254+ dbusmenu_menuitem_property_set (date, DBUSMENU_MENUITEM_PROP_LABEL, _("No date yet…"));
255 dbusmenu_menuitem_property_set_bool(date, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
256 dbusmenu_menuitem_child_append(root, date);
257
258@@ -1116,7 +1116,7 @@
259 dbusmenu_menuitem_child_append(root, separator);
260
261 settings = dbusmenu_menuitem_new();
262- dbusmenu_menuitem_property_set (settings, DBUSMENU_MENUITEM_PROP_LABEL, _("Time & Date Settings..."));
263+ dbusmenu_menuitem_property_set (settings, DBUSMENU_MENUITEM_PROP_LABEL, _("Time & Date Settings…"));
264 /* insensitive until we check for available apps */
265 dbusmenu_menuitem_property_set_bool(settings, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
266 g_signal_connect(G_OBJECT(settings), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_cb), "gnome-control-center indicator-datetime");
267
268=== modified file 'src/indicator-datetime.c'
269--- src/indicator-datetime.c 2011-08-11 16:29:05 +0000
270+++ src/indicator-datetime.c 2011-08-18 20:39:24 +0000
271@@ -270,6 +270,9 @@
272 menu_visible_notfy_cb(GtkWidget * menu, G_GNUC_UNUSED GParamSpec *pspec, gpointer user_data)
273 {
274 IndicatorDatetime * self = INDICATOR_DATETIME(user_data);
275+ GDateTime *datetime;
276+ gint y, m, d;
277+
278 g_debug("notify visible signal received");
279
280 // we should only react if we're currently visible
281@@ -277,18 +280,14 @@
282 g_object_get(G_OBJECT(menu), "visible", &visible, NULL);
283 if (visible) return;
284 g_debug("notify visible menu hidden, resetting date");
285-
286- time_t curtime;
287-
288- time(&curtime);
289- struct tm *today = localtime(&curtime);
290- int y = today->tm_year;
291- int m = today->tm_mon;
292- int d = today->tm_mday;
293-
294+
295+ datetime = g_date_time_new_now_local ();
296+ g_date_time_get_ymd (datetime, &y, &m, &d);
297+ g_date_time_unref (datetime);
298+
299 // Set the calendar to todays date
300- ido_calendar_menu_item_set_date (self->priv->ido_calendar, y+1900, m, d);
301-
302+ ido_calendar_menu_item_set_date (self->priv->ido_calendar, y, m-1, d);
303+
304 // Make sure the day-selected signal is sent so the menu updates - may duplicate
305 /*GVariant *variant = g_variant_new_uint32((guint)curtime);
306 guint timestamp = (guint)time(NULL);

Subscribers

People subscribed via source and target branches