diff --git a/po/POTFILES b/po/POTFILES index 144c810d..3b68c7fc 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -6,6 +6,7 @@ src/Views/AppCenterView.vala src/Views/EarlyAccessView.vala src/Views/FinishView.vala src/Views/HouseKeepingView.vala +src/Views/NetworkView.vala src/Views/NightLightView.vala src/Views/OnlineAccountsView.vala src/Views/StyleView.vala diff --git a/src/MainWindow.vala b/src/MainWindow.vala index ca708b49..ddf5e795 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -71,6 +71,11 @@ public class Onboarding.MainWindow : Hdy.ApplicationWindow { var housekeeping_view = new HouseKeepingView (); carousel.add (housekeeping_view); + if (!NetworkMonitor.get_default ().get_network_available ()) { + var network_view = new NetworkView (); + carousel.add (network_view); + } + var onlineaccounts_view = new OnlineAccountsView (); carousel.add (onlineaccounts_view); diff --git a/src/Views/NetworkView.vala b/src/Views/NetworkView.vala new file mode 100644 index 00000000..70ec6533 --- /dev/null +++ b/src/Views/NetworkView.vala @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2021 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 . + * + * Authored by: Marius Meisenzahl + */ + +public class Onboarding.NetworkView : AbstractOnboardingView { + public NetworkView () { + Object ( + view_name: "network", + description: _("Manage network devices and connectivity."), + icon_name: "preferences-system-network", + title: _("Network") + ); + } + + construct { + var settings_link = new Gtk.LinkButton.with_label ("settings://network", _("Manage network devices…")); + + custom_bin.add (settings_link); + } +} diff --git a/src/meson.build b/src/meson.build index bd1b1330..a25d9f60 100644 --- a/src/meson.build +++ b/src/meson.build @@ -11,6 +11,7 @@ vala_files = [ 'Views/EarlyAccessView.vala', 'Views/FinishView.vala', 'Views/HouseKeepingView.vala', + 'Views/NetworkView.vala', 'Views/NightLightView.vala', 'Views/OnlineAccountsView.vala', 'Views/StyleView.vala',