2022-12-06 14:44:30 +01:00
|
|
|
Index: gnome-control-center-43.1/panels/network/cc-network-panel.c
|
|
|
|
===================================================================
|
|
|
|
--- gnome-control-center-43.1.orig/panels/network/cc-network-panel.c
|
|
|
|
+++ gnome-control-center-43.1/panels/network/cc-network-panel.c
|
|
|
|
@@ -646,10 +646,24 @@ static void
|
2021-09-27 10:57:19 +02:00
|
|
|
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) {
|
2022-12-06 14:44:30 +01:00
|
|
|
GtkWidget *status_page;
|
2021-09-27 10:57:19 +02:00
|
|
|
|
2022-12-06 14:44:30 +01:00
|
|
|
status_page = adw_status_page_new ();
|
|
|
|
@@ -661,9 +675,23 @@ panel_check_network_manager_version (CcN
|
|
|
|
_("NetworkManager needs to be running to view or make "
|
|
|
|
"connections. Contact a system administrator or the "
|
|
|
|
"software vendor."));
|
2021-09-27 10:57:19 +02:00
|
|
|
+ } else if (version == NULL && g_strcmp0 (state, "active") == 0) {
|
2022-12-06 14:44:30 +01:00
|
|
|
+ GtkWidget *status_page;
|
2021-09-27 10:57:19 +02:00
|
|
|
+
|
2022-12-06 14:44:30 +01:00
|
|
|
+ status_page = adw_status_page_new ();
|
|
|
|
+ cc_panel_set_content (CC_PANEL (self), status_page);
|
2021-09-27 10:57:19 +02:00
|
|
|
+
|
2022-12-06 14:44:30 +01:00
|
|
|
+ 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."));
|
2021-09-27 10:57:19 +02:00
|
|
|
} else {
|
|
|
|
manager_running (self);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ g_object_unref (connection);
|
|
|
|
+ g_object_unref (proxy);
|
|
|
|
+ g_variant_unref (variant);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2022-12-06 14:44:30 +01:00
|
|
|
Index: gnome-control-center-43.1/panels/network/cc-wifi-panel.c
|
|
|
|
===================================================================
|
|
|
|
--- gnome-control-center-43.1.orig/panels/network/cc-wifi-panel.c
|
|
|
|
+++ gnome-control-center-43.1/panels/network/cc-wifi-panel.c
|
|
|
|
@@ -425,8 +425,8 @@ remove_wifi_device (CcWifiPanel *self,
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Disconnect the signal to prevent assertion crash */
|
|
|
|
- g_signal_handlers_disconnect_by_func (device,
|
|
|
|
- G_CALLBACK (wifi_panel_update_qr_image_cb),
|
|
|
|
+ g_signal_handlers_disconnect_by_func (device,
|
|
|
|
+ G_CALLBACK (wifi_panel_update_qr_image_cb),
|
|
|
|
self);
|
|
|
|
|
|
|
|
/* Destroy all stack pages related to this device */
|
|
|
|
@@ -444,21 +444,41 @@ static void
|
2021-09-27 10:57:19 +02:00
|
|
|
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 = cc_list_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
|
2022-12-06 14:44:30 +01:00
|
|
|
Index: gnome-control-center-43.1/panels/network/cc-wifi-panel.ui
|
|
|
|
===================================================================
|
|
|
|
--- gnome-control-center-43.1.orig/panels/network/cc-wifi-panel.ui
|
|
|
|
+++ gnome-control-center-43.1/panels/network/cc-wifi-panel.ui
|
|
|
|
@@ -311,6 +311,48 @@
|
|
|
|
</object>
|
2021-09-27 10:57:19 +02:00
|
|
|
</child>
|
2022-12-06 14:44:30 +01:00
|
|
|
|
2021-09-27 10:57:19 +02:00
|
|
|
+ <!-- "Wicked Running" page -->
|
|
|
|
+ <child>
|
|
|
|
+ <object class="GtkBox">
|
|
|
|
+ <property name="visible">True</property>
|
|
|
|
+ <property name="can_focus">False</property>
|
|
|
|
+ <property name="expand">True</property>
|
|
|
|
+ <property name="halign">center</property>
|
|
|
|
+ <property name="valign">center</property>
|
|
|
|
+ <property name="orientation">vertical</property>
|
|
|
|
+ <property name="margin">18</property>
|
|
|
|
+ <property name="spacing">18</property>
|
|
|
|
+ <child type="center">
|
|
|
|
+ <object class="GtkImage">
|
|
|
|
+ <property name="visible">True</property>
|
|
|
|
+ <property name="can_focus">False</property>
|
|
|
|
+ <property name="icon_name">face-sad-symbolic</property>
|
|
|
|
+ <property name="pixel_size">128</property>
|
|
|
|
+ <style>
|
|
|
|
+ <class name="dim-label" />
|
|
|
|
+ </style>
|
|
|
|
+ </object>
|
|
|
|
+ </child>
|
|
|
|
+ <child>
|
|
|
|
+ <object class="GtkLabel">
|
|
|
|
+ <property name="visible">True</property>
|
|
|
|
+ <property name="can_focus">False</property>
|
|
|
|
+ <property name="wrap">True</property>
|
|
|
|
+ <property name="label" translatable="yes">Please use YaST2 to configure your network.</property>
|
|
|
|
+ <attributes>
|
|
|
|
+ <attribute name="scale" value="1.42" />
|
|
|
|
+ </attributes>
|
|
|
|
+ </object>
|
|
|
|
+ <packing>
|
|
|
|
+ <property name="pack-type">end</property>
|
|
|
|
+ </packing>
|
|
|
|
+ </child>
|
|
|
|
+ </object>
|
|
|
|
+ <packing>
|
|
|
|
+ <property name="name">wicked-running</property>
|
|
|
|
+ </packing>
|
|
|
|
+ </child>
|
2022-12-06 14:44:30 +01:00
|
|
|
+
|
2021-09-27 10:57:19 +02:00
|
|
|
</object>
|
|
|
|
</child>
|
|
|
|
|
2022-12-06 14:44:30 +01:00
|
|
|
Index: gnome-control-center-43.1/tests/meson.build
|
|
|
|
===================================================================
|
|
|
|
--- gnome-control-center-43.1.orig/tests/meson.build
|
|
|
|
+++ gnome-control-center-43.1/tests/meson.build
|
2021-09-27 10:57:19 +02:00
|
|
|
@@ -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
|
|
|
|
|
|
|
|
subdir('interactive-panels')
|
|
|
|
|