Commit baaae14a authored by Thomas Haller's avatar Thomas Haller

c-e: add additional detail_data argument to PageNewConnectionFunc

For VPNs, we want to pass on more information.
parent c28a5858
......@@ -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);
......
......@@ -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);
}
......
......@@ -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,
......
......@@ -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,
......
......@@ -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)
......
......@@ -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);
......
......@@ -389,6 +389,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,
......@@ -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)
......
......@@ -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);
......
......@@ -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)
......
......@@ -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);
......
......@@ -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)
......
......@@ -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);
......
......@@ -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)
......
......@@ -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);
......
......@@ -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)
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
......
......@@ -219,6 +219,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,
......@@ -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)
......
......@@ -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);
......
......@@ -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)
......
......@@ -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);
......
......@@ -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)
......
......@@ -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);
......
......@@ -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)
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment