[gnome-panel] clock: fix 'format not a string literal' warning
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] clock: fix 'format not a string literal' warning
- Date: Sun, 30 Oct 2016 22:33:12 +0000 (UTC)
commit 223093cb38a884e8ce111a0aad406381902be37a
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Oct 30 21:49:39 2016 +0200
clock: fix 'format not a string literal' warning
applets/clock/clock.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 64dae68..07db09a 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -259,19 +259,17 @@ update_tooltip (ClockData * cd)
show_date = g_settings_get_boolean (cd->clock_settings, "clock-show-date");
if (!show_date) {
GDateTime *dt;
- char *tip, *format;
+ char *tip;
dt = g_date_time_new_now_local ();
+
/* Translators: This is a strftime format string.
- * It is used to display a date. Please leave "%%s" as it is:
- * it will be used to insert the timezone name later. */
- format = g_date_time_format (dt, _("%A %B %d (%%s)"));
- tip = g_strdup_printf (format, g_date_time_get_timezone_abbreviation (dt));
+ * It is used to display a date.
+ */
+ tip = g_date_time_format (dt, _("%A %B %d (%Z)"));
+ g_date_time_unref (dt);
gtk_widget_set_tooltip_text (cd->panel_button, tip);
-
- g_date_time_unref (dt);
- g_free (format);
g_free (tip);
} else {
#ifdef HAVE_EDS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]