GNOME Bugzilla – Bug 785322
Long filename increased password dialog box
Last modified: 2018-05-22 17:12:52 UTC
Created attachment 356243 [details] Long Filename Overview: Password protected PDFs with long filenames cause the password dialog box to increase in width. This occurs with these types of filenames: This is a very long filename name that increases the size of the dialog box.pdf This_is_a_very_long_filename_name_that_increases_the_size_of_the_dialog_box.pdf Underscores in the filename preclude the wrapping of the filename to the next line if the filename outgrows the natural window boundaries. Steps to Reproduce: 1) Use any password protected PDF with a long filename. Actual Results: 1) Dialog box increases its width to match the filename's length 2) Evince window cuts off the filename because it cannot wrap long filenames with underscores Expected Results: 1) Keep the dialog box width constant while either ellipsizing or wrapping the filename 2) Ellipsize or wrap the filename PROPOSED SOLUTION: Please bear with me and let me know if the thought process is correct. ev-password-view.c, lines 296-305 label = gtk_label_new (NULL); 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); 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"), text); gtk_label_set_markup (GTK_LABEL (label), markup); For the password dialog box, move the filename outside of the g_markup_printf_escaped and g_strdup_printf and allow the box to manage the filename as it seems fit. For the window container and dialog box, if the underscore filename exists wrap it as you would with spaces.
Created attachment 356244 [details] Long filename with underscores
Created attachment 356245 [details] Long filename with underscores outgrow window
Created attachment 356246 [details] Long filename wrapped in window
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/797.