Merge lp:~bregma/libertine/list-app-desktop-file into lp:libertine

Proposed by Stephen M. Webb
Status: Merged
Approved by: Christopher Townsend
Approved revision: 154
Merged at revision: 154
Proposed branch: lp:~bregma/libertine/list-app-desktop-file
Merge into: lp:libertine
Diff against target: 29 lines (+4/-2)
1 file modified
python/libertine/AppDiscovery.py (+4/-2)
To merge this branch: bzr merge lp:~bregma/libertine/list-app-desktop-file
Reviewer Review Type Date Requested Status
Christopher Townsend Approve
Libertine CI Bot continuous-integration Approve
Review via email: mp+281535@code.launchpad.net

Commit message

libertine-container-manager: added .desktop file name when listing contained app launchers

Description of the change

Added the actual .desktop file to the information returned when listin app launchers from libertine-container-manager.

To post a comment you must log in.
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

Seems reasonable.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'python/libertine/AppDiscovery.py'
2--- python/libertine/AppDiscovery.py 2015-12-22 04:20:05 +0000
3+++ python/libertine/AppDiscovery.py 2016-01-04 17:43:32 +0000
4@@ -126,7 +126,8 @@
5
6 class AppInfo(object):
7
8- def __init__(self, config_entry, icon_cache):
9+ def __init__(self, desktop_file_name, config_entry, icon_cache):
10+ self.desktop_file_name = desktop_file_name
11 self.name = config_entry.get('Name')
12 if not self.name:
13 raise RuntimeError("required Name attribute is missing")
14@@ -141,6 +142,7 @@
15 def __str__(self):
16 with io.StringIO() as ostr:
17 print(self.name, file=ostr)
18+ print(" desktop_file={}".format(self.desktop_file_name), file=ostr)
19 print(" no-display={}".format(self.no_display), file=ostr)
20 print(" exec='{}'".format(self.exec_line), file=ostr)
21 for icon in self.icons:
22@@ -184,7 +186,7 @@
23 desktop_file.read(desktop_file_name)
24 desktop_entry = desktop_file['Desktop Entry']
25 if desktop_file_is_showable(desktop_entry):
26- yield AppInfo(desktop_entry, icon_cache)
27+ yield AppInfo(desktop_file_name, desktop_entry, icon_cache)
28 except Exception as ex:
29 print("error processing {}: {}".format(desktop_file_name, ex), file=sys.stderr)
30

Subscribers

People subscribed via source and target branches