summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-07-03 13:10:59 +0200
committerraveit65 <[email protected]>2016-07-03 13:10:59 +0200
commit1c71a8a7abe3f1472100c7f00ce38a2fba633121 (patch)
tree8a60c2194dc1963b5c29d40d43ed1ddddcdb7fc2 /shell
parent4c930158904d38cbdde62408ea1238214a328ce1 (diff)
downloadatril-1c71a8a7abe3f1472100c7f00ce38a2fba633121.tar.bz2
atril-1c71a8a7abe3f1472100c7f00ce38a2fba633121.tar.xz
shell: Fix -Wformat-nonliteral warning
taken from: https://git.gnome.org/browse/evince/commit/?id=bbaeca0
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-password-view.c11
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,