[network-manager-applet/th/c-e-import-fixes-bgo774290: 2/10] c-e: tag PageNewConnectionFunc with a special argument



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

    c-e: tag PageNewConnectionFunc with a special argument

 src/connection-editor/ce-page.h            |    6 +++++-
 src/connection-editor/connection-helpers.c |    9 ++++++---
 src/connection-editor/page-bluetooth.c     |    3 ++-
 src/connection-editor/page-bluetooth.h     |    3 ++-
 src/connection-editor/page-bond.c          |    3 ++-
 src/connection-editor/page-bond.h          |    3 ++-
 src/connection-editor/page-bridge.c        |    3 ++-
 src/connection-editor/page-bridge.h        |    3 ++-
 src/connection-editor/page-dsl.c           |    3 ++-
 src/connection-editor/page-dsl.h           |    3 ++-
 src/connection-editor/page-ethernet.c      |    3 ++-
 src/connection-editor/page-ethernet.h      |    3 ++-
 src/connection-editor/page-infiniband.c    |    3 ++-
 src/connection-editor/page-infiniband.h    |    3 ++-
 src/connection-editor/page-mobile.c        |    3 ++-
 src/connection-editor/page-mobile.h        |    3 ++-
 src/connection-editor/page-team.c          |    3 ++-
 src/connection-editor/page-team.h          |    3 ++-
 src/connection-editor/page-vlan.c          |    3 ++-
 src/connection-editor/page-vlan.h          |    3 ++-
 src/connection-editor/page-vpn.c           |    3 ++-
 src/connection-editor/page-vpn.h           |    3 ++-
 src/connection-editor/page-wifi.c          |    3 ++-
 src/connection-editor/page-wifi.h          |    3 ++-
 24 files changed, 55 insertions(+), 26 deletions(-)
