[network-manager-applet/gsettings-eap] all: stop reaching into "org.gnome.nm-applet.eap"




commit 04b23129389ff5568fa1bac0e4128c66c82cd62c
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Tue Oct 4 13:21:05 2022 +0200

    all: stop reaching into "org.gnome.nm-applet.eap"
    
    This replaces eap_method_ca_cert_ignore_* with libnma's
    nma_utils_ca_cert_ignore_* and drops wireless-security.
    
    Relies on https://gitlab.gnome.org/GNOME/libnma/-/merge_requests/41
    Probably needs some sort of fallback for older libnma.

 Makefile.am                                  |  31 +-------
 po/POTFILES.in                               |   1 -
 src/connection-editor/nm-connection-editor.c |   6 +-
 src/ethernet-dialog.c                        |   7 +-
 src/wireless-security/eap-method.c           | 102 ---------------------------
 src/wireless-security/eap-method.h           |  15 ----
 src/wireless-security/meson.build            |  23 ------
 7 files changed, 8 insertions(+), 177 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 9ce11178..58c40f36 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -257,31 +257,6 @@ EXTRA_DIST += src/tests/meson.build
 
 ###############################################################################
 
-wireless_security_c_real = \
-       src/wireless-security/eap-method.h \
-       src/wireless-security/eap-method.c
-
-noinst_LTLIBRARIES += src/wireless-security/libwireless-security-libnm.la
-
-src_wireless_security_libwireless_security_libnm_la_SOURCES = \
-       $(wireless_security_c_real)
-
-src_wireless_security_libwireless_security_libnm_la_CPPFLAGS = \
-       $(dflt_cppflags) \
-       "-I$(srcdir)/shared" \
-       $(GTK3_CFLAGS) \
-       $(LIBNM_CFLAGS)
-
-src_wireless_security_libwireless_security_libnm_la_LIBADD = \
-       src/utils/libutils-libnm.la \
-       $(GTK3_LIBS) \
-       $(LIBNM_LIBS)
-
-EXTRA_DIST += \
-       src/wireless-security/meson.build
-
-###############################################################################
-
 src/connection-editor/ce-resources.h: src/connection-editor/ce.gresource.xml
        $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< --target=$@ --sourcedir=$(srcdir)/src/connection-editor 
--generate-header --internal
 
@@ -391,7 +366,6 @@ src_connection_editor_nm_connection_editor_CPPFLAGS = \
        -DNMALOCALEDIR=\"$(datadir)/locale\" \
        "-I$(srcdir)/shared" \
        "-I$(srcdir)/src/utils" \
-       "-I$(srcdir)/src/wireless-security" \
        $(GTK3_CFLAGS) \
        $(LIBNMA_CFLAGS) \
        $(LIBNM_CFLAGS) \
@@ -399,7 +373,7 @@ src_connection_editor_nm_connection_editor_CPPFLAGS = \
        $(SELINUX_CFLAGS)
 
 src_connection_editor_nm_connection_editor_LDADD = \
-       src/wireless-security/libwireless-security-libnm.la \
+       src/utils/libutils-libnm.la \
        $(GTK3_LIBS) \
        $(LIBNM_LIBS) \
        $(LIBNMA_LIBS) \
@@ -518,7 +492,6 @@ src_nm_applet_CPPFLAGS = \
        -DG_LOG_DOMAIN=\""nm-applet"\" \
        "-I$(srcdir)/shared" \
        "-I$(srcdir)/src/utils" \
-       "-I$(srcdir)/src/wireless-security" \
        $(GTK3_CFLAGS) \
        $(LIBNMA_CFLAGS) \
        $(LIBNM_CFLAGS) \
@@ -528,7 +501,7 @@ src_nm_applet_CPPFLAGS = \
        $(APPINDICATOR_CFLAGS)
 
 src_nm_applet_LDADD = \
-       src/wireless-security/libwireless-security-libnm.la \
+       src/utils/libutils-libnm.la \
        $(GTK3_LIBS) \
        $(LIBNM_LIBS) \
        $(LIBNMA_LIBS) \
diff --git a/po/POTFILES.in b/po/POTFILES.in
index a5521ae0..c7b76268 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -85,4 +85,3 @@ src/main.c
 src/mb-menu-item.c
 src/mobile-helpers.c
 src/utils/utils.c
-src/wireless-security/eap-method.c
diff --git a/src/connection-editor/nm-connection-editor.c b/src/connection-editor/nm-connection-editor.c
index de3c16bf..ae2d1275 100644
--- a/src/connection-editor/nm-connection-editor.c
+++ b/src/connection-editor/nm-connection-editor.c
@@ -23,6 +23,7 @@
 
 #include "nm-connection-editor.h"
 #include "nma-cert-chooser.h"
+#include "nma-ui-utils.h"
 
 #include "ce-page.h"
 #include "page-general.h"
@@ -51,7 +52,6 @@
 #include "page-wireguard.h"
 #include "ce-polkit-button.h"
 #include "vpn-helpers.h"
-#include "eap-method.h"
 
 extern gboolean nm_ce_keep_above;
 
@@ -985,7 +985,7 @@ nm_connection_editor_set_connection (NMConnectionEditor *editor,
        nm_connection_editor_update_title (editor);
 
        /* Handle CA cert ignore stuff */
-       eap_method_ca_cert_ignore_load (editor->connection);
+       nma_utils_ca_cert_ignore_load (editor->connection);
 
        s_con = nm_connection_get_setting_connection (editor->connection);
        g_assert (s_con);
@@ -1221,7 +1221,7 @@ ok_button_clicked_save_connection (NMConnectionEditor *self)
        nm_connection_editor_set_busy (self, TRUE);
 
        /* Save new CA cert ignore values to GSettings */
-       eap_method_ca_cert_ignore_save (self->connection);
+       nma_utils_ca_cert_ignore_save (self->connection);
 
        if (self->is_new_connection) {
                nm_client_add_connection_async (self->client,
diff --git a/src/ethernet-dialog.c b/src/ethernet-dialog.c
index c558542b..498cdf35 100644
--- a/src/ethernet-dialog.c
+++ b/src/ethernet-dialog.c
@@ -9,11 +9,10 @@
 
 #include "nm-default.h"
 
-
 #include "nma-ws.h"
+#include "nma-ui-utils.h"
 #include "ethernet-dialog.h"
 #include "applet-dialogs.h"
-#include "eap-method.h"
 
 static void
 stuff_changed_cb (NMAWs *ws, gpointer user_data)
@@ -92,7 +91,7 @@ nma_ethernet_dialog_new (NMConnection *connection)
        dialog_set_network_name (connection, GTK_ENTRY (gtk_builder_get_object (builder, 
"network_name_entry")));
 
        /* Handle CA cert ignore stuff */
-       eap_method_ca_cert_ignore_load (connection);
+       nma_utils_ca_cert_ignore_load (connection);
 
        security = dialog_set_security (connection, builder, GTK_BOX (gtk_builder_get_object (builder, 
"security_vbox")));
        g_signal_connect (security, "ws-changed", G_CALLBACK (stuff_changed_cb), GTK_WIDGET 
(gtk_builder_get_object (builder, "ok_button")));
@@ -128,7 +127,7 @@ nma_ethernet_dialog_get_connection (GtkWidget *dialog)
        nm_connection_remove_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
 
        /* Save new CA cert ignore values to GSettings */
-       eap_method_ca_cert_ignore_save (connection);
+       nma_utils_ca_cert_ignore_save (connection);
 
        return connection;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]