Sync from SUSE:SLFO:Main gnome-control-center revision 1d4454d1cbcbdc1aadb0870c1050c73e

This commit is contained in:
Adrian Schröter 2024-05-03 12:58:58 +02:00
commit 098a00f877
11 changed files with 9410 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

19
_service Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<services>
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://gitlab.gnome.org/GNOME/gnome-control-center.git</param>
<param name="revision">refs/tags/44.1</param>
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
<param name="versionrewrite-pattern">(.*)\+0</param>
<param name="versionrewrite-replacement">\1</param>
<!-- <param name="changesgenerate">enable</param> -->
</service>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="manual" />
</services>

BIN
gnome-control-center-44.1.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,526 @@
Index: gnome-control-center-41.0/panels/network/connection-editor/ce-page-ethernet.c
===================================================================
--- gnome-control-center-41.0.orig/panels/network/connection-editor/ce-page-ethernet.c
+++ gnome-control-center-41.0/panels/network/connection-editor/ce-page-ethernet.c
@@ -27,6 +27,7 @@
#include "ce-page.h"
#include "ce-page-ethernet.h"
+#include "firewall-helpers.h"
#include "ui-helpers.h"
struct _CEPageEthernet
@@ -38,8 +39,11 @@ struct _CEPageEthernet
GtkSpinButton *mtu_spin;
GtkWidget *mtu_label;
GtkEntry *name_entry;
+ GtkLabel *firewall_heading;
+ GtkComboBoxText *firewall_combo;
NMClient *client;
+ NMConnection *connection;
NMSettingConnection *setting_connection;
NMSettingWired *setting_wired;
};
@@ -80,6 +84,7 @@ static void
connect_ethernet_page (CEPageEthernet *self)
{
NMSettingWired *setting = self->setting_wired;
+ NMSettingConnection *sc;
char **mac_list;
const char *s_mac_str;
const gchar *name;
@@ -109,6 +114,10 @@ connect_ethernet_page (CEPageEthernet *s
g_signal_connect_object (self->name_entry, "changed", G_CALLBACK (ce_page_changed), self, G_CONNECT_SWAPPED);
g_signal_connect_object (self->mtu_spin, "value-changed", G_CALLBACK (ce_page_changed), self, G_CONNECT_SWAPPED);
+
+ sc = nm_connection_get_setting_connection (self->connection);
+ firewall_ui_setup (sc, GTK_WIDGET (self->firewall_combo), GTK_WIDGET (self->firewall_heading), NULL);
+ g_signal_connect_swapped (self->firewall_combo, "changed", G_CALLBACK (ce_page_changed), self);
}
static void
@@ -136,6 +145,8 @@ ui_to_setting (CEPageEthernet *self)
g_object_set (self->setting_connection,
NM_SETTING_CONNECTION_ID, gtk_entry_get_text (self->name_entry),
NULL);
+
+ firewall_ui_to_setting (self->setting_connection, GTK_WIDGET (self->firewall_combo));
}
static const gchar *
@@ -180,6 +191,16 @@ ce_page_ethernet_validate (CEPage
}
static void
+ce_page_ethernet_dispose (GObject *object)
+{
+ CEPageEthernet *self = CE_PAGE_ETHERNET (object);
+
+ g_clear_object (&self->connection);
+
+ G_OBJECT_CLASS (ce_page_ethernet_parent_class)->dispose (object);
+}
+
+static void
ce_page_ethernet_init (CEPageEthernet *self)
{
gtk_widget_init_template (GTK_WIDGET (self));
@@ -188,8 +209,11 @@ ce_page_ethernet_init (CEPageEthernet *s
static void
ce_page_ethernet_class_init (CEPageEthernetClass *klass)
{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ object_class->dispose = ce_page_ethernet_dispose;
+
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/network/ethernet-page.ui");
gtk_widget_class_bind_template_child (widget_class, CEPageEthernet, cloned_mac_combo);
@@ -197,6 +221,8 @@ ce_page_ethernet_class_init (CEPageEther
gtk_widget_class_bind_template_child (widget_class, CEPageEthernet, mtu_spin);
gtk_widget_class_bind_template_child (widget_class, CEPageEthernet, mtu_label);
gtk_widget_class_bind_template_child (widget_class, CEPageEthernet, name_entry);
+ gtk_widget_class_bind_template_child (widget_class, CEPageEthernet, firewall_heading);
+ gtk_widget_class_bind_template_child (widget_class, CEPageEthernet, firewall_combo);
}
static void
@@ -215,6 +241,7 @@ ce_page_ethernet_new (NMConnection *
self = CE_PAGE_ETHERNET (g_object_new (ce_page_ethernet_get_type (), NULL));
self->client = client;
+ self->connection = g_object_ref (connection);
self->setting_connection = nm_connection_get_setting_connection (connection);
self->setting_wired = nm_connection_get_setting_wired (connection);
Index: gnome-control-center-41.0/panels/network/connection-editor/ce-page-security.c
===================================================================
--- gnome-control-center-41.0.orig/panels/network/connection-editor/ce-page-security.c
+++ gnome-control-center-41.0/panels/network/connection-editor/ce-page-security.c
@@ -27,6 +27,7 @@
#include "ce-page.h"
#include "ce-page-security.h"
+#include "firewall-helpers.h"
#include "wireless-security.h"
#include "ws-dynamic-wep.h"
#include "ws-leap.h"
@@ -42,6 +43,8 @@ struct _CEPageSecurity
GtkBox *box;
GtkComboBox *security_combo;
GtkLabel *security_label;
+ GtkComboBox *firewall_combo;
+ GtkWidget *firewall_heading;
NMConnection *connection;
const gchar *security_setting;
@@ -176,6 +179,7 @@ security_combo_changed (CEPageSecurity *
gtk_container_remove (GTK_CONTAINER (parent), GTK_WIDGET (sec));
gtk_size_group_add_widget (self->group, GTK_WIDGET (self->security_label));
+ gtk_size_group_add_widget (self->group, self->firewall_heading);
wireless_security_add_to_size_group (sec, self->group);
gtk_container_add (GTK_CONTAINER (self->box), g_object_ref (GTK_WIDGET (sec)));
@@ -230,6 +234,7 @@ finish_setup (CEPageSecurity *self)
{
NMSettingWireless *sw;
NMSettingWirelessSecurity *sws;
+ NMSettingConnection *sc;
gboolean is_adhoc = FALSE;
g_autoptr(GtkListStore) sec_model = NULL;
GtkTreeIter iter;
@@ -396,6 +401,10 @@ finish_setup (CEPageSecurity *self)
gtk_combo_box_set_active (self->security_combo, active < 0 ? 0 : (guint32) active);
+ sc = nm_connection_get_setting_connection (self->connection);
+ firewall_ui_setup (sc, GTK_WIDGET (self->firewall_combo), self->firewall_heading, NULL);
+ g_signal_connect_swapped (self->firewall_combo, "changed", G_CALLBACK (ce_page_changed), self);
+
security_combo_changed (self);
g_signal_connect_object (self->security_combo, "changed",
G_CALLBACK (security_combo_changed), self, G_CONNECT_SWAPPED);
@@ -431,6 +440,7 @@ ce_page_security_validate (CEPage
{
CEPageSecurity *self = CE_PAGE_SECURITY (page);
NMSettingWireless *sw;
+ NMSettingConnection *sc;
g_autoptr(WirelessSecurity) sec = NULL;
gboolean valid = FALSE;
const char *mode;
@@ -471,6 +481,9 @@ ce_page_security_validate (CEPage
valid = TRUE;
}
+ sc = nm_connection_get_setting_connection (connection);
+ firewall_ui_to_setting (sc, GTK_WIDGET (CE_PAGE_SECURITY (self)->firewall_combo));
+
return valid;
}
@@ -493,6 +506,8 @@ ce_page_security_class_init (CEPageSecur
gtk_widget_class_bind_template_child (widget_class, CEPageSecurity, box);
gtk_widget_class_bind_template_child (widget_class, CEPageSecurity, security_label);
gtk_widget_class_bind_template_child (widget_class, CEPageSecurity, security_combo);
+ gtk_widget_class_bind_template_child (widget_class, CEPageSecurity, firewall_heading);
+ gtk_widget_class_bind_template_child (widget_class, CEPageSecurity, firewall_combo);
}
static void
Index: gnome-control-center-41.0/panels/network/connection-editor/ce-page-vpn.c
===================================================================
--- gnome-control-center-41.0.orig/panels/network/connection-editor/ce-page-vpn.c
+++ gnome-control-center-41.0/panels/network/connection-editor/ce-page-vpn.c
@@ -35,6 +35,8 @@ struct _CEPageVpn
GtkLabel *failure_label;
GtkEntry *name_entry;
+ GtkLabel *firewall_heading;
+ GtkComboBoxText *firewall_combo;
NMConnection *connection;
NMSettingConnection *setting_connection;
@@ -125,6 +127,9 @@ connect_vpn_page (CEPageVpn *self)
name = nm_setting_connection_get_id (self->setting_connection);
gtk_entry_set_text (self->name_entry, name);
g_signal_connect_object (self->name_entry, "changed", G_CALLBACK (ce_page_changed), self, G_CONNECT_SWAPPED);
+
+ firewall_ui_setup (self->setting_connection, GTK_WIDGET (self->firewall_combo), GTK_WIDGET (self->firewall_heading), NULL);
+ g_signal_connect_swapped (self->firewall_combo, "changed", G_CALLBACK (ce_page_changed), self);
}
static void
@@ -160,6 +165,7 @@ ce_page_vpn_validate (CEPage *pag
g_object_set (self->setting_connection,
NM_SETTING_CONNECTION_ID, gtk_entry_get_text (self->name_entry),
NULL);
+ firewall_ui_to_setting (self->setting_connection, GTK_WIDGET (self->firewall_combo));
if (!nm_setting_verify (NM_SETTING (self->setting_connection), NULL, error))
return FALSE;
@@ -188,6 +194,8 @@ ce_page_vpn_class_init (CEPageVpnClass *
gtk_widget_class_bind_template_child (widget_class, CEPageVpn, failure_label);
gtk_widget_class_bind_template_child (widget_class, CEPageVpn, name_entry);
+ gtk_widget_class_bind_template_child (widget_class, CEPageVpn, firewall_heading);
+ gtk_widget_class_bind_template_child (widget_class, CEPageVpn, firewall_combo);
}
static void
Index: gnome-control-center-41.0/panels/network/connection-editor/ethernet-page.ui
===================================================================
--- gnome-control-center-41.0.orig/panels/network/connection-editor/ethernet-page.ui
+++ gnome-control-center-41.0/panels/network/connection-editor/ethernet-page.ui
@@ -159,6 +159,36 @@
</packing>
</child>
<child>
+ <object class="GtkLabel" id="firewall_heading">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Firewall _Zone</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">firewall_combo</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="firewall_combo">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
<placeholder/>
</child>
<child>
Index: gnome-control-center-41.0/panels/network/connection-editor/firewall-helpers.c
===================================================================
--- /dev/null
+++ gnome-control-center-41.0/panels/network/connection-editor/firewall-helpers.c
@@ -0,0 +1,125 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2013 Red Hat, Inc.
+ */
+
+#include "config.h"
+
+#include <glib/gi18n.h>
+#include <gio/gio.h>
+
+#include "firewall-helpers.h"
+
+typedef struct {
+ gchar *zone;
+ GtkWidget *combo;
+ GtkWidget *label;
+} GetZonesReplyData;
+
+static void
+get_zones_reply (GObject *source,
+ GAsyncResult *res,
+ gpointer user_data)
+{
+ GDBusConnection *bus = G_DBUS_CONNECTION (source);
+ GetZonesReplyData *d = user_data;
+ GVariant *ret;
+ GError *error = NULL;
+ const gchar **zones;
+ gint idx;
+ gint i;
+
+ ret = g_dbus_connection_call_finish (bus, res, &error);
+
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (d->combo),
+ C_("Firewall zone", "Default"));
+ gtk_widget_set_tooltip_text (d->combo, _("The zone defines the trust level of the connection"));
+
+ idx = 0;
+ if (error) {
+ gtk_widget_hide (d->combo);
+ gtk_widget_hide (d->label);
+ g_error_free (error);
+ }
+ else {
+ gtk_widget_show (d->combo);
+ gtk_widget_show (d->label);
+ g_variant_get (ret, "(^a&s)", &zones);
+
+ for (i = 0; zones[i]; i++) {
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (d->combo),
+ zones[i]);
+ if (g_strcmp0 (d->zone, zones[i]) == 0)
+ idx = i + 1;
+ }
+ if (d->zone && idx == 0) {
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (d->combo),
+ d->zone);
+ idx = i + 1;
+ }
+ g_variant_unref (ret);
+ }
+ gtk_combo_box_set_active (GTK_COMBO_BOX (d->combo), idx);
+
+ g_free (d->zone);
+ g_free (d);
+}
+
+void
+firewall_ui_setup (NMSettingConnection *setting,
+ GtkWidget *combo,
+ GtkWidget *label,
+ GCancellable *cancellable)
+{
+ GDBusConnection *bus;
+ GetZonesReplyData *d;
+
+ bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
+
+ d = g_new0 (GetZonesReplyData, 1);
+ d->zone = g_strdup (nm_setting_connection_get_zone (setting));
+ d->combo = combo;
+ d->label = label;
+
+ g_dbus_connection_call (bus,
+ "org.fedoraproject.FirewallD1",
+ "/org/fedoraproject/FirewallD1",
+ "org.fedoraproject.FirewallD1.zone",
+ "getZones",
+ NULL,
+ NULL,
+ 0,
+ G_MAXINT,
+ cancellable,
+ get_zones_reply, d);
+ g_object_unref (bus);
+}
+
+void
+firewall_ui_to_setting (NMSettingConnection *setting, GtkWidget *combo)
+{
+ gchar *zone;
+
+ zone = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (combo));
+ if (g_strcmp0 (zone, C_("Firewall zone", "Default")) == 0) {
+ g_free (zone);
+ zone = NULL;
+ }
+
+ g_object_set (setting, NM_SETTING_CONNECTION_ZONE, zone, NULL);
+ g_free (zone);
+}
Index: gnome-control-center-41.0/panels/network/connection-editor/firewall-helpers.h
===================================================================
--- /dev/null
+++ gnome-control-center-41.0/panels/network/connection-editor/firewall-helpers.h
@@ -0,0 +1,33 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2013 Red Hat, Inc.
+ */
+
+#ifndef _FIREWALL_HELPERS_H_
+#define _FIREWALL_HELPERS_H_
+
+#include <NetworkManager.h>
+#include <gtk/gtk.h>
+
+void firewall_ui_setup (NMSettingConnection *setting,
+ GtkWidget *combo,
+ GtkWidget *label,
+ GCancellable *cancellable);
+void firewall_ui_to_setting (NMSettingConnection *setting,
+ GtkWidget *combo);
+
+
+#endif /* _FIREWALL_HELPERS_H_ */
Index: gnome-control-center-41.0/panels/network/connection-editor/meson.build
===================================================================
--- gnome-control-center-41.0.orig/panels/network/connection-editor/meson.build
+++ gnome-control-center-41.0/panels/network/connection-editor/meson.build
@@ -12,6 +12,7 @@ sources = files(
'ce-page-vpn.c',
'ce-page-wifi.c',
'ce-page.c',
+ 'firewall-helpers.c',
'net-connection-editor.c',
'vpn-helpers.c'
)
Index: gnome-control-center-41.0/panels/network/connection-editor/security-page.ui
===================================================================
--- gnome-control-center-41.0.orig/panels/network/connection-editor/security-page.ui
+++ gnome-control-center-41.0/panels/network/connection-editor/security-page.ui
@@ -47,6 +47,37 @@
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
+ <object class="GtkLabel" id="firewall_heading">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Firewall _Zone</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">firewall_combo</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="firewall_combo">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
<placeholder/>
</child>
</object>
Index: gnome-control-center-41.0/panels/network/connection-editor/vpn-page.ui
===================================================================
--- gnome-control-center-41.0.orig/panels/network/connection-editor/vpn-page.ui
+++ gnome-control-center-41.0/panels/network/connection-editor/vpn-page.ui
@@ -51,6 +51,45 @@
</packing>
</child>
<child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="firewall_heading">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Firewall _Zone</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">firewall_combo</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="firewall_combo">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="failure_label">
<property name="visible">True</property>
<property name="can_focus">False</property>

View File

@ -0,0 +1,172 @@
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 6a3074ce..40fb0283 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -659,10 +659,24 @@ static void
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 ();
@@ -674,9 +688,23 @@ panel_check_network_manager_version (CcNetworkPanel *self)
_("NetworkManager needs to be running to view or make "
"connections. Contact a system administrator or the "
"software vendor."));
+ } else if (version == NULL && g_strcmp0 (state, "active") == 0) {
+ GtkWidget *status_page;
+
+ status_page = adw_status_page_new ();
+ cc_panel_set_content (CC_PANEL (self), 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 --git a/panels/network/cc-wifi-panel.c b/panels/network/cc-wifi-panel.c
index 8e0b17b0..495b5616 100644
--- a/panels/network/cc-wifi-panel.c
+++ b/panels/network/cc-wifi-panel.c
@@ -302,21 +302,41 @@ static void
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
diff --git a/panels/network/cc-wifi-panel.ui b/panels/network/cc-wifi-panel.ui
index 722ca3d4..c196f984 100644
--- a/panels/network/cc-wifi-panel.ui
+++ b/panels/network/cc-wifi-panel.ui
@@ -226,6 +226,50 @@ Error details: NetworkManager not running.</property>
</object>
</child>
+ <!-- "Wicked Running" page -->
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">wicked-running</property>
+ <property name="child">
+ <object class="GtkCenterBox">
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="orientation">vertical</property>
+ <property name="margin-top">18</property>
+ <property name="margin-bottom">18</property>
+ <property name="margin-start">18</property>
+ <property name="margin-end">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 type="end">
+ <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>
+ </child>
+ </object>
+ </property>
+ </object>
+ </child>
+
</object>
</child>
diff --git a/tests/meson.build b/tests/meson.build
index 69667acb..5f6a932d 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -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')

View File

@ -0,0 +1,15 @@
Index: gnome-control-center-41.0/panels/info-overview/cc-info-overview-panel.c
===================================================================
--- gnome-control-center-41.0.orig/panels/info-overview/cc-info-overview-panel.c
+++ gnome-control-center-41.0/panels/info-overview/cc-info-overview-panel.c
@@ -791,8 +791,8 @@ does_gnome_software_allow_updates (void)
static gboolean
does_gnome_software_exist (void)
{
- g_autofree gchar *path = g_find_program_in_path ("gnome-software");
- return path != NULL;
+ /* Don't use gnome-software in SLE. */
+ return FALSE;
}
static gboolean

View File

@ -0,0 +1,14 @@
Index: gnome-control-center-41.0/panels/power/cc-power-panel.c
===================================================================
--- gnome-control-center-41.0.orig/panels/power/cc-power-panel.c
+++ gnome-control-center-41.0/panels/power/cc-power-panel.c
@@ -796,7 +796,8 @@ populate_power_button_row (HdyComboRow *
{ N_("Suspend"), GSD_POWER_BUTTON_ACTION_SUSPEND },
{ N_("Power Off"), GSD_POWER_BUTTON_ACTION_INTERACTIVE },
{ N_("Hibernate"), GSD_POWER_BUTTON_ACTION_HIBERNATE },
- { N_("Nothing"), GSD_POWER_BUTTON_ACTION_NOTHING }
+ { N_("Nothing"), GSD_POWER_BUTTON_ACTION_NOTHING },
+ { N_("Force Off"), GSD_POWER_BUTTON_ACTION_SHUTDOWN }
};
guint i;

View File

@ -0,0 +1,8 @@
#
# Safe to ignore Warnings/Errors
#
# English should be installed by the main package to ensure things don't go South.
addFilter("W: file-not-in-%lang /usr/share/locale/en/LC_MESSAGES/gnome-control-center-2.0.mo")
# GOA and Color and siblings don't have binaries of their own, they use "Exec=gnome-control-center PANEL".
addFilter("W: desktopfile-without-binary /usr/share/applications/gnome-.*.desktop gnome-control-center")

8357
gnome-control-center.changes Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,4 @@
name: gnome-control-center
version: 44.1
mtime: 1682033982
commit: da661203820d5766ff10fd7f64d2117470c70a2a

269
gnome-control-center.spec Normal file
View File

@ -0,0 +1,269 @@
#
# spec file for package gnome-control-center
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# Allow to enable/disable ibus, as GNOME is rather strict on new versions.
%bcond_without ibus
# Wacom input support
%ifarch s390 s390x
%bcond_with wacom
%else
%bcond_without wacom
%endif
Name: gnome-control-center
Version: 44.1
Release: 0
Summary: The GNOME Control Center
License: GPL-2.0-or-later
Group: System/GUI/GNOME
URL: https://apps.gnome.org/app/org.gnome.Settings
Source0: %{name}-%{version}.tar.xz
Source99: %{name}-rpmlintrc
# 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 WAS:PATCH-FIX-OPENSUSE
Patch1: gnome-control-center-disable-error-message-for-NM.patch
### patches for Leap >= 15 plus SLE >= 15, but not TW
# PATCH-FEATURE-SLE gnome-control-center-info-never-use-gnome-software.patch bsc#999336 fezhang@suse.com -- info: Never search for gnome-software as an option when checking for updates on SLE and Leap 42.2, because we use gpk-update-viewer.
Patch1001: gnome-control-center-info-never-use-gnome-software.patch
# PATCH-FEATURE-SLE gnome-control-center-more-power-button-actions.patch bsc#993381 fezhang@suse.com -- power: Bring back the "shutdown" and "interactive" power button actions.
Patch1002: gnome-control-center-more-power-button-actions.patch
# PATCH-FEATURE-SLE gnome-control-center-bring-back-firewall-zone.patch fate#316719 sckang@suse.com -- network: Bring back the firewall zone combo box to select proper firewall zone for each connection.
Patch1003: gnome-control-center-bring-back-firewall-zone.patch
BuildRequires: /usr/bin/Xvfb
BuildRequires: cups-devel >= 1.4
BuildRequires: desktop-file-utils
BuildRequires: fdupes
BuildRequires: intltool
BuildRequires: krb5-devel
BuildRequires: meson >= 0.57.0
BuildRequires: pkgconfig
BuildRequires: python3-dbusmock
BuildRequires: xsltproc
BuildRequires: pkgconfig(accountsservice) >= 0.6.39
BuildRequires: pkgconfig(cairo-gobject)
BuildRequires: pkgconfig(colord) >= 0.1.34
BuildRequires: pkgconfig(colord-gtk4)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(gcr-base-3)
BuildRequires: pkgconfig(gdk-pixbuf-2.0) >= 2.23.0
BuildRequires: pkgconfig(gdk-wayland-3.0)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glib-2.0) >= 2.68.0
BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(gnome-bluetooth-3.0)
BuildRequires: pkgconfig(gnome-desktop-4)
BuildRequires: pkgconfig(gnome-settings-daemon) >= 41
BuildRequires: pkgconfig(gnutls)
BuildRequires: pkgconfig(goa-1.0) >= 3.25.3
BuildRequires: pkgconfig(goa-backend-1.0)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(gsettings-desktop-schemas) >= 40.alpha
BuildRequires: pkgconfig(gsound)
BuildRequires: pkgconfig(gthread-2.0)
BuildRequires: pkgconfig(gtk4) >= 4.8
BuildRequires: pkgconfig(gudev-1.0)
BuildRequires: pkgconfig(libadwaita-1) >= 1.2.alpha
BuildRequires: pkgconfig(libgtop-2.0)
BuildRequires: pkgconfig(libnm) >= 1.24.0
BuildRequires: pkgconfig(libnma-gtk4)
BuildRequires: pkgconfig(libpulse) >= 2.0
BuildRequires: pkgconfig(libpulse-mainloop-glib)
BuildRequires: pkgconfig(libsecret-1)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(malcontent-0) => 0.7.0
BuildRequires: pkgconfig(mm-glib) >= 0.7
BuildRequires: pkgconfig(polkit-gobject-1) >= 0.103
BuildRequires: pkgconfig(pwquality) >= 1.2.2
BuildRequires: pkgconfig(smbclient)
BuildRequires: pkgconfig(udisks2) >= 2.8.2
BuildRequires: pkgconfig(upower-glib) >= 0.99.8
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xft)
BuildRequires: pkgconfig(xi) >= 1.2
## CONDITIONAL BUILD REQUIREMENTS
%if %{with wacom}
BuildRequires: pkgconfig(libwacom) >= 0.7
%endif
%if %{with ibus}
BuildRequires: pkgconfig(ibus-1.0) >= 1.5.2
%endif
##
Requires: gnome-settings-daemon >= 41
# needed for universal access panel
Requires: gnome-themes-accessibility
Requires: gnome-version
Requires: iso-codes
# Needed for showing keyboard layout, boo#898096
# Require the package providing /usr/bin/gkbd-keyboard-display
Requires: gnomekbd-tools
# For the thunderbolt panel
Recommends: bolt
Recommends: %{name}-user-faces
# cups-pk-helper should only be recommended, rather than a hard Requires, see boo#904047
Recommends: cups-pk-helper
Recommends: dbus(com.intel.dleyna-server)
# the printers panel can use the dbus service
Recommends: system-config-printer-dbus-service
# For the power panel
Recommends: power-profiles-daemon
%description
The control center is GNOME's main interface for configuration of
various aspects of your desktop.
%package user-faces
Summary: Login manager user avatars
Group: System/GUI/GNOME
BuildArch: noarch
%description user-faces
This package provides user avatars to be used by display managers
%package devel
Summary: Header files for the GNOME Control Center
Group: Development/Libraries/GNOME
Requires: %{name} = %{version}
BuildArch: noarch
%description devel
The control center is GNOME's main interface for configuration of
various aspects of your desktop.
%package color
Summary: Configuration panel for color management
Group: System/GUI/GNOME
Requires: %{name} = %{version}
# The color panel requires colord to be present for the glib schema
Requires: colord
# The color panel interacts with binaries from gnome-color-manager
Requires: gnome-color-manager
Supplements: %{name}
BuildArch: noarch
%description color
This package provides the color management configuration panel for
GNOME control center.
%package goa
Summary: Configuration panel for online accounts
Group: System/GUI/GNOME
Requires: %{name} = %{version}
# The online accounts panel interacts with binaries and icons from gnome-online-accounts
Requires: gnome-online-accounts
Supplements: (%{name} and gnome-online-accounts)
BuildArch: noarch
%description goa
This package provides the online accounts onfiguration panel for
GNOME control center.
%lang_package
%prep
%setup -q
%patch1 -p1
# patches for Leap >= 15 plus SLE >= 15, but not TW
%if 0%{?sle_version} >= 150000
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
%endif
%build
%meson \
-Ddocumentation=true \
%{!?with_ibus: -Dibus=false} \
-Dmalcontent=true \
%{nil}
%meson_build
#%%check
#%%meson_test
%install
%meson_install
%find_lang %{name}-2.0 %{?no_lang_C}
%find_lang %{name}-2.0-timezones %{name}-2.0.lang
%fdupes %{buildroot}%{_prefix}
# We do not package gnome-control-center.rules (bnc#804966)
rm %{buildroot}%{_datadir}/polkit-1/rules.d/gnome-control-center.rules
%files
%license COPYING
%doc NEWS README.md
%{_bindir}/*
%{_datadir}/metainfo/org.gnome.Settings.appdata.xml
%exclude %{_datadir}/applications/gnome-color-panel.desktop
%exclude %{_datadir}/applications/gnome-online-accounts-panel.desktop
%{_datadir}/applications/*.desktop
%{_datadir}/bash-completion/completions/gnome-control-center
%{_datadir}/dbus-1/services/org.gnome.Settings.service
%{_datadir}/dbus-1/services/org.gnome.Settings.SearchProvider.service
%{_datadir}/glib-2.0/schemas/org.gnome.Settings.gschema.xml
%{_datadir}/gnome-control-center/
%dir %{_datadir}/gnome-shell/
%dir %{_datadir}/gnome-shell/search-providers/
%{_datadir}/gnome-shell/search-providers/org.gnome.Settings.search-provider.ini
%{_datadir}/icons/hicolor/*/*/*.svg
%{_datadir}/icons/gnome-logo-text-dark.svg
%{_datadir}/icons/gnome-logo-text.svg
%{_datadir}/locale/en/
%{_datadir}/polkit-1/actions/org.gnome.controlcenter.datetime.policy
%{_datadir}/polkit-1/actions/org.gnome.controlcenter.remote-login-helper.policy
%{_datadir}/polkit-1/actions/org.gnome.controlcenter.user-accounts.policy
# We do not package gnome-control-center.rules
#{_datadir}/polkit-1/rules.d/gnome-control-center.rules
%dir %{_datadir}/sounds/gnome
%dir %{_datadir}/sounds/gnome/default
%dir %{_datadir}/sounds/gnome/default/alerts
%{_datadir}/sounds/gnome/default/alerts/*.ogg
%{_libexecdir}/cc-remote-login-helper
%{_libexecdir}/gnome-control-center-goa-helper
%{_libexecdir}/gnome-control-center-print-renderer
%{_libexecdir}/gnome-control-center-search-provider
%{_mandir}/man1/gnome-control-center.1%{?ext_man}
%files user-faces
%{_datadir}/pixmaps/faces/
%files color
%{_datadir}/applications/gnome-color-panel.desktop
%files goa
%{_datadir}/applications/gnome-online-accounts-panel.desktop
%files devel
%doc gnome-control-center.doap
%{_datadir}/pkgconfig/gnome-keybindings.pc
%{_datadir}/gettext/its/gnome-keybindings.its
%{_datadir}/gettext/its/gnome-keybindings.loc
%{_datadir}/gettext/its/sounds.its
%{_datadir}/gettext/its/sounds.loc
%files lang -f %{name}-2.0.lang
# english locale should be in the main package
%exclude %{_datadir}/locale/en
%changelog