diff --git a/gnome-control-center-disable-error-message-for-NM.patch b/gnome-control-center-disable-error-message-for-NM.patch new file mode 100644 index 0000000..8c3639c --- /dev/null +++ b/gnome-control-center-disable-error-message-for-NM.patch @@ -0,0 +1,76 @@ +Index: gnome-control-center-3.20.1/panels/network/cc-network-panel.c +=================================================================== +--- gnome-control-center-3.20.1.orig/panels/network/cc-network-panel.c ++++ gnome-control-center-3.20.1/panels/network/cc-network-panel.c +@@ -1286,10 +1286,23 @@ panel_check_network_manager_version (CcN + 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); ++ 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 (panel->priv->client); +- 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); +@@ -1312,9 +1325,22 @@ panel_check_network_manager_version (CcN + + gtk_widget_show_all (box); + g_free (markup); ++ } else if (g_strcmp0 (state, "active") == 0) { ++ GtkWidget *w; ++ ++ w = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, ++ "devices_toolbar")); ++ gtk_widget_hide (w); ++ w = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, ++ "label_NM_warning")); ++ gtk_widget_show (w); + } else { + manager_running (panel->priv->client, NULL, panel); + } ++ ++ g_object_unref (connection); ++ g_object_unref (proxy); ++ g_variant_unref (variant); + } + + static void +Index: gnome-control-center-3.20.1/panels/network/network.ui +=================================================================== +--- gnome-control-center-3.20.1.orig/panels/network/network.ui ++++ gnome-control-center-3.20.1/panels/network/network.ui +@@ -127,6 +127,19 @@ + 1 + + ++ ++ ++ False ++ False ++ 0 ++ Please use YaST2 to configure your network. ++ ++ ++ False ++ True ++ 2 ++ ++ + + + True diff --git a/gnome-control-center.changes b/gnome-control-center.changes index 09e95c4..23d7166 100644 --- a/gnome-control-center.changes +++ b/gnome-control-center.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jul 26 06:53:23 UTC 2016 - sckang@suse.com + +- Add gnome-control-center-disable-error-message-for-NM.patch: + Improve the check whether NM or wicked is running, so it won't + show an error about NM in SLES(also the system when wicked + instead of NM is used). (bsc#989801) + ------------------------------------------------------------------- Fri Jul 8 15:43:10 UTC 2016 - dimstar@opensuse.org diff --git a/gnome-control-center.spec b/gnome-control-center.spec index 95c030f..5daeecc 100644 --- a/gnome-control-center.spec +++ b/gnome-control-center.spec @@ -54,6 +54,8 @@ Patch17: gnome-control-center-follow-polkit-permissions-for-tz.patch Patch18: gnome-control-center-890979-change-remote-passwd.patch # PATCH-FIX-UPSTREAM gnome-control-center-touchpad-wayland-cap.patch bgo#765879 zaitor@opensuse.org -- mouse: Make touchpad capability checking on wayland work as intended Patch19: gnome-control-center-touchpad-wayland-cap.patch +# PATCH-FIX-OPENSUSE gnome-control-center-disable-error-message-for-NM.patch bsc#989801 sckang@suse.com -- network: Improve the check for whether NM or wicked is running +Patch20: gnome-control-center-disable-error-message-for-NM.patch BuildRequires: cups-devel BuildRequires: desktop-file-utils BuildRequires: fdupes @@ -216,6 +218,7 @@ translation-update-upstream #NEEDS-REBASE #patch14 -p1 %patch19 -p1 +%patch20 -p1 %build ACLOCAL_FLAGS="-I libgd" NOCONFIGURE=1 gnome-autogen.sh