[network-manager-applet/th/c-e-import-fixes-bgo774290: 4/11] c-e: tag PageNewConnectionResultFunc with a special argument



commit 79a94106e31170e0e38427f15b15b523c5853a93
Author: Thomas Haller <thaller redhat com>
Date:   Fri Nov 11 15:01:21 2016 +0100

    c-e: tag PageNewConnectionResultFunc with a special argument

 src/connection-editor/ce-page.h            |    6 +++++-
 src/connection-editor/connection-helpers.c |    3 ++-
 src/connection-editor/page-bluetooth.c     |    2 +-
 src/connection-editor/page-bond.c          |    2 +-
 src/connection-editor/page-bridge.c        |    2 +-
 src/connection-editor/page-dsl.c           |    2 +-
 src/connection-editor/page-ethernet.c      |    2 +-
 src/connection-editor/page-infiniband.c    |    2 +-
 src/connection-editor/page-mobile.c        |    2 +-
 src/connection-editor/page-team.c          |    2 +-
 src/connection-editor/page-vlan.c          |    2 +-
 src/connection-editor/page-vpn.c           |    4 ++--
 src/connection-editor/page-wifi.c          |    2 +-
 13 files changed, 19 insertions(+), 14 deletions(-)
---
diff --git a/src/connection-editor/ce-page.h b/src/connection-editor/ce-page.h
index 254810d..911202f 100644
--- a/src/connection-editor/ce-page.h
+++ b/src/connection-editor/ce-page.h
@@ -36,7 +36,11 @@
 /* for ARPHRD_ETHER / ARPHRD_INFINIBAND for MAC utilies */
 #include <net/if_arp.h>
 
-typedef void (*PageNewConnectionResultFunc) (NMConnection *connection,
+struct _func_tag_page_new_connection_result;
+#define FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_IMPL struct _func_tag_page_new_connection_result *_dummy
+#define FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL ((struct _func_tag_page_new_connection_result *) NULL)
+typedef void (*PageNewConnectionResultFunc) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_IMPL,
+                                             NMConnection *connection,
                                              gboolean canceled,
                                              GError *error,
                                              gpointer user_data);
diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c
index 4c1ed03..ece0680 100644
--- a/src/connection-editor/connection-helpers.c
+++ b/src/connection-editor/connection-helpers.c
@@ -535,7 +535,8 @@ typedef struct {
 } NewConnectionData;
 
 static void
-new_connection_result (NMConnection *connection,
+new_connection_result (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_IMPL,
+                       NMConnection *connection,
                        gboolean canceled,
                        GError *error,
                        gpointer user_data)
diff --git a/src/connection-editor/page-bluetooth.c b/src/connection-editor/page-bluetooth.c
index 32f4f9b..6f1de64 100644
--- a/src/connection-editor/page-bluetooth.c
+++ b/src/connection-editor/page-bluetooth.c
@@ -274,7 +274,7 @@ new_connection_mobile_wizard_done (NMAMobileWizard *wizard,
        }
 
 out:
-       (*info->result_func) (info->connection, canceled, NULL, info->user_data);
+       (*info->result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, info->connection, canceled, NULL, 
info->user_data);
 
        if (wizard)
                nma_mobile_wizard_destroy (wizard);
diff --git a/src/connection-editor/page-bond.c b/src/connection-editor/page-bond.c
index cbe6e0b..5e02a2b 100644
--- a/src/connection-editor/page-bond.c
+++ b/src/connection-editor/page-bond.c
@@ -645,6 +645,6 @@ bond_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
                      NULL);
        g_free (my_iface);
 
-       (*result_func) (connection, FALSE, NULL, user_data);
+       (*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
 }
 
diff --git a/src/connection-editor/page-bridge.c b/src/connection-editor/page-bridge.c
index 367dc50..1c33a7e 100644
--- a/src/connection-editor/page-bridge.c
+++ b/src/connection-editor/page-bridge.c
@@ -339,5 +339,5 @@ bridge_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
                      NULL);
        g_free (my_iface);
 
-       (*result_func) (connection, FALSE, NULL, user_data);
+       (*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
 }
