Merge lp:~charlesk/indicator-datetime/lp-957320 into lp:indicator-datetime/0.4

Proposed by Charles Kerr
Status: Merged
Approved by: Charles Kerr
Approved revision: 163
Merged at revision: 162
Proposed branch: lp:~charlesk/indicator-datetime/lp-957320
Merge into: lp:indicator-datetime/0.4
Diff against target: 21 lines (+4/-5)
1 file modified
src/datetime-service.c (+4/-5)
To merge this branch: bzr merge lp:~charlesk/indicator-datetime/lp-957320
Reviewer Review Type Date Requested Status
Lars Karlitski (community) Approve
Review via email: mp+97962@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Charles Kerr (charlesk) wrote :

Pretty simple stuff. This patch adds the g_free() line to the end of this block:

        gchar *time_format_str = g_settings_get_string(conf, SETTINGS_TIME_FORMAT_S);
        gint apt_output;
        if (g_strcmp0(time_format_str, "12-hour") == 0) {
                apt_output = SETTINGS_TIME_12_HOUR;
        } else if (g_strcmp0(time_format_str, "24-hour") == 0) {
                apt_output = SETTINGS_TIME_24_HOUR;
        } else if (is_locale_12h()) {
                apt_output = SETTINGS_TIME_12_HOUR;
        } else {
                apt_output = SETTINGS_TIME_24_HOUR;
        }
        g_free (time_format_str);

Revision history for this message
Lars Karlitski (larsu) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/datetime-service.c'
2--- src/datetime-service.c 2012-03-07 20:36:07 +0000
3+++ src/datetime-service.c 2012-03-16 19:00:26 +0000
4@@ -821,13 +821,12 @@
5 apt_output = SETTINGS_TIME_12_HOUR;
6 } else if (g_strcmp0(time_format_str, "24-hour") == 0) {
7 apt_output = SETTINGS_TIME_24_HOUR;
8+ } else if (is_locale_12h()) {
9+ apt_output = SETTINGS_TIME_12_HOUR;
10 } else {
11- if (is_locale_12h()) {
12- apt_output = SETTINGS_TIME_12_HOUR;
13- } else {
14- apt_output = SETTINGS_TIME_24_HOUR;
15- }
16+ apt_output = SETTINGS_TIME_24_HOUR;
17 }
18+ g_free (time_format_str);
19
20 GVariantBuilder markeddays;
21 g_variant_builder_init (&markeddays, G_VARIANT_TYPE ("ai"));

Subscribers

People subscribed via source and target branches