network: properly namespace wireless security boxed types

These types appear with the same name in libnm-gtk, but they're
not shared because they come from different code, so they
need namespacing.
This prevents a crash that happens if you open a wifi property
dialog and then click "Connect to hidden network"

https://bugzilla.gnome.org/show_bug.cgi?id=700137
This commit is contained in:
Giovanni Campagna 2013-05-12 00:31:04 +02:00
parent 7262670c7a
commit d59a1b068f
3 changed files with 13 additions and 3 deletions

View file

@ -43,7 +43,7 @@ eap_method_get_g_type (void)
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);
}

View file

@ -1,5 +1,14 @@
--- /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;
}
@ -150,7 +159,8 @@
if (!type_id) {
+ g_resources_register (wireless_security_get_resource ());
+
type_id = g_boxed_type_register_static ("WirelessSecurity",
+ 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,

View file

@ -46,7 +46,7 @@ wireless_security_get_g_type (void)
if (!type_id) {
g_resources_register (wireless_security_get_resource ());
type_id = g_boxed_type_register_static ("WirelessSecurity",
type_id = g_boxed_type_register_static ("CcWirelessSecurity",
(GBoxedCopyFunc) wireless_security_ref,
(GBoxedFreeFunc) wireless_security_unref);
}