[librsvg] LoadOptions::new() - Don't take a Locale; compute it internally
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] LoadOptions::new() - Don't take a Locale; compute it internally
- Date: Tue, 9 Apr 2019 16:44:59 +0000 (UTC)
commit 6c9a1bb9efc02573267cc80bcbff3d6031beea81
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Apr 5 12:59:35 2019 -0600
LoadOptions::new() - Don't take a Locale; compute it internally
This is temporary. #356 will require us to be able to receive an
Accept-Languages HTTP header, and I don't know yet what kind of
representation that will use (i.e. which crate to use for this).
So, for now, we assume that the LoadOptions's locale is implicitly
defined by the environment.
rsvg_internals/src/handle.rs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/rsvg_internals/src/handle.rs b/rsvg_internals/src/handle.rs
index 7d83619c..20192e56 100644
--- a/rsvg_internals/src/handle.rs
+++ b/rsvg_internals/src/handle.rs
@@ -45,11 +45,11 @@ pub struct LoadOptions {
}
impl LoadOptions {
- fn new(flags: LoadFlags, base_url: Option<Url>, locale: Locale) -> LoadOptions {
+ fn new(flags: LoadFlags, base_url: Option<Url>) -> LoadOptions {
LoadOptions {
flags,
base_url,
- locale,
+ locale: locale_from_environment(),
}
}
@@ -249,7 +249,6 @@ impl Handle {
LoadOptions::new(
load_flags,
self.base_url.borrow().clone(),
- locale_from_environment(),
)
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]