diff options
author | raveit65 <[email protected]> | 2016-07-03 13:10:59 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2016-07-03 13:10:59 +0200 |
commit | 1c71a8a7abe3f1472100c7f00ce38a2fba633121 (patch) | |
tree | 8a60c2194dc1963b5c29d40d43ed1ddddcdb7fc2 | |
parent | 4c930158904d38cbdde62408ea1238214a328ce1 (diff) | |
download | atril-1c71a8a7abe3f1472100c7f00ce38a2fba633121.tar.bz2 atril-1c71a8a7abe3f1472100c7f00ce38a2fba633121.tar.xz |
shell: Fix -Wformat-nonliteral warning
taken from:
https://git.gnome.org/browse/evince/commit/?id=bbaeca0
-rw-r--r-- | shell/ev-password-view.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/shell/ev-password-view.c b/shell/ev-password-view.c index d5e49b5e..bd7d5222 100644 --- a/shell/ev-password-view.c +++ b/shell/ev-password-view.c @@ -257,7 +257,7 @@ ev_password_view_ask_password (EvPasswordView *password_view) GtkWidget *table; #endif GtkWidget *label; - gchar *format, *markup, *file_name; + gchar *text, *markup, *file_name; gtk_widget_set_sensitive (GTK_WIDGET (password_view), FALSE); @@ -312,12 +312,13 @@ ev_password_view_ask_password (EvPasswordView *password_view) gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); file_name = g_file_get_basename (password_view->priv->uri_file); - format = g_strdup_printf ("<span size=\"larger\" weight=\"bold\">%s</span>\n\n%s", + text = g_markup_printf_escaped (_("The document ā%sā is locked and requires a password before it can be opened."), + file_name); + markup = g_strdup_printf ("<span size=\"larger\" weight=\"bold\">%s</span>\n\n%s", _("Password required"), - _("The document ā%sā is locked and requires a password before it can be opened.")); - markup = g_markup_printf_escaped (format, file_name); + text); gtk_label_set_markup (GTK_LABEL (label), markup); - g_free (format); + g_free (text); g_free (markup); g_free (file_name); gtk_box_pack_start (GTK_BOX (main_vbox), label, |