networkmanagerapplet: hardcode for eap gschema
This is needed for the networking plug in pantheon.switchboard and the related indicator in pantheon.wingpanel
This commit is contained in:
parent
4a690093b1
commit
cb3579d8c4
@ -33,9 +33,14 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ meson ninja intltool pkgconfig wrapGAppsHook gobject-introspection python3 gtk-doc docbook_xsl docbook_xml_dtd_43 libxml2 ];
|
||||
|
||||
# Needed for wingpanel-indicator-network and switchboard-plug-network
|
||||
patches = [ ./hardcode-gsettings.patch ];
|
||||
|
||||
postPatch = ''
|
||||
chmod +x meson_post_install.py # patchShebangs requires executable file
|
||||
patchShebangs meson_post_install.py
|
||||
|
||||
substituteInPlace src/wireless-security/eap-method.c --subst-var-by NM_APPLET_GSETTINGS $lib/share/gsettings-schemas/${name}/glib-2.0/schemas
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
|
@ -0,0 +1,32 @@
|
||||
diff --git a/src/wireless-security/eap-method.c b/src/wireless-security/eap-method.c
|
||||
index 2e9daa23..6663b3ce 100644
|
||||
--- a/src/wireless-security/eap-method.c
|
||||
+++ b/src/wireless-security/eap-method.c
|
||||
@@ -265,8 +265,11 @@ eap_method_ca_cert_ignore_get (EAPMethod *method, NMConnection *connection)
|
||||
static GSettings *
|
||||
_get_ca_ignore_settings (NMConnection *connection)
|
||||
{
|
||||
+ GSettingsSchemaSource *schema_source;
|
||||
+ g_autoptr (GSettingsSchema) *schema;
|
||||
GSettings *settings;
|
||||
- char *path = NULL;
|
||||
+
|
||||
+ g_autofree char *path = NULL;
|
||||
const char *uuid;
|
||||
|
||||
g_return_val_if_fail (connection, NULL);
|
||||
@@ -274,9 +277,12 @@ _get_ca_ignore_settings (NMConnection *connection)
|
||||
uuid = nm_connection_get_uuid (connection);
|
||||
g_return_val_if_fail (uuid && *uuid, NULL);
|
||||
|
||||
+ schema_source = g_settings_schema_source_new_from_directory ("@NM_APPLET_GSETTINGS@", g_settings_schema_source_get_default (), TRUE, NULL);
|
||||
+ schema = g_settings_schema_source_lookup (schema_source, "org.gnome.nm-applet.eap", FALSE);
|
||||
+ g_settings_schema_source_unref (schema_source);
|
||||
+
|
||||
path = g_strdup_printf ("/org/gnome/nm-applet/eap/%s/", uuid);
|
||||
- settings = g_settings_new_with_path ("org.gnome.nm-applet.eap", path);
|
||||
- g_free (path);
|
||||
+ settings = g_settings_new_full (schema, NULL, path);
|
||||
|
||||
return settings;
|
||||
}
|
Loading…
Reference in New Issue
Block a user