[gnome-maps/wip/mlundblad/default-hide-native-name] placeView: Hide native name unless it should be shown
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/default-hide-native-name] placeView: Hide native name unless it should be shown
- Date: Tue, 18 May 2021 20:25:33 +0000 (UTC)
commit 2a27231afec45e3d8b173c8816ac8940ca9e3e02
Author: Marcus Lundblad <ml update uu se>
Date: Tue May 18 22:22:54 2021 +0200
placeView: Hide native name unless it should be shown
In some cases, when running in a different locale
compared to last run, the native name label could
still be shown with the native name from before
even when the primary name would become identical.
src/placeView.js | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/placeView.js b/src/placeView.js
index 66e7f5e3..70fca550 100644
--- a/src/placeView.js
+++ b/src/placeView.js
@@ -219,6 +219,12 @@ var PlaceView = GObject.registerClass({
this._title.label = formatter.title;
this._contactAvatar.text = formatter.title;
+ /* hide native name by default, so that it is only shown when it
+ * should, in case it changed when re-applying changes from Overpass.
+ * This could happen if the locale changed since last run.
+ */
+ this._nativeName.visible = false;
+
/* show native name unless it's equal to the localized name, or
* if the localized name is a substring of the native name, as can
* be the case in e.g. duo-lingual native names, such as is used in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]