diff --git a/src/connection-editor/page-dsl.c b/src/connection-editor/page-dsl.c
index 2a14fa1..19833c6 100644
--- a/src/connection-editor/page-dsl.c
+++ b/src/connection-editor/page-dsl.c
@@ -228,5 +228,5 @@ dsl_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
                      NULL);
        nm_connection_add_setting (connection, setting);
 
-       (*result_func) (connection, FALSE, NULL, user_data);
+       (*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
 }
diff --git a/src/connection-editor/page-ethernet.c b/src/connection-editor/page-ethernet.c
index c7c2ce6..e82800c 100644
--- a/src/connection-editor/page-ethernet.c
+++ b/src/connection-editor/page-ethernet.c
@@ -522,5 +522,5 @@ ethernet_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
                                     client);
        nm_connection_add_setting (connection, nm_setting_wired_new ());
 
-       (*result_func) (connection, FALSE, NULL, user_data);
+       (*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
 }
diff --git a/src/connection-editor/page-infiniband.c b/src/connection-editor/page-infiniband.c
index 1dafcb9..b1a3da1 100644
--- a/src/connection-editor/page-infiniband.c
+++ b/src/connection-editor/page-infiniband.c
@@ -254,5 +254,5 @@ infiniband_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
                                     client);
        nm_connection_add_setting (connection, nm_setting_infiniband_new ());
 
-       (*result_func) (connection, FALSE, NULL, user_data);
+       (*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
 }
diff --git a/src/connection-editor/page-mobile.c b/src/connection-editor/page-mobile.c
index e176cdc..aa84a4c 100644
--- a/src/connection-editor/page-mobile.c
+++ b/src/connection-editor/page-mobile.c
@@ -490,7 +490,7 @@ new_connection_mobile_wizard_done (NMAMobileWizard *wizard,
                nm_connection_add_setting (info->connection, nm_setting_ppp_new ());
        }
 
-       (*info->result_func) (info->connection, canceled, NULL, info->user_data);
+       (*info->result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, info->connection, canceled, NULL, 
info->user_data);
 
        if (wizard)
                nma_mobile_wizard_destroy (wizard);
diff --git a/src/connection-editor/page-team.c b/src/connection-editor/page-team.c
index 873656b..87adbea 100644
--- a/src/connection-editor/page-team.c
+++ b/src/connection-editor/page-team.c
@@ -1276,5 +1276,5 @@ team_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
                      NULL);
        g_free (my_iface);
 
-       (*result_func) (connection, FALSE, NULL, user_data);
+       (*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
 }
diff --git a/src/connection-editor/page-vlan.c b/src/connection-editor/page-vlan.c
index b442ff8..33e515c 100644
--- a/src/connection-editor/page-vlan.c
+++ b/src/connection-editor/page-vlan.c
@@ -801,5 +801,5 @@ vlan_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
                                     client);
        nm_connection_add_setting (connection, nm_setting_vlan_new ());
 
-       (*result_func) (connection, FALSE, NULL, user_data);
+       (*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
 }
diff --git a/src/connection-editor/page-vpn.c b/src/connection-editor/page-vpn.c
index df6f10c..7d327d1 100644
--- a/src/connection-editor/page-vpn.c
+++ b/src/connection-editor/page-vpn.c
@@ -224,7 +224,7 @@ vpn_type_result_func (FUNC_TAG_NEW_CONNECTION_RESULT_IMPL,
 {
        NewVpnInfo *info = user_data;
 
-       info->result_func (connection, connection == NULL, NULL, info->user_data);
+       info->result_func (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, connection == NULL, NULL, 
info->user_data);
        g_slice_free (NewVpnInfo, info);
 }
 
@@ -321,5 +321,5 @@ vpn_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
 
        complete_vpn_connection (connection, client);
 
-       (*result_func) (connection, FALSE, NULL, user_data);
+       (*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
 }
diff --git a/src/connection-editor/page-wifi.c b/src/connection-editor/page-wifi.c
index b992672..f2bb01d 100644
--- a/src/connection-editor/page-wifi.c
+++ b/src/connection-editor/page-wifi.c
@@ -620,5 +620,5 @@ wifi_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
        g_object_set (s_wifi, NM_SETTING_WIRELESS_MODE, "infrastructure", NULL);
        nm_connection_add_setting (connection, s_wifi);
 
-       (*result_func) (connection, FALSE, NULL, user_data);
+       (*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
 }


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