Merge lp:~abreu-alexandre/unity-webapps-gmail/revert-migration-step into lp:unity-webapps-gmail

Proposed by Alexandre Abreu
Status: Merged
Approved by: Robert Bruce Park
Approved revision: 68
Merged at revision: 69
Proposed branch: lp:~abreu-alexandre/unity-webapps-gmail/revert-migration-step
Merge into: lp:unity-webapps-gmail
Diff against target: 68 lines (+1/-44)
4 files modified
GMailmailgooglecom.desktop (+0/-8)
debian/install (+1/-1)
debian/unity-webapps-gmail.migrations (+0/-1)
scripts/update-desktop-file-exec-line.py (+0/-34)
To merge this branch: bzr merge lp:~abreu-alexandre/unity-webapps-gmail/revert-migration-step
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Robert Bruce Park (community) Approve
Review via email: mp+185910@code.launchpad.net

Commit message

Revert migration steps & desktop file

Description of the change

evert migration steps & desktop file

To post a comment you must log in.
Revision history for this message
Robert Bruce Park (robru) wrote :

Absolutely perfect, just don't forget googleplus this time ;-)

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'GMailmailgooglecom.desktop'
2--- GMailmailgooglecom.desktop 2013-09-12 13:04:34 +0000
3+++ GMailmailgooglecom.desktop 1970-01-01 00:00:00 +0000
4@@ -1,8 +0,0 @@
5-[Desktop Entry]
6-Name=GMail
7-Type=Application
8-Icon=unity-webapps-gmail
9-MimeType=
10-Actions=S0;S1;S2;S3;S4;S5;S6;S7;S8;S9;S10;
11-Exec=webbrowser-app --chromeless --webapp='R01haWw=' --app-id='GMailmailgooglecom' %u
12-
13\ No newline at end of file
14
15=== modified file 'debian/install'
16--- debian/install 2013-09-11 14:48:34 +0000
17+++ debian/install 2013-09-16 19:25:19 +0000
18@@ -5,4 +5,4 @@
19 52/unity-webapps-gmail.png usr/share/icons/unity-webapps-applications/52/apps
20 64/unity-webapps-gmail.png usr/share/icons/unity-webapps-applications/64/apps
21 manifest.json usr/share/unity-webapps/userscripts/unity-webapps-gmail
22-GMailmailgooglecom.desktop usr/share/applications
23+
24
25=== removed file 'debian/unity-webapps-gmail.migrations'
26--- debian/unity-webapps-gmail.migrations 2013-09-11 21:36:16 +0000
27+++ debian/unity-webapps-gmail.migrations 1970-01-01 00:00:00 +0000
28@@ -1,1 +0,0 @@
29-scripts/update-desktop-file-exec-line.py
30
31=== removed file 'scripts/update-desktop-file-exec-line.py'
32--- scripts/update-desktop-file-exec-line.py 2013-09-12 13:04:34 +0000
33+++ scripts/update-desktop-file-exec-line.py 1970-01-01 00:00:00 +0000
34@@ -1,34 +0,0 @@
35-#!/usr/bin/python
36-from gi.repository import Gio
37-import os
38-import glib
39-import glob
40-import re
41-
42-APP_ID = 'GMailmailgooglecom'
43-
44-def get_local_applications_path():
45- return os.path.join(glib.get_user_data_dir(), 'applications')
46-
47-def update_desktop_file_exec_line():
48- local_applications_path = get_local_applications_path()
49- if not os.path.exists(local_applications_path) or not os.path.isdir(local_applications_path):
50- return
51-
52- desktop_filename = os.path.join(local_applications_path, '{0}.desktop'.format(APP_ID))
53- if not os.path.exists(desktop_filename) or not os.path.isfile(desktop_filename):
54- return
55-
56- try:
57- desktop_file_content = open(desktop_filename).read()
58- if desktop_file_content.find('unity-webapps-runner') != -1:
59- updated_desktop_file_content = re.sub(r"Exec\s*=\s*unity-webapps-runner\s*-n\s*'([^\s]*)'.*%u",
60- r"Exec=webbrowser-app --chromeless --webapp='\1' --app-id='{0}'".format(APP_ID),
61- desktop_file_content)
62- open(desktop_filename, "w+").write(updated_desktop_file_content)
63- except Exception, e:
64- print 'Error while upgrading the desktop file: ', str(e)
65-
66-if __name__ == "__main__":
67- update_desktop_file_exec_line()
68-

Subscribers

People subscribed via source and target branches

to all changes: