Merge lp:~stolowski/unity-lens-applications/no-uninstall-for-ubuntu-desktop into lp:unity-lens-applications

Proposed by Paweł Stołowski on 2012-09-17
Status: Merged
Approved by: Neil J. Patel on 2012-09-17
Approved revision: 298
Merged at revision: 301
Proposed branch: lp:~stolowski/unity-lens-applications/no-uninstall-for-ubuntu-desktop
Merge into: lp:unity-lens-applications
Diff against target: 38 lines (+8/-3)
2 files modified
src/daemon.vala (+6/-3)
src/software-center-data-provider.vala (+2/-0)
To merge this branch: bzr merge lp:~stolowski/unity-lens-applications/no-uninstall-for-ubuntu-desktop
Reviewer Review Type Date Requested Status
Neil J. Patel (community) 2012-09-17 Approve on 2012-09-17
Review via email: mp+124740@code.launchpad.net

Commit message

Don't show 'Uninstall' button for critical apps (i.e. the ones that depend on ubuntu-desktop).
Requires lp:~mvo/software-center/dataprovider-desktop-dependency-property branch.

Description of the change

Don't show 'Uninstall' button for critical apps (i.e. the ones that depend on ubuntu-desktop).
Requires lp:~mvo/software-center/dataprovider-desktop-dependency-property branch.

To post a comment you must log in.
Neil J. Patel (njpatel) wrote :

"Works for me!" (c) Kamstrup

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/daemon.vala'
2--- src/daemon.vala 2012-09-13 17:12:02 +0000
3+++ src/daemon.vala 2012-09-17 16:46:21 +0000
4@@ -1247,9 +1247,12 @@
5 preview.add_info (new InfoHint ("date-installed", _("Installed on"), null, sc_data_provider.installation_date));
6 var launch_action = new Unity.PreviewAction ("launch", _("Launch"), null);
7 preview.add_action (launch_action);
8- var uninstall_action = new Unity.PreviewAction ("uninstall", _("Uninstall"), null);
9- uninstall_action.activated.connect (app_preview_uninstall);
10- preview.add_action (uninstall_action);
11+ if (!sc_data_provider.is_desktop_dependency)
12+ {
13+ var uninstall_action = new Unity.PreviewAction ("uninstall", _("Uninstall"), null);
14+ uninstall_action.activated.connect (app_preview_uninstall);
15+ preview.add_action (uninstall_action);
16+ }
17 }
18
19 preview_installable_desktop_file = sc_data_provider.desktop_file;
20
21=== modified file 'src/software-center-data-provider.vala'
22--- src/software-center-data-provider.vala 2012-09-06 08:11:17 +0000
23+++ src/software-center-data-provider.vala 2012-09-17 16:46:21 +0000
24@@ -52,6 +52,7 @@
25 public string website { get; set; }
26 public int64 size { get; set; }
27 public string hardware_requirements { get; set; }
28+ public bool is_desktop_dependency { get; set; }
29
30 public SoftwareCenterDataProviderProxy ()
31 {
32@@ -88,6 +89,7 @@
33 website = data["website"].get_string ();
34 hardware_requirements = data["hardware_requirements"].get_string ();
35 size = int64.parse (data["size"].get_string ());
36+ is_desktop_dependency = data["is_desktop_dependency"].get_boolean ();
37
38 var state = data["pkg_state"].get_string ();
39

Subscribers

People subscribed via source and target branches