[network-manager-applet/th/vpn-service-info-bgo767197: 7/8] c-e: add additional detail_data argument to PageNewConnectionFunc
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/th/vpn-service-info-bgo767197: 7/8] c-e: add additional detail_data argument to PageNewConnectionFunc
- Date: Wed, 8 Jun 2016 23:12:00 +0000 (UTC)
commit ab5abc6ba5fecc16b076c576c014ba56238516c5
Author: Thomas Haller <thaller redhat com>
Date: Wed Jun 8 12:40:55 2016 +0200
c-e: add additional detail_data argument to PageNewConnectionFunc
For VPNs, we want to pass on more information.
src/connection-editor/ce-page.h | 1 +
src/connection-editor/connection-helpers.c | 7 ++++++-
src/connection-editor/connection-helpers.h | 1 +
src/connection-editor/nm-connection-list.c | 1 +
src/connection-editor/page-bluetooth.c | 1 +
src/connection-editor/page-bluetooth.h | 1 +
src/connection-editor/page-bond.c | 2 ++
src/connection-editor/page-bond.h | 1 +
src/connection-editor/page-bridge.c | 1 +
src/connection-editor/page-bridge.h | 1 +
src/connection-editor/page-dsl.c | 1 +
src/connection-editor/page-dsl.h | 1 +
src/connection-editor/page-ethernet.c | 1 +
src/connection-editor/page-ethernet.h | 1 +
src/connection-editor/page-infiniband.c | 1 +
src/connection-editor/page-infiniband.h | 1 +
src/connection-editor/page-mobile.c | 3 ++-
src/connection-editor/page-mobile.h | 1 +
src/connection-editor/page-team.c | 2 ++
src/connection-editor/page-team.h | 1 +
src/connection-editor/page-vlan.c | 1 +
src/connection-editor/page-vlan.h | 1 +
src/connection-editor/page-vpn.c | 1 +
src/connection-editor/page-vpn.h | 1 +
src/connection-editor/page-wifi.c | 1 +
src/connection-editor/page-wifi.h | 1 +
26 files changed, 34 insertions(+), 2 deletions(-)
---
diff --git a/src/connection-editor/ce-page.h b/src/connection-editor/ce-page.h
index ffc1767..2e9e093 100644
--- a/src/connection-editor/ce-page.h
+++ b/src/connection-editor/ce-page.h
@@ -45,6 +45,7 @@ typedef GSList * (*PageGetConnectionsFunc) (gpointer user_data);
typedef void (*PageNewConnectionFunc) (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data);
diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c
index facab9b..8fa378b 100644
--- a/src/connection-editor/connection-helpers.c
+++ b/src/connection-editor/connection-helpers.c
@@ -372,6 +372,7 @@ new_connection_result (NMConnection *connection,
void
new_connection_of_type (GtkWindow *parent_window,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionFunc new_func,
NewConnectionResultFunc result_func,
@@ -387,6 +388,7 @@ new_connection_of_type (GtkWindow *parent_window,
new_func (parent_window,
detail,
+ detail_data,
client,
new_connection_result,
ncd);
@@ -424,6 +426,7 @@ new_connection_dialog_full (GtkWindow *parent_window,
int response;
PageNewConnectionFunc new_func = NULL;
gs_free char *vpn_service_type = NULL;
+ const char *detail = NULL;
GError *error = NULL;
/* load GUI */
@@ -460,13 +463,15 @@ new_connection_dialog_full (GtkWindow *parent_window,
COL_NEW_FUNC, &new_func,
COL_VPN_SERVICE_TYPE, &vpn_service_type,
-1);
+ if (vpn_service_type)
+ detail = vpn_service_type;
}
gtk_widget_destroy (GTK_WIDGET (type_dialog));
g_object_unref (gui);
if (new_func)
- new_connection_of_type (parent_window, vpn_service_type, client, new_func, result_func,
user_data);
+ new_connection_of_type (parent_window, detail, NULL, client, new_func, result_func,
user_data);
else
result_func (NULL, user_data);
}
diff --git a/src/connection-editor/connection-helpers.h b/src/connection-editor/connection-helpers.h
index 9ac82a3..0ddb2d3 100644
--- a/src/connection-editor/connection-helpers.h
+++ b/src/connection-editor/connection-helpers.h
@@ -54,6 +54,7 @@ void new_connection_dialog_full (GtkWindow *parent_window,
void new_connection_of_type (GtkWindow *parent_window,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionFunc new_func,
NewConnectionResultFunc result_func,
diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c
index 0bd1db0..5c092dc 100644
--- a/src/connection-editor/nm-connection-list.c
+++ b/src/connection-editor/nm-connection-list.c
@@ -917,6 +917,7 @@ nm_connection_list_create (NMConnectionList *self, GType ctype, const char *deta
} else {
new_connection_of_type (GTK_WINDOW (self->dialog),
detail,
+ NULL,
self->client,
types[i].new_connection_func,
really_add_connection,
diff --git a/src/connection-editor/page-bluetooth.c b/src/connection-editor/page-bluetooth.c
index ff3ca43..2d36c57 100644
--- a/src/connection-editor/page-bluetooth.c
+++ b/src/connection-editor/page-bluetooth.c
@@ -284,6 +284,7 @@ out:
void
bluetooth_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data)
diff --git a/src/connection-editor/page-bluetooth.h b/src/connection-editor/page-bluetooth.h
index ae2df50..20f4d31 100644
--- a/src/connection-editor/page-bluetooth.h
+++ b/src/connection-editor/page-bluetooth.h
@@ -56,6 +56,7 @@ CEPage *ce_page_bluetooth_new (NMConnectionEditor *edit,
void bluetooth_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data);
diff --git a/src/connection-editor/page-bond.c b/src/connection-editor/page-bond.c
index 392fa5f..7e5e025 100644
--- a/src/connection-editor/page-bond.c
+++ b/src/connection-editor/page-bond.c
@@ -390,6 +390,7 @@ add_slave (CEPageMaster *master, NewConnectionResultFunc result_func)
if (priv->slave_arptype == ARPHRD_INFINIBAND) {
new_connection_of_type (priv->toplevel,
NULL,
+ NULL,
CE_PAGE (self)->client,
infiniband_connection_new,
result_func,
@@ -601,6 +602,7 @@ ce_page_bond_class_init (CEPageBondClass *bond_class)
void
bond_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data)
diff --git a/src/connection-editor/page-bond.h b/src/connection-editor/page-bond.h
index 5b75e09..abdee47 100644
--- a/src/connection-editor/page-bond.h
+++ b/src/connection-editor/page-bond.h
@@ -52,6 +52,7 @@ CEPage *ce_page_bond_new (NMConnectionEditor *editor,
void bond_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data);
diff --git a/src/connection-editor/page-bridge.c b/src/connection-editor/page-bridge.c
index cc4fefe..136c97c 100644
--- a/src/connection-editor/page-bridge.c
+++ b/src/connection-editor/page-bridge.c
@@ -295,6 +295,7 @@ ce_page_bridge_class_init (CEPageBridgeClass *bridge_class)
void
bridge_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data)
diff --git a/src/connection-editor/page-bridge.h b/src/connection-editor/page-bridge.h
index 3581b06..79dee1c 100644
--- a/src/connection-editor/page-bridge.h
+++ b/src/connection-editor/page-bridge.h
@@ -52,6 +52,7 @@ CEPage *ce_page_bridge_new (NMConnectionEditor *editor,
void bridge_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data);
diff --git a/src/connection-editor/page-dsl.c b/src/connection-editor/page-dsl.c
index f6a0e45..6419fa0 100644
--- a/src/connection-editor/page-dsl.c
+++ b/src/connection-editor/page-dsl.c
@@ -204,6 +204,7 @@ ce_page_dsl_class_init (CEPageDslClass *dsl_class)
void
dsl_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data)
diff --git a/src/connection-editor/page-dsl.h b/src/connection-editor/page-dsl.h
index b5c6f1b..b789285 100644
--- a/src/connection-editor/page-dsl.h
+++ b/src/connection-editor/page-dsl.h
@@ -54,6 +54,7 @@ CEPage *ce_page_dsl_new (NMConnectionEditor *editor,
void dsl_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc callback,
gpointer user_data);
diff --git a/src/connection-editor/page-ethernet.c b/src/connection-editor/page-ethernet.c
index 5f199a3..d72b7dd 100644
--- a/src/connection-editor/page-ethernet.c
+++ b/src/connection-editor/page-ethernet.c
@@ -491,6 +491,7 @@ ce_page_ethernet_class_init (CEPageEthernetClass *ethernet_class)
void
ethernet_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data)
diff --git a/src/connection-editor/page-ethernet.h b/src/connection-editor/page-ethernet.h
index 68ff57d..0bee841 100644
--- a/src/connection-editor/page-ethernet.h
+++ b/src/connection-editor/page-ethernet.h
@@ -54,6 +54,7 @@ CEPage *ce_page_ethernet_new (NMConnectionEditor *editor,
void ethernet_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data);
diff --git a/src/connection-editor/page-infiniband.c b/src/connection-editor/page-infiniband.c
index 3f934a2..e328f70 100644
--- a/src/connection-editor/page-infiniband.c
+++ b/src/connection-editor/page-infiniband.c
@@ -242,6 +242,7 @@ ce_page_infiniband_class_init (CEPageInfinibandClass *infiniband_class)
void
infiniband_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data)
diff --git a/src/connection-editor/page-infiniband.h b/src/connection-editor/page-infiniband.h
index 9feca14..d095e3c 100644
--- a/src/connection-editor/page-infiniband.h
+++ b/src/connection-editor/page-infiniband.h
@@ -52,6 +52,7 @@ CEPage *ce_page_infiniband_new (NMConnectionEditor *editor,
void infiniband_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data);
diff --git a/src/connection-editor/page-mobile.c b/src/connection-editor/page-mobile.c
index 8a1aa64..149db65 100644
--- a/src/connection-editor/page-mobile.c
+++ b/src/connection-editor/page-mobile.c
@@ -502,6 +502,7 @@ cancel_dialog (GtkDialog *dialog)
void
mobile_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data)
@@ -519,7 +520,7 @@ mobile_connection_new (GtkWindow *parent,
info->user_data = user_data;
wizard = nma_mobile_wizard_new (parent, NULL, NM_DEVICE_MODEM_CAPABILITY_NONE, FALSE,
- new_connection_mobile_wizard_done,
info);
+ new_connection_mobile_wizard_done, info);
if (wizard) {
nma_mobile_wizard_present (wizard);
return;
diff --git a/src/connection-editor/page-mobile.h b/src/connection-editor/page-mobile.h
index 750c736..e8d71f5 100644
--- a/src/connection-editor/page-mobile.h
+++ b/src/connection-editor/page-mobile.h
@@ -54,6 +54,7 @@ CEPage *ce_page_mobile_new (NMConnectionEditor *editor,
void mobile_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data);
diff --git a/src/connection-editor/page-team.c b/src/connection-editor/page-team.c
index cc14533..bb197d8 100644
--- a/src/connection-editor/page-team.c
+++ b/src/connection-editor/page-team.c
@@ -220,6 +220,7 @@ add_slave (CEPageMaster *master, NewConnectionResultFunc result_func)
if (priv->slave_arptype == ARPHRD_INFINIBAND) {
new_connection_of_type (priv->toplevel,
NULL,
+ NULL,
CE_PAGE (self)->client,
infiniband_connection_new,
result_func,
@@ -362,6 +363,7 @@ ce_page_team_class_init (CEPageTeamClass *team_class)
void
team_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data)
diff --git a/src/connection-editor/page-team.h b/src/connection-editor/page-team.h
index 68f5ff2..b9daf3b 100644
--- a/src/connection-editor/page-team.h
+++ b/src/connection-editor/page-team.h
@@ -52,6 +52,7 @@ CEPage *ce_page_team_new (NMConnectionEditor *editor,
void team_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data);
diff --git a/src/connection-editor/page-vlan.c b/src/connection-editor/page-vlan.c
index 9dea191..0f555fb 100644
--- a/src/connection-editor/page-vlan.c
+++ b/src/connection-editor/page-vlan.c
@@ -788,6 +788,7 @@ ce_page_vlan_class_init (CEPageVlanClass *vlan_class)
void
vlan_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data)
diff --git a/src/connection-editor/page-vlan.h b/src/connection-editor/page-vlan.h
index f0f7238..dde01bc 100644
--- a/src/connection-editor/page-vlan.h
+++ b/src/connection-editor/page-vlan.h
@@ -52,6 +52,7 @@ CEPage *ce_page_vlan_new (NMConnectionEditor *editor,
void vlan_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data);
diff --git a/src/connection-editor/page-vpn.c b/src/connection-editor/page-vpn.c
index 2f93e23..4b4a45d 100644
--- a/src/connection-editor/page-vpn.c
+++ b/src/connection-editor/page-vpn.c
@@ -281,6 +281,7 @@ vpn_type_result_func (NMConnection *connection, gpointer user_data)
void
vpn_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data)
diff --git a/src/connection-editor/page-vpn.h b/src/connection-editor/page-vpn.h
index 62a4d9d..e8dddf0 100644
--- a/src/connection-editor/page-vpn.h
+++ b/src/connection-editor/page-vpn.h
@@ -56,6 +56,7 @@ gboolean ce_page_vpn_can_export (CEPageVpn *page);
void vpn_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data);
diff --git a/src/connection-editor/page-wifi.c b/src/connection-editor/page-wifi.c
index 8215cb3..71c557a 100644
--- a/src/connection-editor/page-wifi.c
+++ b/src/connection-editor/page-wifi.c
@@ -609,6 +609,7 @@ ce_page_wifi_class_init (CEPageWifiClass *wifi_class)
void
wifi_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data)
diff --git a/src/connection-editor/page-wifi.h b/src/connection-editor/page-wifi.h
index d1f0d63..90b25c4 100644
--- a/src/connection-editor/page-wifi.h
+++ b/src/connection-editor/page-wifi.h
@@ -58,6 +58,7 @@ GBytes *ce_page_wifi_get_ssid (CEPageWifi *self);
void wifi_connection_new (GtkWindow *parent,
const char *detail,
+ gpointer detail_data,
NMClient *client,
PageNewConnectionResultFunc result_func,
gpointer user_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]