Skip to content
Commits on Source (7)
44.2 - May 26, 2023
=========================
Changes since 44.1
- Show thumbnails for places with a linked Wikidata entry with a title
image, but that has no linked Wikipedia articles
- Show the correct rotation of the user location marker when there is a heading
(Geoclue indicating motion), in case the map view is rotated
Added/updated/fixed translations
- Italian
All contributors to this release
Gianvito Cavasoli <gianvito@gmx.it>
Marcus Lundblad <ml@dfupdate.se>
44.1 - Apr 21, 2023
=========================
......
......@@ -31,6 +31,14 @@
</screenshot>
</screenshots>
<releases>
<release date="2023-05-26" version="44.2">
<description>
<ul>
<li>Show thumbnails for places with a linked Wikidata entry with a title image, but that has no linked Wikipedia articles</li>
<li>Show the correct rotation of the user location marker when there is a heading (Geoclue indicating motion), in case the map view is rotated</li>
</ul>
</description>
</release>
<release date="2023-04-21" version="44.1">
<description>
<ul>
......
project('gnome-maps', 'c',
version: '44.1',
version: '44.2',
license: 'GPL-2.0-or-later',
meson_version: '>= 0.61.0',
)
......
This diff is collapsed.
......@@ -98,6 +98,8 @@ export class UserLocationMarker extends MapMarker {
this._updateLocation();
this.connect('notify::visible', this._updateAccuracyCircle.bind(this));
this._mapView.map.viewport.connect('notify::rotation',
() => this._updateLocation());
}
_hasBubble() {
......@@ -129,20 +131,26 @@ export class UserLocationMarker extends MapMarker {
}
vfunc_snapshot(snapshot) {
snapshot.save();
if (this.place.location.heading > -1) {
// rotate around the center of the icon
let {x, y, width, height} = this.get_allocation();
let width = this.get_width();
let height = this.get_height();
let point = new Graphene.Point();
let rotation = this.place.location.heading +
this._mapView.map.viewport.rotation * 180 / Math.PI;
point.init(width / 2, height / 2);
snapshot.translate(point);
snapshot.rotate(this.place.location.heading);
snapshot.rotate(rotation);
point.init(-width / 2, -height / 2);
snapshot.translate(point);
}
this.snapshot_child(this._image, snapshot);
super.vfunc_snapshot(snapshot);
snapshot.restore();
}
}
......
......@@ -194,8 +194,8 @@ export function fetchArticleInfoForWikidata(wikidata, defaultArticle,
let cachedWikidata = _wikidataCache[wikidata];
if (cachedWikidata) {
_onWikidataFetched(wikidata, defaultArticle, size, metadataCb,
thumbnailCb);
_onWikidataFetched(wikidata, defaultArticle, cachedWikidata, size,
metadataCb, thumbnailCb);
return;
}
......@@ -253,16 +253,6 @@ export function fetchWikidataForArticle(wiki, cancellable, callback) {
function _onWikidataFetched(wikidata, defaultArticle, response, size,
metadataCb, thumbnailCb) {
let sitelinks = response?.entities?.[wikidata]?.sitelinks;
if (!sitelinks) {
Utils.debug('No sitelinks element in response');
metadataCb(null, {});
if (thumbnailCb)
thumbnailCb(null);
return;
}
let claims = response?.entities?.[wikidata]?.claims;
let imageName =
claims?.[WIKIDATA_PROPERTY_IMAGE]?.[0]?.mainsnak?.datavalue?.value;
......@@ -275,6 +265,16 @@ function _onWikidataFetched(wikidata, defaultArticle, response, size,
thumbnailCb = null;
}
let sitelinks = response?.entities?.[wikidata]?.sitelinks;
if (!sitelinks) {
Utils.debug('No sitelinks element in response');
metadataCb(null, {});
if (thumbnailCb)
thumbnailCb(null);
return;
}
/* try to find articles in the order of the user's preferred
* languages
*/
......