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

Proposed by Charles Kerr
Status: Merged
Approved by: Ted Gould
Approved revision: 283
Merged at revision: 283
Proposed branch: lp:~charlesk/indicator-datetime/13.10-lp-1271484
Merge into: lp:~indicator-applet-developers/indicator-datetime/trunk.13.10
Diff against target: 85 lines (+16/-26)
1 file modified
src/service.c (+16/-26)
To merge this branch: bzr merge lp:~charlesk/indicator-datetime/13.10-lp-1271484
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+203443@code.launchpad.net

Description of the change

Fix 13.10 regression that stopped listening to /etc/timezone changes if geoclue detection was disabled.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ted Gould (ted) :
review: Approve

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-11-03 05:09:01 +0000
3+++ src/service.c 2014-01-28 01:04:42 +0000
4@@ -862,15 +862,13 @@
5 }
6
7 /* When the 'auto-detect timezone' boolean setting changes,
8- start or stop watching geoclue and /etc/timezone */
9+ start or stop watching geoclue */
10 static void
11-set_detect_location_enabled (IndicatorDatetimeService * self, gboolean enabled)
12+set_geoclue_enabled (IndicatorDatetimeService * self, gboolean enabled)
13 {
14 gboolean changed = FALSE;
15 priv_t * p = self->priv;
16
17- /* geoclue */
18-
19 if (!p->tz_geoclue && enabled)
20 {
21 p->tz_geoclue = indicator_datetime_timezone_geoclue_new ();
22@@ -888,25 +886,6 @@
23 changed = TRUE;
24 }
25
26- /* timezone file */
27-
28- if (!p->tz_file && enabled)
29- {
30- p->tz_file = indicator_datetime_timezone_file_new (TIMEZONE_FILE);
31- g_signal_connect_swapped (p->tz_file, "notify::timezone",
32- G_CALLBACK(on_current_timezone_changed),
33- self);
34- changed = TRUE;
35- }
36- else if (p->tz_file && !enabled)
37- {
38- g_signal_handlers_disconnect_by_func (p->tz_file,
39- on_current_timezone_changed,
40- self);
41- g_clear_object (&p->tz_file);
42- changed = TRUE;
43- }
44-
45 if (changed)
46 on_current_timezone_changed (self);
47 }
48@@ -1000,8 +979,8 @@
49 priv_t * p = self->priv;
50 GDateTime * now = indicator_datetime_service_get_localtime (self);
51
52- set_detect_location_enabled (self,
53- g_settings_get_boolean (p->settings, SETTINGS_SHOW_DETECTED_S));
54+ set_geoclue_enabled (self,
55+ g_settings_get_boolean (p->settings, SETTINGS_SHOW_DETECTED_S));
56
57 menu = g_menu_new ();
58
59@@ -1821,7 +1800,13 @@
60 g_clear_object (&p->cancellable);
61 }
62
63- set_detect_location_enabled (self, FALSE);
64+ if (p->tz_file != NULL)
65+ {
66+ g_signal_handlers_disconnect_by_func (p->tz_file, on_current_timezone_changed, o);
67+ g_clear_object (&p->tz_file);
68+ }
69+
70+ set_geoclue_enabled (self, FALSE);
71
72 if (p->planner != NULL)
73 {
74@@ -2007,6 +1992,11 @@
75 self,
76 NULL);
77
78+ p->tz_file = indicator_datetime_timezone_file_new (TIMEZONE_FILE);
79+ g_signal_connect_swapped (p->tz_file, "notify::timezone",
80+ G_CALLBACK(on_current_timezone_changed),
81+ self);
82+
83 on_local_time_jumped (self);
84
85 for (i=0; i<N_PROFILES; ++i)

Subscribers

People subscribed via source and target branches