diff options
Diffstat (limited to 'Rpmdrake')
-rw-r--r-- | Rpmdrake/formatting.pm | 7 | ||||
-rw-r--r-- | Rpmdrake/gui.pm | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/Rpmdrake/formatting.pm b/Rpmdrake/formatting.pm index 51ac8935..90cd0604 100644 --- a/Rpmdrake/formatting.pm +++ b/Rpmdrake/formatting.pm @@ -33,7 +33,7 @@ use ugtk2 qw(escape_text_for_TextView_markup_format); use Exporter; our @ISA = qw(Exporter); -our @EXPORT = qw(format_field format_header format_name_n_summary format_size localtime2changelog my_fullname pkg2medium rpm_description split_fullname urpm_name); +our @EXPORT = qw(format_field format_header format_name_n_summary format_size format_update_field localtime2changelog my_fullname pkg2medium rpm_description split_fullname urpm_name); sub rpm_description { @@ -82,6 +82,11 @@ sub pkg2medium { #- encodings; but if a user has a so broken setup we can't do much anyway sub localtime2changelog { to_utf8(POSIX::strftime("%c", localtime($_[0]))) } +sub format_update_field { + my ($name) = @_; + eval { escape_text_for_TextView_markup_format($name) }; +} + sub format_name_n_summary { my ($name, $summary) = @_; join("\n", '<b>' . $name . '</b>', escape_text_for_TextView_markup_format($summary)); diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index fb5193e6..312aa555 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -117,8 +117,8 @@ sub format_pkg_simplifiedinfo { # workaround gtk+ bug where GtkTextView wronly limit embedded widget size to bigger line's width (#25533): "\x{200b} \x{feff}" . ' ' x 120, if_($is_update, # is it an update? - format_field(N("Importance: ")) . eval { escape_text_for_TextView_markup_format($update_descr->{importance}) }, - format_field(N("Reason for update: ")) . eval { escape_text_for_TextView_markup_format(rpm_description($update_descr->{pre})) }, + format_field(N("Importance: ")) . format_update_field($update_descr->{importance}), + format_field(N("Reason for update: ")) . format_update_field(rpm_description($update_descr->{pre})), ), '')); # extra empty line if ($is_update) { |