diff --git a/data/io.elementary.appcenter.gschema.xml b/data/io.elementary.appcenter.gschema.xml
index 3cdcfd417..88ca0292f 100644
--- a/data/io.elementary.appcenter.gschema.xml
+++ b/data/io.elementary.appcenter.gschema.xml
@@ -31,11 +31,6 @@
List of package names of drivers that may be required
Speeds up loading of updates view by remembering which drivers may be required
-
- true
- Display warning for non-curated apps
- Whether to display a warning dialog when attempting to install apps are not from a curated source
-
0
Unix UTC time of last cache refresh
diff --git a/po/POTFILES b/po/POTFILES
index 9211ef712..baf2118be 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -17,7 +17,6 @@ src/Core/Task.vala
src/Core/UbuntuDriversBackend.vala
src/Core/UpdateManager.vala
src/Dialogs/InstallFailDialog.vala
-src/Dialogs/NonCuratedWarningDialog.vala
src/Dialogs/StripeDialog.vala
src/Dialogs/UninstallConfirmDialog.vala
src/Dialogs/UninstallFailDialog.vala
diff --git a/src/Dialogs/NonCuratedWarningDialog.vala b/src/Dialogs/NonCuratedWarningDialog.vala
deleted file mode 100644
index f26778955..000000000
--- a/src/Dialogs/NonCuratedWarningDialog.vala
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2019 elementary, Inc. (https://elementary.io)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-public class AppCenter.Widgets.NonCuratedWarningDialog : Granite.MessageDialog {
- public string app_name { get; construct set; }
-
- private static Gtk.CssProvider provider;
-
- public NonCuratedWarningDialog (string _app_name) {
- Object (
- app_name: _app_name,
- image_icon: new ThemedIcon ("security-low"),
- title: _("Non-Curated Warning")
- );
- }
-
- static construct {
- provider = new Gtk.CssProvider ();
- provider.load_from_resource ("io/elementary/appcenter/NonCuratedWarningDialog.css");
- }
-
- construct {
- primary_text = _("Install non-curated app?");
- secondary_text = _("“%s” is not curated by elementary and has not been reviewed for security, privacy, or system integration.").printf (app_name);
-
- var updates_icon = new Gtk.Image.from_icon_name ("system-software-update-symbolic", Gtk.IconSize.BUTTON);
- updates_icon.valign = Gtk.Align.START;
-
- unowned Gtk.StyleContext updates_context = updates_icon.get_style_context ();
- updates_context.add_class ("updates");
- updates_context.add_provider (provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
-
- var updates_label = new Gtk.Label (_("It may not receive bug fix or feature updates"));
- updates_label.selectable = true;
- updates_label.max_width_chars = 50;
- updates_label.wrap = true;
- updates_label.xalign = 0;
-
- var unsandboxed_icon = new Gtk.Image.from_icon_name ("security-low-symbolic", Gtk.IconSize.BUTTON);
- unsandboxed_icon.valign = Gtk.Align.START;
-
- unowned Gtk.StyleContext unsandboxed_context = unsandboxed_icon.get_style_context ();
- unsandboxed_context.add_class ("unsandboxed");
- unsandboxed_context.add_provider (provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
-
- var unsandboxed_label = new Gtk.Label (_("It may access or change system or personal files without permission"));
- unsandboxed_label.selectable = true;
- unsandboxed_label.max_width_chars = 50;
- unsandboxed_label.wrap = true;
- unsandboxed_label.xalign = 0;
-
- var check = new Gtk.CheckButton.with_label (_("Show non-curated warnings"));
- check.margin_top = 12;
-
- var details_grid = new Gtk.Grid ();
- details_grid.orientation = Gtk.Orientation.VERTICAL;
- details_grid.column_spacing = 6;
- details_grid.row_spacing = 12;
- details_grid.attach (updates_icon, 0, 0);
- details_grid.attach (updates_label, 1, 0);
- details_grid.attach (unsandboxed_icon, 0, 1);
- details_grid.attach (unsandboxed_label, 1, 1);
- details_grid.attach (check, 0, 2, 2);
-
- App.settings.bind ("non-curated-warning", check, "active", SettingsBindFlags.DEFAULT);
-
- add_button (_("Don’t Install"), Gtk.ResponseType.CANCEL);
- var install = add_button (_("Install Anyway"), Gtk.ResponseType.OK);
-
- custom_bin.add (details_grid);
- custom_bin.show_all ();
-
- check.grab_focus ();
- }
-}
diff --git a/src/Widgets/AppContainers/AbstractAppContainer.vala b/src/Widgets/AppContainers/AbstractAppContainer.vala
index 3b30b4b7c..6c94aed61 100644
--- a/src/Widgets/AppContainers/AbstractAppContainer.vala
+++ b/src/Widgets/AppContainers/AbstractAppContainer.vala
@@ -55,15 +55,11 @@ namespace AppCenter {
action_button_revealer.add (action_button);
action_button.download_requested.connect (() => {
- if (install_approved ()) {
- action_clicked.begin ();
- }
+ action_clicked.begin ();
});
action_button.payment_requested.connect ((amount) => {
- if (install_approved ()) {
- show_stripe_dialog (amount);
- }
+ show_stripe_dialog (amount);
});
uninstall_button = new Gtk.Button.with_label (_("Uninstall")) {
@@ -347,49 +343,5 @@ namespace AppCenter {
}
});
}
-
- private bool install_approved () {
- bool approved = true;
-#if CURATED
- var curated_dialog_allowed = App.settings.get_boolean ("non-curated-warning");
- var app_installed = package.state != AppCenterCore.Package.State.NOT_INSTALLED;
- var app_curated = package.is_native || package.is_os_updates;
-
- // Only show the curated dialog if the user has left them enabled, the app isn't installed
- // and it isn't a curated app
- if (curated_dialog_allowed && !app_installed && !app_curated) {
- approved = false;
-
- var non_curated_warning = new Widgets.NonCuratedWarningDialog (package.get_name ());
- non_curated_warning.transient_for = (Gtk.Window) get_toplevel ();
-
- non_curated_warning.response.connect ((response_id) => {
- switch (response_id) {
- case Gtk.ResponseType.OK:
- approved = true;
- break;
- case Gtk.ResponseType.CANCEL:
- case Gtk.ResponseType.CLOSE:
- case Gtk.ResponseType.DELETE_EVENT:
- approved = false;
- break;
- default:
- assert_not_reached ();
- }
-
- non_curated_warning.close ();
- });
-
- non_curated_warning.run ();
- non_curated_warning.destroy ();
-
- // If the install has been rejected at this stage, return early
- if (!approved) {
- return false;
- }
- }
-#endif
- return approved;
- }
}
}
diff --git a/src/meson.build b/src/meson.build
index 767fb5d1f..73494e05c 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -18,7 +18,6 @@ appcenter_files = files(
'Core/UbuntuDriversBackend.vala',
'Core/UpdateManager.vala',
'Dialogs/InstallFailDialog.vala',
- 'Dialogs/NonCuratedWarningDialog.vala',
'Dialogs/StripeDialog.vala',
'Dialogs/UninstallConfirmDialog.vala',
'Dialogs/UninstallFailDialog.vala',