Skip to content
Commits on Source (20)
40.3 - Jul 9, 2021
=========================
Changes since 40.2
- Fix regression when signing in for OSM editing
Added/updated/fixed translations
- Chinese (China)
- Slovak
- Occitan
All contributors to this release
Boyuan Yang <073plan@gmail.com>
Dušan Kazik <prescott66@gmail.com>
Marcus Lundblad <ml@update.uu.se>
Quentin PAGÈS <pages_quentin@hotmail.com>
40.2 - Jun 4, 2021
=========================
Changes since 40.1
- Disable keyboard shortcuts to switch map styles when there's no aerial tiles
defined
- Fix a crash when starting up with last-used map type being aerial and no
aerial tiles are defined
- Increase place bubble max width to allow for longer translated strings
for the "Directions" button
- Fix warning from GtkListStore when adding route points from the context
menu
All contributors to this release
Marcus Lundblad <ml@update.uu.se>
40.1 - May 1, 2021
=========================
Changes since 40.0
- Fix a bug where unfavoring a place made it unselectable until after a restart
- Use country code attribute from GraphHopper/Photon geocode results to improve
accuracy of address formatting among others
Added/updated/fixed translations
- Hebrew
- Dutch
- British English
All contributors to this release
Andre Klapper <a9016009@gmx.de>
Marcus Lundblad <ml@update.uu.se>
Nathan Follens <nfollens@gnome.org>
Yaron Shahrabani <sh.yaron@gmail.com>
Zander Brown <zbrown@gnome.org>
40.0 - Mar 20, 2021
=========================
......
This diff is collapsed.
......@@ -42,6 +42,24 @@
</screenshot>
</screenshots>
<releases>
<release date="2021-07-09" version="40.3">
<ul>
<li>Fix regression when signing in for OSM editing</li>
</ul>
</release>
<release date="2021-06-04" version="40.2">
<ul>
<li>Fix crashes when no aerial tile definition is available</li>
<li>Fix cut-off text in place bubble in some translations</li>
</ul>
</release>
<release date="2021-05-01" version="40.1">
<ul>
<li>Fix a bug where unfavoring a place made it unselectable until after a restart</li>
<li>Use country code attribute from GraphHopper/Photon geocode results to improve
accuracy of address formatting among others</li>
</ul>
</release>
<release date="2021-03-20" version="40.0">
<ul>
<li>Redesigned place bubbles</li>
......
......@@ -88,16 +88,19 @@
<property name="accelerator">&lt;Primary&gt;L</property>
</object>
</child>
<!-- for now don't show the shortcuts for map type switching, since
the aerial tiles are disabled for now, keep it here to avoid
loosing the translation if/when we enable them again -->
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<object class="GtkShortcutsShortcut" id="streetShortcut">
<property name="visible">0</property>
<property name="title" translatable="yes" context="shortcut window">Switch to street view</property>
<property name="accelerator">&lt;Primary&gt;1</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<object class="GtkShortcutsShortcut" id="aerialShortcut">
<property name="visible">0</property>
<property name="title" translatable="yes" context="shortcut window">Switch to aerial view</property>
<property name="accelerator">&lt;Primary&gt;2</property>
</object>
......
project('gnome-maps', 'c',
version: '40.1',
version: '40.3',
license: 'GPL2+'
)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -101,7 +101,7 @@ var ContextMenu = GObject.registerClass({
let location = new Location.Location({ latitude: this._latitude,
longitude: this._longitude,
accuracy: 0 });
let place = new Place.Place({ location: location });
let place = new Place.Place({ location: location, store: false });
query.points[0].place = place;
}
......@@ -111,7 +111,7 @@ var ContextMenu = GObject.registerClass({
let location = new Location.Location({ latitude: this._latitude,
longitude: this._longitude,
accuracy: 0 });
let place = new Place.Place({ location: location });
let place = new Place.Place({ location: location, store: false });
query.points.last().place = place;
}
......@@ -121,7 +121,7 @@ var ContextMenu = GObject.registerClass({
let location = new Location.Location({ latitude: this._latitude,
longitude: this._longitude,
accuracy: 0 });
let place = new Place.Place({ location: location });
let place = new Place.Place({ location: location, store: false });
query.addPoint(-1).place = place;
}
......
......@@ -192,7 +192,7 @@ var MainWindow = GObject.registerClass({
}
_initActions() {
Utils.addActions(this, {
let actions = {
'about': {
onActivate: () => this._onAboutActivate()
},
......@@ -200,14 +200,6 @@ var MainWindow = GObject.registerClass({
state: ['b', false],
onActivate: () => this._onMapTypeMenuActivate()
},
'switch-to-street-view': {
accels: ['<Primary>1', '<Primary>KP_1'],
onActivate: () => this._onStreetViewActivate()
},
'switch-to-aearial-view': {
accels: ['<Primary>2', '<Primary>KP_2'],
onActivate: () => this._onAerialViewActivate()
},
'hybrid-aerial': {
paramType: 'b',
setting: 'hybrid-aerial'
......@@ -252,7 +244,22 @@ var MainWindow = GObject.registerClass({
'export-as-image': {
onActivate: () => this._onExportActivated()
}
}, Application.settings);
};
// when aerial tiles are available, add shortcuts to switch
if (Service.getService().tiles.aerial) {
actions['switch-to-street-view'] = {
accels: ['<Primary>1', '<Primary>KP_1'],
onActivate: () => this._onStreetViewActivate()
};
actions['switch-to-aearial-view'] = {
accels: ['<Primary>2', '<Primary>KP_2'],
onActivate: () => this._onAerialViewActivate()
};
}
Utils.addActions(this, actions, Application.settings);
}
_initSignals() {
......
......@@ -36,7 +36,7 @@ const PlaceStore = imports.placeStore;
const Utils = imports.utils;
/* Maximum width of the popover content before it's forced to wrap */
const MAX_CONTENT_WIDTH = 300;
const MAX_CONTENT_WIDTH = 350;
/* Margin between the height of the main window and the height of the popover
contents */
const HEIGHT_MARGIN = 100;
......
......@@ -30,7 +30,7 @@ const System = imports.system;
const Service = imports.service;
const Utils = imports.utils;
let _attributionImage = null;
let _attributionImages = [];
const _FILE_CACHE_SIZE_LIMIT = (10 * 1024 * 1024); /* 10Mb */
const _MEMORY_CACHE_SIZE_LIMIT = 100; /* number of tiles */
......@@ -46,31 +46,49 @@ class AttributionLogo extends GtkClutter.Actor {
_init(view) {
super._init();
if (_attributionImage)
this.contents = _attributionImage;
else
return;
this._view = view;
this._rtl = Gtk.get_locale_direction() === Gtk.TextDirection.RTL;
view.connect('notify::width', () => this._updatePosition(view));
view.connect('notify::height', () => this._updatePosition(view));
view.connect('notify::width', () => this._updatePosition());
view.connect('notify::height', () => this._updatePosition());
this._updatePosition(view);
}
_updatePosition(view) {
let width = _attributionImage.pixbuf.width;
let height = _attributionImage.pixbuf.height;
let x = view.width - width - _LOGO_PADDING_X;
/* TODO: ideally the attribution logo should be aligned to the left
* side in RTL locales, but I couldn't get that working with Clutter
* actor positioning, so adjust the padding to fit above the scale
* for now
*/
let y = view.height - height -
(this._rtl ? _LOGO_PADDING_Y_RTL : _LOGO_PADDING_Y);
this.set_position(x, y);
setSource(source) {
this._id = source.get_id();
let bin = this.get_widget();
if (bin.get_child())
bin.remove(bin.get_child());
if (_attributionImages[source.get_id()]) {
bin.add(_attributionImages[source.get_id()]);
bin.visible = true;
} else {
bin.visible = false;
}
this._updatePosition();
}
_updatePosition() {
let image = _attributionImages[this._id];
if (image) {
let width = image.pixbuf.width;
let height = image.pixbuf.height;
let x = this._view.width - width - _LOGO_PADDING_X;
/* TODO: ideally the attribution logo should be aligned to the left
* side in RTL locales, but I couldn't get that working with Clutter
* actor positioning, so adjust the padding to fit above the scale
* for now
*/
let y = this._view.height - height -
(this._rtl ? _LOGO_PADDING_Y_RTL : _LOGO_PADDING_Y);
this.set_position(x, y);
}
}
});
......@@ -78,12 +96,13 @@ function _updateAttributionImage(source) {
if (!source.attribution_logo || source.attribution_logo === "")
return;
if (!_attributionImage)
_attributionImage = new Gtk.Image();
if (!_attributionImages[source.id])
_attributionImages[source.id] = new Gtk.Image({ visible: true });
let data = GLib.base64_decode(source.attribution_logo);
let stream = Gio.MemoryInputStream.new_from_bytes(GLib.Bytes.new(data));
_attributionImage.pixbuf = GdkPixbuf.Pixbuf.new_from_stream(stream, null);
_attributionImages[source.id].pixbuf =
GdkPixbuf.Pixbuf.new_from_stream(stream, null);
}
function _createTileSource(source) {
......
......@@ -416,15 +416,17 @@ var MapView = GObject.registerClass({
this._mapType = mapType;
if (mapType !== MapType.LOCAL) {
if (mapType === MapType.AERIAL) {
if (Service.getService().tiles.hybridAerial &&
let tiles = Service.getService().tiles;
if (mapType === MapType.AERIAL && tiles.aerial) {
if (tiles.hybridAerial &&
Application.settings.get('hybrid-aerial')) {
this.view.map_source = MapSource.createHybridAerialSource();
} else {
this.view.map_source = MapSource.createAerialSource();
}
} else {
if (Service.getService().tiles.streetDark &&
if (tiles.streetDark &&
Application.settings.get('night-mode')) {
this.view.map_source = MapSource.createStreetDarkSource();
} else {
......@@ -436,6 +438,8 @@ var MapView = GObject.registerClass({
this.view.add_child(this._attribution);
}
this._attribution.setSource(this.view.map_source);
Application.settings.set('map-type', mapType);
} else {
let renderer = new Champlain.ImageRenderer();
......
......@@ -317,7 +317,7 @@ var OSMConnection = class OSMConnection {
oauth_token: this._oauthToken,
oauth_callback: '',
authenticity_token: token,
allow_write_api: 'yes',
allow_write_api: '1',
commit: 'Save changes'
});
let requestHeaders = msg.request_headers;
......
......@@ -275,7 +275,7 @@ class Place extends Geocode.Place {
state: this.state,
county: this.county,
country: this.country,
country_code: this.contry_code,
country_code: this.country_code,
continent: this.continent,
population: this.population,
website: this.website,
......
......@@ -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
......