Accepting request 416637 from home:JonathanKang:branches:GNOME:Factory

gnome-control-center.spec

OBS-URL: https://build.opensuse.org/request/show/416637
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-control-center?expand=0&rev=322
This commit is contained in:
Dominique Leuenberger 2016-08-03 09:06:23 +00:00 committed by Git OBS Bridge
parent 6d2f2f3b54
commit 7a15f83bb8
3 changed files with 87 additions and 0 deletions

View File

@ -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 @@
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label_NM_warning">
+ <property name="visible">False</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Please use YaST2 to configure your network.</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">True</property>

View File

@ -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 Fri Jul 8 15:43:10 UTC 2016 - dimstar@opensuse.org

View File

@ -54,6 +54,8 @@ Patch17: gnome-control-center-follow-polkit-permissions-for-tz.patch
Patch18: gnome-control-center-890979-change-remote-passwd.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 # 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 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: cups-devel
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: fdupes BuildRequires: fdupes
@ -216,6 +218,7 @@ translation-update-upstream
#NEEDS-REBASE #NEEDS-REBASE
#patch14 -p1 #patch14 -p1
%patch19 -p1 %patch19 -p1
%patch20 -p1
%build %build
ACLOCAL_FLAGS="-I libgd" NOCONFIGURE=1 gnome-autogen.sh ACLOCAL_FLAGS="-I libgd" NOCONFIGURE=1 gnome-autogen.sh