Merge lp:~cando/zeitgeist-datasources/fix_chromium into lp:zeitgeist-datasources/0.8

Proposed by Stefano Candori
Status: Merged
Merge reported by: Michal Hruby
Merged at revision: not available
Proposed branch: lp:~cando/zeitgeist-datasources/fix_chromium
Merge into: lp:zeitgeist-datasources/0.8
Diff against target: 50 lines (+9/-4)
2 files modified
bzr/__init__.py (+6/-3)
chrome/zeitgeist.js (+3/-1)
To merge this branch: bzr merge lp:~cando/zeitgeist-datasources/fix_chromium
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
Review via email: mp+45599@code.launchpad.net

Description of the change

In this branch i've added a control on the browser name. Doing that we can put the right actor-name ( and so the right desktop-file) in the event.actor field.
Fx doing that GAJ shows web-events with the right Chromium icon.

To post a comment you must log in.
Revision history for this message
Stefano Candori (cando) wrote :

well...in this diff there is also the other bzr merge proposal....sorry

Revision history for this message
Michal Hruby (mhr3) wrote :

The Chromium fix is good, merging only that...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzr/__init__.py'
2--- bzr/__init__.py 2010-11-01 16:32:39 +0000
3+++ bzr/__init__.py 2011-01-08 11:09:00 +0000
4@@ -17,7 +17,7 @@
5 # You should have received a copy of the GNU Lesser General Public License
6 # along with this program. If not, see <http://www.gnu.org/licenses/>.
7
8-"""Post-commit hook to submit the commit to Zeitgeist (http://www.zeitgeist-project.com)
9+"""Post-commit and post-pull hook to submit the commit to Zeitgeist (http://www.zeitgeist-project.com)
10
11 Requires bzr 0.15 or higher.
12
13@@ -63,8 +63,9 @@
14 _text += str(new_revno) + "\n"
15 _text += revision.message.rstrip()
16
17+ uri = master.base + "#revision=" + str(new_revno)
18 subject = Subject.new_for_values(
19- uri=unicode(master.base),
20+ uri=unicode(uri),
21 interpretation=unicode(Interpretation.FOLDER),
22 manifestation=unicode(Manifestation.FILE_DATA_OBJECT),
23 text=unicode(_text),
24@@ -88,8 +89,10 @@
25 _text += (" to revision ")
26 _text += str(master.revno())+":\n"
27 _text += revision.get_summary()
28+
29+ uri = master.base + "#revision=" + str(master.revno())
30 subject = Subject.new_for_values(
31- uri=unicode(master.base),
32+ uri=unicode(uri),
33 interpretation=unicode(Interpretation.FOLDER),
34 manifestation=unicode(Manifestation.FILE_DATA_OBJECT),
35 text=unicode(_text),
36
37=== modified file 'chrome/zeitgeist.js'
38--- chrome/zeitgeist.js 2010-11-25 16:26:14 +0000
39+++ chrome/zeitgeist.js 2011-01-08 11:09:00 +0000
40@@ -46,7 +46,9 @@
41 sendAccessEvent(request);
42 }
43
44-plugin.setActor("application://google-chrome.desktop");
45+var is_chromium = /chromium/.test( navigator.userAgent.toLowerCase() );
46+if (!is_chromium) plugin.setActor("application://google-chrome.desktop");
47+else plugin.setActor("application://chromium-browser.desktop");
48
49 //chrome.extension.onConnect.addListener (onExtensionConnect);
50 chrome.extension.onRequest.addListener (onExtensionRequest);

Subscribers

People subscribed via source and target branches