---
diff --git a/src/connection-editor/ce-page.h b/src/connection-editor/ce-page.h
index 7f21816..254810d 100644
--- a/src/connection-editor/ce-page.h
+++ b/src/connection-editor/ce-page.h
@@ -43,7 +43,11 @@ typedef void (*PageNewConnectionResultFunc) (NMConnection *connection,
 
 typedef GSList * (*PageGetConnectionsFunc) (gpointer user_data);
 
-typedef void (*PageNewConnectionFunc) (GtkWindow *parent,
+struct _func_tag_page_new_connection;
+#define FUNC_TAG_PAGE_NEW_CONNECTION_IMPL struct _func_tag_page_new_connection *_dummy
+#define FUNC_TAG_PAGE_NEW_CONNECTION_CALL ((struct _func_tag_page_new_connection *) NULL)
+typedef void (*PageNewConnectionFunc) (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                                       GtkWindow *parent,
                                        const char *detail,
                                        gpointer detail_data,
                                        NMConnection *connection,
diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c
index 5ed134f..502bf6c 100644
--- a/src/connection-editor/connection-helpers.c
+++ b/src/connection-editor/connection-helpers.c
@@ -255,7 +255,8 @@ import_vpn_from_file_cb (GtkWidget *dialog, gint response, gpointer user_data)
        if (connection) {
                /* Wrap around the actual new function so that the page can complete
                 * the missing parts, such as UUID or make up the connection name. */
-               vpn_connection_new (info->parent,
+               vpn_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_CALL,
+                                   info->parent,
                                    NULL,
                                    NULL,
                                    connection,
@@ -274,7 +275,8 @@ out:
 }
 
 static void
-vpn_connection_import (GtkWindow *parent,
+vpn_connection_import (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                       GtkWindow *parent,
                        const char *detail,
                        gpointer detail_data,
                        NMConnection *connection,
@@ -576,7 +578,8 @@ new_connection_of_type (GtkWindow *parent_window,
        ncd->result_func = result_func;
        ncd->user_data = user_data;
 
-       new_func (parent_window,
+       new_func (FUNC_TAG_PAGE_NEW_CONNECTION_CALL,
+                 parent_window,
                  detail,
                  detail_data,
                  connection,
diff --git a/src/connection-editor/page-bluetooth.c b/src/connection-editor/page-bluetooth.c
index 0b2966a..32f4f9b 100644
--- a/src/connection-editor/page-bluetooth.c
+++ b/src/connection-editor/page-bluetooth.c
@@ -285,7 +285,8 @@ out:
 }
 
 void
-bluetooth_connection_new (GtkWindow *parent,
+bluetooth_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                          GtkWindow *parent,
                           const char *detail,
                           gpointer detail_data,
                           NMConnection *connection,
diff --git a/src/connection-editor/page-bluetooth.h b/src/connection-editor/page-bluetooth.h
index ed82331..6032bd1 100644
--- a/src/connection-editor/page-bluetooth.h
+++ b/src/connection-editor/page-bluetooth.h
@@ -54,7 +54,8 @@ CEPage *ce_page_bluetooth_new (NMConnectionEditor *edit,
                                const char **out_secrets_setting_name,
                                GError **error);
 
-void bluetooth_connection_new (GtkWindow *parent,
+void bluetooth_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                               GtkWindow *parent,
                                const char *detail,
                                gpointer detail_data,
                                NMConnection *connection,
diff --git a/src/connection-editor/page-bond.c b/src/connection-editor/page-bond.c
index 812b3ce..cbe6e0b 100644
--- a/src/connection-editor/page-bond.c
+++ b/src/connection-editor/page-bond.c
@@ -599,7 +599,8 @@ ce_page_bond_class_init (CEPageBondClass *bond_class)
 
 
 void
-bond_connection_new (GtkWindow *parent,
+bond_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                     GtkWindow *parent,
                      const char *detail,
                      gpointer detail_data,
                      NMConnection *connection,
diff --git a/src/connection-editor/page-bond.h b/src/connection-editor/page-bond.h
index 2644563..1b9450f 100644
--- a/src/connection-editor/page-bond.h
+++ b/src/connection-editor/page-bond.h
@@ -50,7 +50,8 @@ CEPage *ce_page_bond_new (NMConnectionEditor *editor,
                           const char **out_secrets_setting_name,
                           GError **error);
 
-void bond_connection_new (GtkWindow *parent,
+void bond_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                          GtkWindow *parent,
                           const char *detail,
                           gpointer detail_data,
                           NMConnection *connection,
diff --git a/src/connection-editor/page-bridge.c b/src/connection-editor/page-bridge.c
index b7b7d6c..367dc50 100644
--- a/src/connection-editor/page-bridge.c
+++ b/src/connection-editor/page-bridge.c
@@ -293,7 +293,8 @@ ce_page_bridge_class_init (CEPageBridgeClass *bridge_class)
 }
 
 void
-bridge_connection_new (GtkWindow *parent,
+bridge_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                       GtkWindow *parent,
                        const char *detail,
                        gpointer detail_data,
                        NMConnection *connection,
diff --git a/src/connection-editor/page-bridge.h b/src/connection-editor/page-bridge.h
index b104ad5..9a14840 100644
--- a/src/connection-editor/page-bridge.h
+++ b/src/connection-editor/page-bridge.h
@@ -50,7 +50,8 @@ CEPage *ce_page_bridge_new (NMConnectionEditor *editor,
                             const char **out_secrets_setting_name,
                             GError **error);
 
-void bridge_connection_new (GtkWindow *parent,
+void bridge_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                            GtkWindow *parent,
                             const char *detail,
                             gpointer detail_data,
                             NMConnection *connection,
diff --git a/src/connection-editor/page-dsl.c b/src/connection-editor/page-dsl.c
index 95fdd7c..2a14fa1 100644
--- a/src/connection-editor/page-dsl.c
+++ b/src/connection-editor/page-dsl.c
@@ -202,7 +202,8 @@ ce_page_dsl_class_init (CEPageDslClass *dsl_class)
 
 
 void
-dsl_connection_new (GtkWindow *parent,
+dsl_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                    GtkWindow *parent,
                     const char *detail,
                     gpointer detail_data,
                     NMConnection *connection,
diff --git a/src/connection-editor/page-dsl.h b/src/connection-editor/page-dsl.h
index 853e42b..56a45bc 100644
--- a/src/connection-editor/page-dsl.h
+++ b/src/connection-editor/page-dsl.h
@@ -52,7 +52,8 @@ CEPage *ce_page_dsl_new (NMConnectionEditor *editor,
                          const char **out_secrets_setting_name,
                          GError **error);
 
-void dsl_connection_new (GtkWindow *parent,
+void dsl_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                         GtkWindow *parent,
                          const char *detail,
                          gpointer detail_data,
                          NMConnection *connection,
diff --git a/src/connection-editor/page-ethernet.c b/src/connection-editor/page-ethernet.c
index 307bfa9..c7c2ce6 100644
--- a/src/connection-editor/page-ethernet.c
+++ b/src/connection-editor/page-ethernet.c
@@ -506,7 +506,8 @@ ce_page_ethernet_class_init (CEPageEthernetClass *ethernet_class)
 
 
 void
-ethernet_connection_new (GtkWindow *parent,
+ethernet_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                         GtkWindow *parent,
                          const char *detail,
                          gpointer detail_data,
                          NMConnection *connection,
diff --git a/src/connection-editor/page-ethernet.h b/src/connection-editor/page-ethernet.h
index e88b717..3924867 100644
--- a/src/connection-editor/page-ethernet.h
+++ b/src/connection-editor/page-ethernet.h
@@ -52,7 +52,8 @@ CEPage *ce_page_ethernet_new (NMConnectionEditor *editor,
                               const char **out_secrets_setting_name,
                               GError **error);
 
-void ethernet_connection_new (GtkWindow *parent,
+void ethernet_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                              GtkWindow *parent,
                               const char *detail,
                               gpointer detail_data,
                               NMConnection *connection,
diff --git a/src/connection-editor/page-infiniband.c b/src/connection-editor/page-infiniband.c
index c45e16d..1dafcb9 100644
--- a/src/connection-editor/page-infiniband.c
+++ b/src/connection-editor/page-infiniband.c
@@ -238,7 +238,8 @@ ce_page_infiniband_class_init (CEPageInfinibandClass *infiniband_class)
 
 
 void
-infiniband_connection_new (GtkWindow *parent,
+infiniband_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                           GtkWindow *parent,
                            const char *detail,
                            gpointer detail_data,
                            NMConnection *connection,
diff --git a/src/connection-editor/page-infiniband.h b/src/connection-editor/page-infiniband.h
index f2079d1..65766f6 100644
--- a/src/connection-editor/page-infiniband.h
+++ b/src/connection-editor/page-infiniband.h
@@ -50,7 +50,8 @@ CEPage *ce_page_infiniband_new (NMConnectionEditor *editor,
                                 const char **out_secrets_setting_name,
                                 GError **error);
 
-void infiniband_connection_new (GtkWindow *parent,
+void infiniband_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                                GtkWindow *parent,
                                 const char *detail,
                                 gpointer detail_data,
                                 NMConnection *connection,
diff --git a/src/connection-editor/page-mobile.c b/src/connection-editor/page-mobile.c
index 205a659..e176cdc 100644
--- a/src/connection-editor/page-mobile.c
+++ b/src/connection-editor/page-mobile.c
@@ -507,7 +507,8 @@ cancel_dialog (GtkDialog *dialog)
 }
 
 void
-mobile_connection_new (GtkWindow *parent,
+mobile_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                       GtkWindow *parent,
                        const char *detail,
                        gpointer detail_data,
                        NMConnection *connection,
diff --git a/src/connection-editor/page-mobile.h b/src/connection-editor/page-mobile.h
index ebe318c..31694d0 100644
--- a/src/connection-editor/page-mobile.h
+++ b/src/connection-editor/page-mobile.h
@@ -52,7 +52,8 @@ CEPage *ce_page_mobile_new (NMConnectionEditor *editor,
                             const char **out_secrets_setting_name,
                             GError **error);
 
-void mobile_connection_new (GtkWindow *parent,
+void mobile_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                            GtkWindow *parent,
                             const char *detail,
                             gpointer detail_data,
                             NMConnection *connection,
diff --git a/src/connection-editor/page-team.c b/src/connection-editor/page-team.c
index af09a0b..873656b 100644
--- a/src/connection-editor/page-team.c
+++ b/src/connection-editor/page-team.c
@@ -1229,7 +1229,8 @@ ce_page_team_class_init (CEPageTeamClass *team_class)
 
 
 void
-team_connection_new (GtkWindow *parent,
+team_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                     GtkWindow *parent,
                      const char *detail,
                      gpointer detail_data,
                      NMConnection *connection,
diff --git a/src/connection-editor/page-team.h b/src/connection-editor/page-team.h
index ec61e63..eb9d783 100644
--- a/src/connection-editor/page-team.h
+++ b/src/connection-editor/page-team.h
@@ -50,7 +50,8 @@ CEPage *ce_page_team_new (NMConnectionEditor *editor,
                           const char **out_secrets_setting_name,
                           GError **error);
 
-void team_connection_new (GtkWindow *parent,
+void team_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                          GtkWindow *parent,
                           const char *detail,
                           gpointer detail_data,
                           NMConnection *connection,
diff --git a/src/connection-editor/page-vlan.c b/src/connection-editor/page-vlan.c
index 4ba8d97..b442ff8 100644
--- a/src/connection-editor/page-vlan.c
+++ b/src/connection-editor/page-vlan.c
@@ -785,7 +785,8 @@ ce_page_vlan_class_init (CEPageVlanClass *vlan_class)
 
 
 void
-vlan_connection_new (GtkWindow *parent,
+vlan_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                     GtkWindow *parent,
                      const char *detail,
                      gpointer detail_data,
                      NMConnection *connection,
diff --git a/src/connection-editor/page-vlan.h b/src/connection-editor/page-vlan.h
index 427a644..2209a24 100644
--- a/src/connection-editor/page-vlan.h
+++ b/src/connection-editor/page-vlan.h
@@ -50,7 +50,8 @@ CEPage *ce_page_vlan_new (NMConnectionEditor *editor,
                           const char **out_secrets_setting_name,
                           GError **error);
 
-void vlan_connection_new (GtkWindow *parent,
+void vlan_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                          GtkWindow *parent,
                           const char *detail,
                           gpointer detail_data,
                           NMConnection *connection,
diff --git a/src/connection-editor/page-vpn.c b/src/connection-editor/page-vpn.c
index 80d37f8..df6f10c 100644
--- a/src/connection-editor/page-vpn.c
+++ b/src/connection-editor/page-vpn.c
@@ -229,7 +229,8 @@ vpn_type_result_func (FUNC_TAG_NEW_CONNECTION_RESULT_IMPL,
 }
 
 void
-vpn_connection_new (GtkWindow *parent,
+vpn_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                    GtkWindow *parent,
                     const char *detail,
                     gpointer detail_data,
                     NMConnection *connection,
diff --git a/src/connection-editor/page-vpn.h b/src/connection-editor/page-vpn.h
index 6b52e10..97caf71 100644
--- a/src/connection-editor/page-vpn.h
+++ b/src/connection-editor/page-vpn.h
@@ -59,7 +59,8 @@ CEPage *ce_page_vpn_new (NMConnectionEditor *editor,
 
 gboolean ce_page_vpn_can_export (CEPageVpn *page);
 
-void vpn_connection_new (GtkWindow *parent,
+void vpn_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                         GtkWindow *parent,
                          const char *detail,
                          gpointer detail_data,
                          NMConnection *connection,
diff --git a/src/connection-editor/page-wifi.c b/src/connection-editor/page-wifi.c
index 9585d03..b992672 100644
--- a/src/connection-editor/page-wifi.c
+++ b/src/connection-editor/page-wifi.c
@@ -600,7 +600,8 @@ ce_page_wifi_class_init (CEPageWifiClass *wifi_class)
 
 
 void
-wifi_connection_new (GtkWindow *parent,
+wifi_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                     GtkWindow *parent,
                      const char *detail,
                      gpointer detail_data,
                      NMConnection *connection,
diff --git a/src/connection-editor/page-wifi.h b/src/connection-editor/page-wifi.h
index 9bf4ff7..573a41a 100644
--- a/src/connection-editor/page-wifi.h
+++ b/src/connection-editor/page-wifi.h
@@ -56,7 +56,8 @@ CEPage *ce_page_wifi_new (NMConnectionEditor *editor,
 GBytes *ce_page_wifi_get_ssid (CEPageWifi *self);
 
 
-void wifi_connection_new (GtkWindow *parent,
+void wifi_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
+                          GtkWindow *parent,
                           const char *detail,
                           gpointer detail_data,
                           NMConnection *connection,


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