2019-05-09 22:27:28 +02:00
|
|
|
Index: gnome-control-center-3.32.1/panels/network/cc-network-panel.c
|
2017-10-09 20:17:01 +02:00
|
|
|
===================================================================
|
2019-05-09 22:27:28 +02:00
|
|
|
--- gnome-control-center-3.32.1.orig/panels/network/cc-network-panel.c
|
|
|
|
+++ gnome-control-center-3.32.1/panels/network/cc-network-panel.c
|
|
|
|
@@ -775,10 +775,24 @@ panel_check_network_manager_version (CcN
|
2016-08-03 11:06:23 +02:00
|
|
|
GtkWidget *label;
|
|
|
|
gchar *markup;
|
|
|
|
const gchar *version;
|
|
|
|
+ const gchar *state;
|
|
|
|
+ GDBusConnection *connection;
|
|
|
|
+ GDBusProxy *proxy;
|
|
|
|
+ GVariant *variant;
|
|
|
|
+
|
|
|
|
+ connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
|
2017-10-09 20:17:01 +02:00
|
|
|
+ proxy = g_dbus_proxy_new_sync (connection, G_DBUS_PROXY_FLAGS_NONE,
|
|
|
|
+ NULL,
|
2016-08-03 11:06:23 +02:00
|
|
|
+ "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 */
|
2017-08-31 09:41:33 +02:00
|
|
|
version = nm_client_get_version (panel->client);
|
2016-08-03 11:06:23 +02:00
|
|
|
- if (version == NULL) {
|
|
|
|
+ if (version == NULL && g_strcmp0 (state, "inactive") == 0) {
|
|
|
|
gtk_container_remove (GTK_CONTAINER (panel), gtk_bin_get_child (GTK_BIN (panel)));
|
|
|
|
|
|
|
|
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 20);
|
2019-05-09 22:27:28 +02:00
|
|
|
@@ -801,9 +815,27 @@ panel_check_network_manager_version (CcN
|
2016-08-03 11:06:23 +02:00
|
|
|
|
|
|
|
gtk_widget_show_all (box);
|
|
|
|
g_free (markup);
|
2019-05-09 22:27:28 +02:00
|
|
|
+ } else if (version == NULL && g_strcmp0 (state, "active") == 0) {
|
2017-10-09 20:17:01 +02:00
|
|
|
+ gtk_container_remove (GTK_CONTAINER (panel), gtk_bin_get_child (GTK_BIN (panel)));
|
|
|
|
+
|
|
|
|
+ box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 20);
|
|
|
|
+ gtk_box_set_homogeneous (GTK_BOX (box), TRUE);
|
|
|
|
+ gtk_widget_set_vexpand (box, TRUE);
|
|
|
|
+ gtk_container_add (GTK_CONTAINER (panel), box);
|
|
|
|
+
|
|
|
|
+ label = gtk_label_new (_("Please use YaST2 to configure your network."));
|
|
|
|
+ gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
|
|
|
+ gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
|
|
|
|
+ gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0);
|
|
|
|
+
|
|
|
|
+ gtk_widget_show_all (box);
|
2016-08-03 11:06:23 +02:00
|
|
|
} else {
|
2017-08-31 09:41:33 +02:00
|
|
|
manager_running (panel->client, NULL, panel);
|
2016-08-03 11:06:23 +02:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ g_object_unref (connection);
|
|
|
|
+ g_object_unref (proxy);
|
|
|
|
+ g_variant_unref (variant);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2019-05-09 22:27:28 +02:00
|
|
|
Index: gnome-control-center-3.32.1/panels/network/cc-wifi-panel.c
|
2017-10-09 20:17:01 +02:00
|
|
|
===================================================================
|
2019-05-09 22:27:28 +02:00
|
|
|
--- gnome-control-center-3.32.1.orig/panels/network/cc-wifi-panel.c
|
|
|
|
+++ gnome-control-center-3.32.1/panels/network/cc-wifi-panel.c
|
2019-03-22 17:51:49 +01:00
|
|
|
@@ -183,21 +183,41 @@ static void
|
2017-10-09 20:17:01 +02:00
|
|
|
check_main_stack_page (CcWifiPanel *self)
|
|
|
|
{
|
|
|
|
const gchar *nm_version;
|
|
|
|
+ const gchar *state;
|
2019-03-22 17:51:49 +01:00
|
|
|
gboolean airplane_mode_active;
|
|
|
|
gboolean wireless_enabled;
|
2017-10-09 20:17:01 +02:00
|
|
|
+ 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);
|
2017-08-31 09:41:33 +02:00
|
|
|
|
2017-10-09 20:17:01 +02:00
|
|
|
nm_version = nm_client_get_version (self->client);
|
2019-03-22 17:51:49 +01:00
|
|
|
wireless_enabled = nm_client_wireless_get_enabled (self->client);
|
|
|
|
airplane_mode_active = gtk_switch_get_active (self->rfkill_switch);
|
2017-08-31 09:41:33 +02:00
|
|
|
|
2017-10-09 20:17:01 +02:00
|
|
|
- if (!nm_version)
|
|
|
|
+ if (!nm_version && g_strcmp0 (state, "inactive") == 0)
|
|
|
|
gtk_stack_set_visible_child_name (self->main_stack, "nm-not-running");
|
2019-05-09 22:27:28 +02:00
|
|
|
+ else if (!nm_version && g_strcmp0 (state, "active") == 0)
|
2017-10-09 20:17:01 +02:00
|
|
|
+ gtk_stack_set_visible_child_name (self->main_stack, "wicked-running");
|
2019-03-22 17:51:49 +01:00
|
|
|
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)
|
2017-10-09 20:17:01 +02:00
|
|
|
gtk_stack_set_visible_child_name (self->main_stack, "no-wifi-devices");
|
|
|
|
else
|
|
|
|
gtk_stack_set_visible_child_name (self->main_stack, "wifi-connections");
|
2019-03-22 17:51:49 +01:00
|
|
|
+
|
2017-10-09 20:17:01 +02:00
|
|
|
+ g_object_unref (connection);
|
|
|
|
+ g_object_unref (proxy);
|
|
|
|
+ g_variant_unref (variant);
|
2017-08-31 09:41:33 +02:00
|
|
|
}
|
2017-10-09 20:17:01 +02:00
|
|
|
|
|
|
|
static void
|
2019-05-09 22:27:28 +02:00
|
|
|
Index: gnome-control-center-3.32.1/panels/network/cc-wifi-panel.ui
|
2017-10-09 20:17:01 +02:00
|
|
|
===================================================================
|
2019-05-09 22:27:28 +02:00
|
|
|
--- gnome-control-center-3.32.1.orig/panels/network/cc-wifi-panel.ui
|
|
|
|
+++ gnome-control-center-3.32.1/panels/network/cc-wifi-panel.ui
|
2019-04-18 15:32:23 +02:00
|
|
|
@@ -315,6 +315,48 @@
|
2019-03-22 17:51:49 +01:00
|
|
|
<property name="name">nm-not-running</property>
|
|
|
|
</packing>
|
|
|
|
</child>
|
2017-10-09 20:17:01 +02:00
|
|
|
+
|
2019-03-22 17:51:49 +01: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>
|
|
|
|
</object>
|
|
|
|
</child>
|
|
|
|
|
2019-05-09 22:27:28 +02:00
|
|
|
Index: gnome-control-center-3.32.1/tests/meson.build
|
2019-04-18 15:32:23 +02:00
|
|
|
===================================================================
|
2019-05-09 22:27:28 +02:00
|
|
|
--- gnome-control-center-3.32.1.orig/tests/meson.build
|
|
|
|
+++ gnome-control-center-3.32.1/tests/meson.build
|
2019-04-18 15:32:23 +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')
|
|
|
|
|