<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[122610] users/devans/GNOME-3/stable/dports/gnome/gnome-maps</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/122610">122610</a></dd>
<dt>Author</dt> <dd>juanrgar@macports.org</dd>
<dt>Date</dt> <dd>2014-07-24 12:11:01 -0700 (Thu, 24 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>GNOME-3/stable: gnome-maps, add patches to avoid crash
Add patches to avoid crash due to GeoClue not available and disable user
location UI.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#usersdevansGNOME3stabledportsgnomegnomemapsPortfile">users/devans/GNOME-3/stable/dports/gnome/gnome-maps/Portfile</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>users/devans/GNOME-3/stable/dports/gnome/gnome-maps/files/</li>
<li><a href="#usersdevansGNOME3stabledportsgnomegnomemapsfilespatchdisablelocationbuttondiff">users/devans/GNOME-3/stable/dports/gnome/gnome-maps/files/patch-disable-location-button.diff</a></li>
<li><a href="#usersdevansGNOME3stabledportsgnomegnomemapsfilespatchgeoclueaddconnecteddiff">users/devans/GNOME-3/stable/dports/gnome/gnome-maps/files/patch-geoclue-add-connected.diff</a></li>
<li><a href="#usersdevansGNOME3stabledportsgnomegnomemapsfilespatchgeocluehandlenotavaildiff">users/devans/GNOME-3/stable/dports/gnome/gnome-maps/files/patch-geoclue-handle-not-avail.diff</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="usersdevansGNOME3stabledportsgnomegnomemapsPortfile"></a>
<div class="modfile"><h4>Modified: users/devans/GNOME-3/stable/dports/gnome/gnome-maps/Portfile (122609 => 122610)</h4>
<pre class="diff"><span>
<span class="info">--- users/devans/GNOME-3/stable/dports/gnome/gnome-maps/Portfile        2014-07-24 19:05:15 UTC (rev 122609)
+++ users/devans/GNOME-3/stable/dports/gnome/gnome-maps/Portfile        2014-07-24 19:11:01 UTC (rev 122610)
</span><span class="lines">@@ -37,6 +37,10 @@
</span><span class="cx"> depends_run port:gnome-settings-daemon \
</span><span class="cx"> port:yelp
</span><span class="cx">
</span><ins>+patchfiles patch-geoclue-handle-not-avail.diff \
+ patch-geoclue-add-connected.diff \
+ patch-disable-location-button.diff
+
</ins><span class="cx"> configure.args --disable-silent-rules
</span><span class="cx">
</span><span class="cx"> # update m4/intltool.m4 and autoreconf
</span></span></pre></div>
<a id="usersdevansGNOME3stabledportsgnomegnomemapsfilespatchdisablelocationbuttondiff"></a>
<div class="addfile"><h4>Added: users/devans/GNOME-3/stable/dports/gnome/gnome-maps/files/patch-disable-location-button.diff (0 => 122610)</h4>
<pre class="diff"><span>
<span class="info">--- users/devans/GNOME-3/stable/dports/gnome/gnome-maps/files/patch-disable-location-button.diff         (rev 0)
+++ users/devans/GNOME-3/stable/dports/gnome/gnome-maps/files/patch-disable-location-button.diff        2014-07-24 19:11:01 UTC (rev 122610)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+--- src/mainWindow.js.orig        2014-07-24 20:31:54.000000000 +0200
++++ src/mainWindow.js        2014-07-24 20:33:27.000000000 +0200
+@@ -25,6 +25,7 @@
+ const GLib = imports.gi.GLib;
+ const Gtk = imports.gi.Gtk;
+ const Champlain = imports.gi.Champlain;
++const GObject = imports.gi.GObject;
+
+ const Lang = imports.lang;
+ const Mainloop = imports.mainloop;
+@@ -137,6 +138,11 @@
+ signalHandlers: { activate: this._onGotoUserLocationActivate }
+ }
+ ], this);
++
++ let action = this.window.lookup_action('goto-user-location');
++ this.mapView.geoclue.bind_property('connected',
++ action, 'enabled',
++ GObject.BindingFlags.SYNC_CREATE);
+ },
+
+ _initSignals: function() {
</ins></span></pre></div>
<a id="usersdevansGNOME3stabledportsgnomegnomemapsfilespatchgeoclueaddconnecteddiff"></a>
<div class="addfile"><h4>Added: users/devans/GNOME-3/stable/dports/gnome/gnome-maps/files/patch-geoclue-add-connected.diff (0 => 122610)</h4>
<pre class="diff"><span>
<span class="info">--- users/devans/GNOME-3/stable/dports/gnome/gnome-maps/files/patch-geoclue-add-connected.diff         (rev 0)
+++ users/devans/GNOME-3/stable/dports/gnome/gnome-maps/files/patch-geoclue-add-connected.diff        2014-07-24 19:11:01 UTC (rev 122610)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+--- src/geoclue.js.orig1        2014-07-24 20:40:44.000000000 +0200
++++ src/geoclue.js        2014-07-24 20:40:52.000000000 +0200
+@@ -79,6 +79,18 @@
+
+ const Geoclue = new Lang.Class({
+ Name: 'Geoclue',
++ Extends: GObject.Object,
++ Properties: {
++ 'connected': GObject.ParamSpec.boolean('connected',
++ 'Connected',
++ 'Connected to DBus service',
++ GObject.ParamFlags.READABLE,
++ false)
++ },
++
++ get connected() {
++ return this._connected;
++ },
+
+ overrideLocation: function(location) {
+ if (this._clientProxy && this._locationUpdatedId > 0) {
+@@ -110,6 +122,9 @@
+ },
+
+ _init: function() {
++ this.parent();
++ this._connected = false;
++
+ let lastLocation = Application.settings.get('last-location');
+ if (lastLocation.length >= 3) {
+ let [lat, lng, accuracy] = lastLocation;
+@@ -149,6 +164,9 @@
+
+ if (!this.userSetLocation)
+ this.findLocation();
++
++ this._connected = true;
++ this.notify('connected');
+ },
+
+ _onLocationUpdated: function(proxy, sender, [oldPath, newPath]) {
</ins></span></pre></div>
<a id="usersdevansGNOME3stabledportsgnomegnomemapsfilespatchgeocluehandlenotavaildiff"></a>
<div class="addfile"><h4>Added: users/devans/GNOME-3/stable/dports/gnome/gnome-maps/files/patch-geoclue-handle-not-avail.diff (0 => 122610)</h4>
<pre class="diff"><span>
<span class="info">--- users/devans/GNOME-3/stable/dports/gnome/gnome-maps/files/patch-geoclue-handle-not-avail.diff         (rev 0)
+++ users/devans/GNOME-3/stable/dports/gnome/gnome-maps/files/patch-geoclue-handle-not-avail.diff        2014-07-24 19:11:01 UTC (rev 122610)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+--- src/geoclue.js.orig        2014-07-24 20:26:13.000000000 +0200
++++ src/geoclue.js        2014-07-24 20:27:24.000000000 +0200
+@@ -81,7 +81,7 @@
+ Name: 'Geoclue',
+
+ overrideLocation: function(location) {
+- if (this._locationUpdatedId > 0) {
++ if (this._clientProxy && this._locationUpdatedId > 0) {
+ this._clientProxy.disconnectSignal(this._locationUpdatedId);
+ this._locationUpdatedId = 0;
+ this._clientProxy.StopRemote(function(result, e) {
+@@ -95,6 +95,9 @@
+ },
+
+ findLocation: function() {
++ if (!this._clientProxy)
++ return;
++
+ this._locationUpdatedId =
+ this._clientProxy.connectSignal("LocationUpdated",
+ this._onLocationUpdated.bind(this));
+@@ -118,11 +121,16 @@
+ this.userSetLocation = Application.settings.get('last-location-user-set');
+ }
+
+- this._managerProxy = new ManagerProxy(Gio.DBus.system,
+- "org.freedesktop.GeoClue2",
+- "/org/freedesktop/GeoClue2/Manager");
+-
+- this._managerProxy.GetClientRemote(this._onGetClientReady.bind(this));
++ try {
++ this._managerProxy = new ManagerProxy(Gio.DBus.system,
++ "org.freedesktop.GeoClue2",
++ "/org/freedesktop/GeoClue2/Manager");
++
++ this._managerProxy.GetClientRemote(this._onGetClientReady.bind(this));
++ } catch (e) {
++ Utils.debug("Failed to connect to GeoClue2 service: " + e.message);
++ log('Connection with GeoClue failed, we are not able to find your location!');
++ }
+ },
+
+ _onGetClientReady: function(result, e) {
</ins></span></pre>
</div>
</div>
</body>
</html>