diff options
| author | Patrick Storz <eduard.braun2@gmx.de> | 2019-09-26 21:03:28 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-09-26 21:03:28 +0000 |
| commit | 01ec4ffba1a2013dee932d0790dd76f9ab393ef7 (patch) | |
| tree | e50fb6c1469d6ebc66369cb949e537fc9ecb3672 /src/extension/dependency.cpp | |
| parent | Remove pixman_log_error from console (diff) | |
| download | inkscape-01ec4ffba1a2013dee932d0790dd76f9ab393ef7.tar.gz inkscape-01ec4ffba1a2013dee932d0790dd76f9ab393ef7.zip | |
Extensions: Fix filename encoding issues in error logging
(std::ostream is not properly portable unfortunately)
Diffstat (limited to 'src/extension/dependency.cpp')
| -rw-r--r-- | src/extension/dependency.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/extension/dependency.cpp b/src/extension/dependency.cpp index 2a04a030a..0f45d02b5 100644 --- a/src/extension/dependency.cpp +++ b/src/extension/dependency.cpp @@ -244,21 +244,19 @@ const gchar* Dependency::get_name() /** \brief Print out a dependency to a string. */ -std::ostream & -operator<< (std::ostream &out_file, const Dependency & in_dep) +Glib::ustring Dependency::info_string() { - out_file << _("Dependency:") << '\n'; - out_file << _(" type: ") << _(in_dep._type_str[in_dep._type]) << '\n'; - out_file << _(" location: ") << _(in_dep._location_str[in_dep._location]) << '\n'; - out_file << _(" string: ") << in_dep._string << '\n'; - - if (in_dep._description != nullptr) { - out_file << _(" description: ") << _(in_dep._description) << '\n'; + Glib::ustring str = Glib::ustring::compose("%1:\n\t%2: %3\n\t%4: %5\n\t%6: %7", + _("Dependency"), + _("type"), _(_type_str[_type]), + _("location"), _(_location_str[_location]), + _("string"), _string); + + if (_description) { + str += Glib::ustring::compose("\n\t%1: %2\n", _(" description: "), _(_description)); } - out_file << std::flush; - - return out_file; + return str; } } } /* namespace Inkscape, Extension */ |
