diff -uraBN temp/gnome-control-center-45.1/panels/network/cc-network-panel.c gnome-control-center-45.1/panels/network/cc-network-panel.c --- temp/gnome-control-center-45.1/panels/network/cc-network-panel.c 2023-10-27 14:56:16.289319792 +0800 +++ gnome-control-center-45.1/panels/network/cc-network-panel.c 2023-10-27 15:42:47.030395835 +0800 @@ -653,10 +653,24 @@ panel_check_network_manager_version (CcNetworkPanel *self) { const gchar *version; + const gchar *state; + GDBusConnection *connection; + GDBusProxy *proxy; + GVariant *variant; + + connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); + proxy = g_dbus_proxy_new_sync (connection, G_DBUS_PROXY_FLAGS_NONE, + NULL, + "org.freedesktop.systemd1", + "/org/freedesktop/systemd1/unit/wickedd_2ddhcp6_2eservice", + "org.freedesktop.systemd1.Unit", + NULL, NULL); + variant = g_dbus_proxy_get_cached_property (proxy, "ActiveState"); + state = g_variant_get_string (variant, NULL); /* parse running version */ version = nm_client_get_version (self->client); - if (version == NULL) { + if (version == NULL && g_strcmp0 (state, "inactive") == 0) { GtkWidget *status_page; status_page = adw_status_page_new (); @@ -667,10 +681,23 @@ adw_status_page_set_description (ADW_STATUS_PAGE (status_page), _("An error has occurred and network cannot be used." "\n Error details: NetworkManager not running.")); + } else if (version == NULL && g_strcmp0 (state, "active") == 0) { + GtkWidget *status_page; + + status_page = adw_status_page_new (); + adw_toolbar_view_set_content (ADW_TOOLBAR_VIEW (self->toolbar_view), status_page); + adw_status_page_set_icon_name (ADW_STATUS_PAGE (status_page), "network-error-symbolic"); + adw_status_page_set_title (ADW_STATUS_PAGE (status_page), _("Wicked is running")); + adw_status_page_set_description (ADW_STATUS_PAGE (status_page), + _("Please use YaST2 to configure your network.")); } else { manager_running (self); } + + g_object_unref (connection); + g_object_unref (proxy); + g_variant_unref (variant); } static void diff -uraBN temp/gnome-control-center-45.1/panels/network/cc-wifi-panel.c gnome-control-center-45.1/panels/network/cc-wifi-panel.c --- temp/gnome-control-center-45.1/panels/network/cc-wifi-panel.c 2023-10-27 14:56:16.292653165 +0800 +++ gnome-control-center-45.1/panels/network/cc-wifi-panel.c 2023-10-27 15:05:30.805703042 +0800 @@ -298,21 +298,41 @@ check_main_stack_page (CcWifiPanel *self) { const gchar *nm_version; + const gchar *state; gboolean airplane_mode_active; gboolean wireless_enabled; + GDBusConnection *connection; + GDBusProxy *proxy; + GVariant *variant; + + connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); + proxy = g_dbus_proxy_new_sync (connection, G_DBUS_PROXY_FLAGS_NONE, + NULL, + "org.freedesktop.systemd1", + "/org/freedesktop/systemd1/unit/wickedd_2ddhcp6_2eservice", + "org.freedesktop.systemd1.Unit", + NULL, NULL); + variant = g_dbus_proxy_get_cached_property (proxy, "ActiveState"); + state = g_variant_get_string (variant, NULL); nm_version = nm_client_get_version (self->client); wireless_enabled = nm_client_wireless_get_enabled (self->client); airplane_mode_active = adw_switch_row_get_active (self->rfkill_row); - if (!nm_version) + if (!nm_version && g_strcmp0 (state, "inactive") == 0) gtk_stack_set_visible_child_name (self->main_stack, "nm-not-running"); + else if (!nm_version && g_strcmp0 (state, "active") == 0) + gtk_stack_set_visible_child_name (self->main_stack, "wicked-running"); else if (!wireless_enabled && airplane_mode_active) gtk_stack_set_visible_child_name (self->main_stack, "airplane-mode"); else if (!wireless_enabled || self->devices->len == 0) gtk_stack_set_visible_child_name (self->main_stack, "no-wifi-devices"); else gtk_stack_set_visible_child_name (self->main_stack, "wifi-connections"); + + g_object_unref (connection); + g_object_unref (proxy); + g_variant_unref (variant); } static void diff -uraBN temp/gnome-control-center-45.1/panels/network/cc-wifi-panel.ui gnome-control-center-45.1/panels/network/cc-wifi-panel.ui --- temp/gnome-control-center-45.1/panels/network/cc-wifi-panel.ui 2023-10-27 14:56:16.292653165 +0800 +++ gnome-control-center-45.1/panels/network/cc-wifi-panel.ui 2023-10-27 14:49:00.914031545 +0800 @@ -197,6 +197,51 @@ + + + + + wicked-running + + + True + True + True + False + center + center + vertical + 18 + 18 + 18 + 18 + + + True + False + face-sad-symbolic + 128 + + + + + + True + False + True + Please use YaST2 to configure your network. + + + + + + + + + + diff -uraBN temp/gnome-control-center-45.1/tests/meson.build gnome-control-center-45.1/tests/meson.build --- temp/gnome-control-center-45.1/tests/meson.build 2023-10-27 14:56:16.545989479 +0800 +++ gnome-control-center-45.1/tests/meson.build 2023-10-27 14:49:56.034724339 +0800 @@ -1,8 +1,11 @@ subdir('common') #subdir('datetime') +# Disable tests for network panel, boo#1128195 +if false if host_is_linux subdir('network') endif +endif # FIXME: this is a workaround because interactive-tests don't work with libadwaita as a subproject. See !1754 if not libadwaita_is_subproject