[gnome-control-center] network: Update wireless-security patch
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Update wireless-security patch
- Date: Tue, 7 Jun 2016 12:26:19 +0000 (UTC)
commit e6bccd664666d358d006b62fda7c0466634d48c9
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jun 7 11:44:36 2016 +0200
network: Update wireless-security patch
panels/network/wireless-security/Makefile.am | 2 +-
.../nm-connection-editor-to-network-panel.patch | 312 +++++++++++---------
2 files changed, 178 insertions(+), 136 deletions(-)
---
diff --git a/panels/network/wireless-security/Makefile.am b/panels/network/wireless-security/Makefile.am
index 200ed24..d7898da 100644
--- a/panels/network/wireless-security/Makefile.am
+++ b/panels/network/wireless-security/Makefile.am
@@ -59,7 +59,7 @@ WIRELESS_SECURITY_DIR=$(top_srcdir)/../network-manager-applet/src/wireless-secur
WIRELESS_SECURITY_FILES=$(NM_APPLET_SOURCES) $(resource_files)
update-from-nma:
FILES="$(WIRELESS_SECURITY_FILES)" DIR="$(WIRELESS_SECURITY_DIR)" $(top_srcdir)/update-from-gsd.sh &&
changed=true ; \
- patch -p0 < $(srcdir)/nm-connection-editor-to-network-panel.patch ; \
+ patch -p4 < $(srcdir)/nm-connection-editor-to-network-panel.patch ; \
git commit -m "network: Update wireless-security from network-manager-applet"
$(WIRELESS_SECURITY_FILES)
EXTRA_DIST = $(resource_files) wireless-security.gresource.xml nm-connection-editor-to-network-panel.patch
diff --git a/panels/network/wireless-security/nm-connection-editor-to-network-panel.patch
b/panels/network/wireless-security/nm-connection-editor-to-network-panel.patch
index ee77b30..d43b70b 100644
--- a/panels/network/wireless-security/nm-connection-editor-to-network-panel.patch
+++ b/panels/network/wireless-security/nm-connection-editor-to-network-panel.patch
@@ -1,74 +1,8 @@
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/eap-method.c 2012-12-11
15:51:57.191216362 +0100
-+++ eap-method.c 2013-01-09 17:58:22.167402957 +0100
-@@ -43,7 +43,7 @@
- static GType type_id = 0;
-
- if (!type_id) {
-- type_id = g_boxed_type_register_static ("EAPMethod",
-+ type_id = g_boxed_type_register_static ("CcEAPMethod",
- (GBoxedCopyFunc) eap_method_ref,
- (GBoxedFreeFunc) eap_method_unref);
- }
-@@ -203,7 +203,7 @@ eap_method_nag_user (EAPMethod *method)
- return method->nag_dialog;
- }
-
--#define NAG_DIALOG_UI UIDIR "/nag-user-dialog.ui"
-+#define NAG_DIALOG_UI "/org/gnome/control-center/network/nag-user-dialog.ui"
-
- static gboolean
- _get_ignore_ca_cert (const char *uuid, gboolean phase2)
-@@ -237,7 +237,7 @@ eap_method_nag_init (EAPMethod *method,
- g_return_val_if_fail (ca_cert_chooser != NULL, FALSE);
-
- method->nag_builder = gtk_builder_new ();
-- if (!gtk_builder_add_from_file (method->nag_builder, NAG_DIALOG_UI, &error)) {
-+ if (!gtk_builder_add_from_resource (method->nag_builder, NAG_DIALOG_UI, &error)) {
- g_warning ("Couldn't load UI builder file " NAG_DIALOG_UI ": %s",
- error->message);
- g_error_free (error);
-@@ -328,7 +328,7 @@ eap_method_init (gsize obj_size,
- EMFillConnectionFunc fill_connection,
- EMUpdateSecretsFunc update_secrets,
- EMDestroyFunc destroy,
-- const char *ui_file,
-+ const char *ui_resource,
- const char *ui_widget_name,
- const char *default_field,
- gboolean phase2)
-@@ -337,7 +337,7 @@ eap_method_init (gsize obj_size,
- GError *error = NULL;
-
- g_return_val_if_fail (obj_size > 0, NULL);
-- g_return_val_if_fail (ui_file != NULL, NULL);
-+ g_return_val_if_fail (ui_resource != NULL, NULL);
- g_return_val_if_fail (ui_widget_name != NULL, NULL);
-
- method = g_slice_alloc0 (obj_size);
-@@ -354,9 +354,9 @@ eap_method_init (gsize obj_size,
- method->phase2 = phase2;
-
- method->builder = gtk_builder_new ();
-- if (!gtk_builder_add_from_file (method->builder, ui_file, &error)) {
-+ if (!gtk_builder_add_from_resource (method->builder, ui_resource, &error)) {
- g_warning ("Couldn't load UI builder file %s: %s",
-- ui_file, error->message);
-+ ui_resource, error->message);
- eap_method_unref (method);
- return NULL;
- }
-@@ -364,7 +364,7 @@ eap_method_init (gsize obj_size,
- method->ui_widget = GTK_WIDGET (gtk_builder_get_object (method->builder, ui_widget_name));
- if (!method->ui_widget) {
- g_warning ("Couldn't load UI widget '%s' from UI file %s",
-- ui_widget_name, ui_file);
-+ ui_widget_name, ui_resource);
- eap_method_unref (method);
- return NULL;
- }
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/eap-method-fast.c
2012-12-11 15:47:51.346453837 +0100
-+++ eap-method-fast.c 2013-01-09 17:58:22.165402936 +0100
-@@ -343,7 +343,7 @@ eap_method_fast_new (WirelessSecurity *w
+diff --git a/panels/network/wireless-security/eap-method-fast.c
b/panels/network/wireless-security/eap-method-fast.c
+index 69b8a86..be5578d 100644
+--- a/panels/network/wireless-security/eap-method-fast.c
++++ b/panels/network/wireless-security/eap-method-fast.c
+@@ -351,7 +351,7 @@ eap_method_fast_new (WirelessSecurity *ws_parent,
fill_connection,
update_secrets,
destroy,
@@ -77,31 +11,24 @@
"eap_fast_notebook",
"eap_fast_anon_identity_entry",
FALSE);
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/eap-method.h 2012-12-11
15:51:57.191216362 +0100
-+++ eap-method.h 2013-01-09 17:58:22.167402957 +0100
-@@ -96,7 +96,7 @@ EAPMethod *eap_method_init (gsize obj_si
- EMFillConnectionFunc fill_connection,
- EMUpdateSecretsFunc update_secrets,
- EMDestroyFunc destroy,
-- const char *ui_file,
-+ const char *ui_resource,
- const char *ui_widget_name,
- const char *default_field,
- gboolean phase2);
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/eap-method-leap.c
2012-12-11 15:51:57.190216351 +0100
-+++ eap-method-leap.c 2013-01-09 17:58:22.166402947 +0100
-@@ -136,7 +136,7 @@ eap_method_leap_new (WirelessSecurity *w
+diff --git a/panels/network/wireless-security/eap-method-leap.c
b/panels/network/wireless-security/eap-method-leap.c
+index 5fbdd86..6163468 100644
+--- a/panels/network/wireless-security/eap-method-leap.c
++++ b/panels/network/wireless-security/eap-method-leap.c
+@@ -204,7 +204,7 @@ eap_method_leap_new (WirelessSecurity *ws_parent,
fill_connection,
update_secrets,
- NULL,
+ destroy,
- UIDIR "/eap-method-leap.ui",
+ "/org/gnome/control-center/network/eap-method-leap.ui",
"eap_leap_notebook",
"eap_leap_username_entry",
FALSE);
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/eap-method-peap.c
2012-12-11 15:51:57.190216351 +0100
-+++ eap-method-peap.c 2013-01-09 17:58:22.166402947 +0100
-@@ -327,7 +327,7 @@ eap_method_peap_new (WirelessSecurity *w
+diff --git a/panels/network/wireless-security/eap-method-peap.c
b/panels/network/wireless-security/eap-method-peap.c
+index 6462ef2..7f87541 100644
+--- a/panels/network/wireless-security/eap-method-peap.c
++++ b/panels/network/wireless-security/eap-method-peap.c
+@@ -349,7 +349,7 @@ eap_method_peap_new (WirelessSecurity *ws_parent,
fill_connection,
update_secrets,
destroy,
@@ -110,20 +37,24 @@
"eap_peap_notebook",
"eap_peap_anon_identity_entry",
FALSE);
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/eap-method-simple.c
2012-12-11 15:51:57.190216351 +0100
-+++ eap-method-simple.c 2013-01-09 17:58:22.166402947 +0100
-@@ -229,7 +229,7 @@ eap_method_simple_new (WirelessSecurity
+diff --git a/panels/network/wireless-security/eap-method-simple.c
b/panels/network/wireless-security/eap-method-simple.c
+index 0f72029..f9fd473 100644
+--- a/panels/network/wireless-security/eap-method-simple.c
++++ b/panels/network/wireless-security/eap-method-simple.c
+@@ -307,7 +307,7 @@ eap_method_simple_new (WirelessSecurity *ws_parent,
fill_connection,
update_secrets,
- NULL,
+ destroy,
- UIDIR "/eap-method-simple.ui",
+ "/org/gnome/control-center/network/eap-method-simple.ui",
"eap_simple_notebook",
"eap_simple_username_entry",
- phase2);
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/eap-method-tls.c
2012-12-11 15:51:57.190216351 +0100
-+++ eap-method-tls.c 2013-01-09 17:58:22.167402957 +0100
-@@ -401,7 +401,7 @@ eap_method_tls_new (WirelessSecurity *ws
+ flags & EAP_METHOD_SIMPLE_FLAG_PHASE2);
+diff --git a/panels/network/wireless-security/eap-method-tls.c
b/panels/network/wireless-security/eap-method-tls.c
+index 8f33d83..587c399 100644
+--- a/panels/network/wireless-security/eap-method-tls.c
++++ b/panels/network/wireless-security/eap-method-tls.c
+@@ -453,7 +453,7 @@ eap_method_tls_new (WirelessSecurity *ws_parent,
fill_connection,
update_secrets,
NULL,
@@ -132,9 +63,11 @@
"eap_tls_notebook",
"eap_tls_identity_entry",
phase2);
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/eap-method-ttls.c
2012-12-11 15:51:57.190216351 +0100
-+++ eap-method-ttls.c 2013-01-09 17:58:22.167402957 +0100
-@@ -327,7 +327,7 @@ eap_method_ttls_new (WirelessSecurity *w
+diff --git a/panels/network/wireless-security/eap-method-ttls.c
b/panels/network/wireless-security/eap-method-ttls.c
+index 789f0fa..ef02529 100644
+--- a/panels/network/wireless-security/eap-method-ttls.c
++++ b/panels/network/wireless-security/eap-method-ttls.c
+@@ -380,7 +380,7 @@ eap_method_ttls_new (WirelessSecurity *ws_parent,
fill_connection,
update_secrets,
destroy,
@@ -143,27 +76,115 @@
"eap_ttls_notebook",
"eap_ttls_anon_identity_entry",
FALSE);
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/wireless-security.c
2012-12-11 15:51:57.191216362 +0100
-+++ wireless-security.c 2013-01-09 17:58:22.168402968 +0100
-@@ -35,6 +35,7 @@
- #include <nm-setting-8021x.h>
+diff --git a/panels/network/wireless-security/eap-method.c b/panels/network/wireless-security/eap-method.c
+index 90efea1..6ec4849 100644
+--- a/panels/network/wireless-security/eap-method.c
++++ b/panels/network/wireless-security/eap-method.c
+@@ -34,7 +34,19 @@
+ #include "utils.h"
+ #include "helpers.h"
+
+-G_DEFINE_BOXED_TYPE (EAPMethod, eap_method, eap_method_ref, eap_method_unref)
++GType
++eap_method_get_type (void)
++{
++ static GType type_id = 0;
++
++ if (!type_id) {
++ type_id = g_boxed_type_register_static ("CcEAPMethod",
++ (GBoxedCopyFunc) eap_method_ref,
++ (GBoxedFreeFunc) eap_method_unref);
++ }
++
++ return type_id;
++}
+
+ GtkWidget *
+ eap_method_get_widget (EAPMethod *method)
+@@ -129,7 +141,7 @@ eap_method_init (gsize obj_size,
+ EMFillConnectionFunc fill_connection,
+ EMUpdateSecretsFunc update_secrets,
+ EMDestroyFunc destroy,
+- const char *ui_file,
++ const char *ui_resource,
+ const char *ui_widget_name,
+ const char *default_field,
+ gboolean phase2)
+@@ -138,7 +150,7 @@ eap_method_init (gsize obj_size,
+ GError *error = NULL;
+
+ g_return_val_if_fail (obj_size > 0, NULL);
+- g_return_val_if_fail (ui_file != NULL, NULL);
++ g_return_val_if_fail (ui_resource != NULL, NULL);
+ g_return_val_if_fail (ui_widget_name != NULL, NULL);
+
+ method = g_slice_alloc0 (obj_size);
+@@ -154,9 +166,9 @@ eap_method_init (gsize obj_size,
+ method->phase2 = phase2;
+
+ method->builder = gtk_builder_new ();
+- if (!gtk_builder_add_from_file (method->builder, ui_file, &error)) {
++ if (!gtk_builder_add_from_resource (method->builder, ui_resource, &error)) {
+ g_warning ("Couldn't load UI builder file %s: %s",
+- ui_file, error->message);
++ ui_resource, error->message);
+ eap_method_unref (method);
+ return NULL;
+ }
+@@ -164,7 +176,7 @@ eap_method_init (gsize obj_size,
+ method->ui_widget = GTK_WIDGET (gtk_builder_get_object (method->builder, ui_widget_name));
+ if (!method->ui_widget) {
+ g_warning ("Couldn't load UI widget '%s' from UI file %s",
+- ui_widget_name, ui_file);
++ ui_widget_name, ui_resource);
+ eap_method_unref (method);
+ return NULL;
+ }
+diff --git a/panels/network/wireless-security/eap-method.h b/panels/network/wireless-security/eap-method.h
+index 84c1c78..de287e3 100644
+--- a/panels/network/wireless-security/eap-method.h
++++ b/panels/network/wireless-security/eap-method.h
+@@ -99,7 +99,7 @@ EAPMethod *eap_method_init (gsize obj_size,
+ EMFillConnectionFunc fill_connection,
+ EMUpdateSecretsFunc update_secrets,
+ EMDestroyFunc destroy,
+- const char *ui_file,
++ const char *ui_resource,
+ const char *ui_widget_name,
+ const char *default_field,
+ gboolean phase2);
+diff --git a/panels/network/wireless-security/wireless-security.c
b/panels/network/wireless-security/wireless-security.c
+index 23b8a27..bd233b0 100644
+--- a/panels/network/wireless-security/wireless-security.c
++++ b/panels/network/wireless-security/wireless-security.c
+@@ -25,10 +25,25 @@
+ #include <string.h>
#include "wireless-security.h"
+#include "wireless-security-resources.h"
#include "eap-method.h"
+ #include "utils.h"
- GType
-@@ -43,6 +44,8 @@ wireless_security_get_g_type (void)
- static GType type_id = 0;
-
- if (!type_id) {
+-G_DEFINE_BOXED_TYPE (WirelessSecurity, wireless_security, wireless_security_ref, wireless_security_unref)
++GType
++wireless_security_get_type (void)
++{
++ static GType type_id = 0;
++
++ if (!type_id) {
+ g_resources_register (wireless_security_get_resource ());
+
-+ type_id = g_boxed_type_register_static ("CcWirelessSecurity",
-- type_id = g_boxed_type_register_static ("WirelessSecurity",
- (GBoxedCopyFunc) wireless_security_ref,
- (GBoxedFreeFunc) wireless_security_unref);
-@@ -155,7 +158,7 @@ wireless_security_init (gsize obj_size,
++ type_id = g_boxed_type_register_static ("CcWirelessSecurity",
++ (GBoxedCopyFunc) wireless_security_ref,
++ (GBoxedFreeFunc) wireless_security_unref);
++ }
++
++ return type_id;
++}
+
+ GtkWidget *
+ wireless_security_get_widget (WirelessSecurity *sec)
+@@ -146,7 +161,7 @@ wireless_security_init (gsize obj_size,
WSFillConnectionFunc fill_connection,
WSUpdateSecretsFunc update_secrets,
WSDestroyFunc destroy,
@@ -172,7 +193,7 @@
const char *ui_widget_name,
const char *default_field)
{
-@@ -163,7 +166,7 @@ wireless_security_init (gsize obj_size,
+@@ -154,7 +169,7 @@ wireless_security_init (gsize obj_size,
GError *error = NULL;
g_return_val_if_fail (obj_size > 0, NULL);
@@ -181,7 +202,7 @@
g_return_val_if_fail (ui_widget_name != NULL, NULL);
sec = g_slice_alloc0 (obj_size);
-@@ -180,9 +183,9 @@ wireless_security_init (gsize obj_size,
+@@ -170,9 +185,9 @@ wireless_security_init (gsize obj_size,
sec->default_field = default_field;
sec->builder = gtk_builder_new ();
@@ -193,7 +214,7 @@
g_error_free (error);
wireless_security_unref (sec);
return NULL;
-@@ -191,7 +194,7 @@ wireless_security_init (gsize obj_size,
+@@ -181,7 +196,7 @@ wireless_security_init (gsize obj_size,
sec->ui_widget = GTK_WIDGET (gtk_builder_get_object (sec->builder, ui_widget_name));
if (!sec->ui_widget) {
g_warning ("Couldn't load UI widget '%s' from UI file %s",
@@ -202,9 +223,20 @@
wireless_security_unref (sec);
return NULL;
}
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/wireless-security.h
2012-12-11 15:51:57.191216362 +0100
-+++ wireless-security.h 2013-01-09 17:58:22.168402968 +0100
-@@ -101,7 +101,7 @@ WirelessSecurity *wireless_security_init
+diff --git a/panels/network/wireless-security/wireless-security.h
b/panels/network/wireless-security/wireless-security.h
+index e9bcf63..3d56fa3 100644
+--- a/panels/network/wireless-security/wireless-security.h
++++ b/panels/network/wireless-security/wireless-security.h
+@@ -23,6 +23,8 @@
+ #ifndef WIRELESS_SECURITY_H
+ #define WIRELESS_SECURITY_H
+
++#define LIBNM_GLIB_BUILD
++
+ #include <glib.h>
+ #include <gtk/gtk.h>
+
+@@ -118,7 +120,7 @@ WirelessSecurity *wireless_security_init (gsize obj_size,
WSFillConnectionFunc fill_connection,
WSUpdateSecretsFunc update_secrets,
WSDestroyFunc destroy,
@@ -213,9 +245,11 @@
const char *ui_widget_name,
const char *default_field);
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/ws-dynamic-wep.c
2012-12-11 15:51:57.191216362 +0100
-+++ ws-dynamic-wep.c 2013-01-09 17:58:22.168402968 +0100
-@@ -120,7 +120,7 @@ ws_dynamic_wep_new (NMConnection *connec
+diff --git a/panels/network/wireless-security/ws-dynamic-wep.c
b/panels/network/wireless-security/ws-dynamic-wep.c
+index db55119..0192d24 100644
+--- a/panels/network/wireless-security/ws-dynamic-wep.c
++++ b/panels/network/wireless-security/ws-dynamic-wep.c
+@@ -109,7 +109,7 @@ ws_dynamic_wep_new (NMConnection *connection,
fill_connection,
update_secrets,
destroy,
@@ -224,9 +258,11 @@
"dynamic_wep_notebook",
NULL);
if (!parent)
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/ws-leap.c 2012-12-11
15:51:57.192216374 +0100
-+++ ws-leap.c 2013-01-09 17:58:22.168402968 +0100
-@@ -140,7 +140,7 @@ ws_leap_new (NMConnection *connection, g
+diff --git a/panels/network/wireless-security/ws-leap.c b/panels/network/wireless-security/ws-leap.c
+index 2b8b615..3a0f60c 100644
+--- a/panels/network/wireless-security/ws-leap.c
++++ b/panels/network/wireless-security/ws-leap.c
+@@ -155,7 +155,7 @@ ws_leap_new (NMConnection *connection, gboolean secrets_only)
fill_connection,
update_secrets,
NULL,
@@ -235,9 +271,11 @@
"leap_notebook",
"leap_username_entry");
if (!parent)
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/ws-wep-key.c 2012-12-11
15:51:57.192216374 +0100
-+++ ws-wep-key.c 2013-01-09 17:58:22.168402968 +0100
-@@ -257,7 +257,7 @@ ws_wep_key_new (NMConnection *connection
+diff --git a/panels/network/wireless-security/ws-wep-key.c b/panels/network/wireless-security/ws-wep-key.c
+index 045ac4b..cd7dbac 100644
+--- a/panels/network/wireless-security/ws-wep-key.c
++++ b/panels/network/wireless-security/ws-wep-key.c
+@@ -264,7 +264,7 @@ ws_wep_key_new (NMConnection *connection,
fill_connection,
update_secrets,
destroy,
@@ -246,9 +284,11 @@
"wep_key_notebook",
"wep_key_entry");
if (!parent)
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/ws-wpa-eap.c 2012-12-11
15:51:57.192216374 +0100
-+++ ws-wpa-eap.c 2013-01-09 17:58:22.169402979 +0100
-@@ -116,7 +116,7 @@ ws_wpa_eap_new (NMConnection *connection
+diff --git a/panels/network/wireless-security/ws-wpa-eap.c b/panels/network/wireless-security/ws-wpa-eap.c
+index d83218d..7db42df 100644
+--- a/panels/network/wireless-security/ws-wpa-eap.c
++++ b/panels/network/wireless-security/ws-wpa-eap.c
+@@ -110,7 +110,7 @@ ws_wpa_eap_new (NMConnection *connection,
fill_connection,
update_secrets,
destroy,
@@ -257,9 +297,11 @@
"wpa_eap_notebook",
NULL);
if (!parent)
---- /home/hadess/Projects/jhbuild/network-manager-applet/src/wireless-security/ws-wpa-psk.c 2012-12-11
15:51:57.192216374 +0100
-+++ ws-wpa-psk.c 2013-01-09 17:58:22.169402979 +0100
-@@ -157,7 +157,7 @@ ws_wpa_psk_new (NMConnection *connection
+diff --git a/panels/network/wireless-security/ws-wpa-psk.c b/panels/network/wireless-security/ws-wpa-psk.c
+index e56f348..4be28f2 100644
+--- a/panels/network/wireless-security/ws-wpa-psk.c
++++ b/panels/network/wireless-security/ws-wpa-psk.c
+@@ -182,7 +182,7 @@ ws_wpa_psk_new (NMConnection *connection, gboolean secrets_only)
fill_connection,
update_secrets,
NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]