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



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

    c-e: tag NewConnectionResultFunc with a special argument
    
    Allows you to grep for places that implement the function
    and which call it.

 src/connection-editor/connection-helpers.c |    4 ++--
 src/connection-editor/connection-helpers.h |    7 ++++++-
 src/connection-editor/nm-connection-list.c |    3 ++-
 src/connection-editor/page-master.c        |    3 ++-
 src/connection-editor/page-vlan.c          |    5 +++--
 src/connection-editor/page-vpn.c           |    4 +++-
 6 files changed, 18 insertions(+), 8 deletions(-)
---
diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c
index a9ab69d..5ed134f 100644
--- a/src/connection-editor/connection-helpers.c
+++ b/src/connection-editor/connection-helpers.c
@@ -555,7 +555,7 @@ new_connection_result (NMConnection *connection,
                                            (error && error->message) ? error->message : default_message);
        }
 
-       result_func (connection, user_data);
+       result_func (FUNC_TAG_NEW_CONNECTION_RESULT_CALL, connection, user_data);
 }
 
 void
@@ -690,7 +690,7 @@ new_connection_dialog_full (GtkWindow *parent_window,
                                        result_func,
                                        user_data);
        } else
-               result_func (NULL, user_data);
+               result_func (FUNC_TAG_NEW_CONNECTION_RESULT_CALL, NULL, user_data);
 }
 
 typedef struct {
diff --git a/src/connection-editor/connection-helpers.h b/src/connection-editor/connection-helpers.h
index caf3737..90f5265 100644
--- a/src/connection-editor/connection-helpers.h
+++ b/src/connection-editor/connection-helpers.h
@@ -36,7 +36,12 @@ ConnectionTypeData *get_connection_type_list (void);
 
 typedef gboolean (*NewConnectionTypeFilterFunc) (GType type,
                                                  gpointer user_data);
-typedef void (*NewConnectionResultFunc) (NMConnection *connection,
+
+struct _func_tag_new_connection_result;
+#define FUNC_TAG_NEW_CONNECTION_RESULT_IMPL struct _func_tag_new_connection_result *_dummy
+#define FUNC_TAG_NEW_CONNECTION_RESULT_CALL ((struct _func_tag_new_connection_result *) NULL)
+typedef void (*NewConnectionResultFunc) (FUNC_TAG_NEW_CONNECTION_RESULT_IMPL,
+                                         NMConnection *connection,
                                          gpointer user_data);
 
 void new_connection_dialog      (GtkWindow *parent_window,
diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c
index dfe6f28..4b7f759 100644
--- a/src/connection-editor/nm-connection-list.c
+++ b/src/connection-editor/nm-connection-list.c
@@ -266,7 +266,8 @@ add_response_cb (NMConnectionEditor *editor, GtkResponseType response, gpointer
 }
 
 static void
-really_add_connection (NMConnection *connection,
+really_add_connection (FUNC_TAG_NEW_CONNECTION_RESULT_IMPL,
+                       NMConnection *connection,
                        gpointer user_data)
 {
        NMConnectionList *list = user_data;
diff --git a/src/connection-editor/page-master.c b/src/connection-editor/page-master.c
index 2b744f2..eba7482 100644
--- a/src/connection-editor/page-master.c
+++ b/src/connection-editor/page-master.c
@@ -357,7 +357,8 @@ add_response_cb (NMConnectionEditor *editor, GtkResponseType response, gpointer
 }
 
 static void
-add_connection (NMConnection *connection,
+add_connection (FUNC_TAG_NEW_CONNECTION_RESULT_IMPL,
+                NMConnection *connection,
                 gpointer user_data)
 {
        CEPageMaster *self = user_data;
diff --git a/src/connection-editor/page-vlan.c b/src/connection-editor/page-vlan.c
index f72f4bd..4ba8d97 100644
--- a/src/connection-editor/page-vlan.c
+++ b/src/connection-editor/page-vlan.c
@@ -224,8 +224,9 @@ finish:
 }
 
 static void
-edit_parent (NMConnection *connection,
-                           gpointer user_data)
+edit_parent (FUNC_TAG_NEW_CONNECTION_RESULT_IMPL,
+             NMConnection *connection,
+             gpointer user_data)
 {
        CEPageVlan *self = user_data;
        CEPageVlanPrivate *priv = CE_PAGE_VLAN_GET_PRIVATE (self);
diff --git a/src/connection-editor/page-vpn.c b/src/connection-editor/page-vpn.c
index d5923f2..80d37f8 100644
--- a/src/connection-editor/page-vpn.c
+++ b/src/connection-editor/page-vpn.c
@@ -218,7 +218,9 @@ vpn_type_filter_func (GType type, gpointer user_data)
 }
 
 static void
-vpn_type_result_func (NMConnection *connection, gpointer user_data)
+vpn_type_result_func (FUNC_TAG_NEW_CONNECTION_RESULT_IMPL,
+                      NMConnection *connection,
+                      gpointer user_data)
 {
        NewVpnInfo *info = user_data;
 


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