diff options
author | Thomas Haller <thaller@redhat.com> | 2016-11-11 15:01:21 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-11-22 11:47:29 +0100 |
commit | 4c968b3a2172de4011e5f1c95a17f7f5d9f53080 (patch) | |
tree | fec42110ab7342af92a304155c056c93baafca5d | |
parent | df2c1369cf18924ecd248125eaf12eec5b0eb0e5 (diff) | |
download | network-manager-applet-4c968b3a2172de4011e5f1c95a17f7f5d9f53080.tar.gz |
c-e: tag NewConnectionResultFunc with a special argument
Allows you to grep for places that implement the function
and which call it.
-rw-r--r-- | src/connection-editor/connection-helpers.c | 4 | ||||
-rw-r--r-- | src/connection-editor/connection-helpers.h | 7 | ||||
-rw-r--r-- | src/connection-editor/nm-connection-list.c | 3 | ||||
-rw-r--r-- | src/connection-editor/page-master.c | 3 | ||||
-rw-r--r-- | src/connection-editor/page-vlan.c | 5 | ||||
-rw-r--r-- | 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 a9ab69d0..5ed134f3 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 caf37376..90f5265e 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 dfe6f285..4b7f759f 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 2b744f28..eba7482c 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 f72f4bd8..4ba8d973 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 d5923f2b..80d37f88 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; |