[gnome-maps/gnome-40] placeView: Hide native name unless it should be shown



commit 902e2fa2014a07f0b7ff41693b0567fc8fd096ff
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 20c9db17..1b4fed94 100644
--- a/src/placeView.js
+++ b/src/placeView.js
@@ -218,6 +218,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]