diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2018-06-07 16:27:51 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2018-06-19 19:58:03 +0200 |
commit | cb250c0031eea8793e6a5297e6e893fd50d475f2 (patch) | |
tree | 4ccadbf3dc9fbd7933589101523e8232cea0d37b | |
parent | 35cd05ebb99d32537d6f7bf41c129d09827704d5 (diff) | |
download | network-manager-applet-cb250c0031eea8793e6a5297e6e893fd50d475f2.tar.gz |
editor/connection-editor: use defines for signal names
Brings joy to Thomas while grepping through code.
-rw-r--r-- | src/connection-editor/nm-connection-editor.c | 2 | ||||
-rw-r--r-- | src/connection-editor/nm-connection-editor.h | 2 | ||||
-rw-r--r-- | src/connection-editor/nm-connection-list.c | 4 | ||||
-rw-r--r-- | src/connection-editor/page-master.c | 4 | ||||
-rw-r--r-- | src/connection-editor/page-vlan.c | 2 |
5 files changed, 8 insertions, 6 deletions
diff --git a/src/connection-editor/nm-connection-editor.c b/src/connection-editor/nm-connection-editor.c index 2addda8a..efb2d81a 100644 --- a/src/connection-editor/nm-connection-editor.c +++ b/src/connection-editor/nm-connection-editor.c @@ -538,7 +538,7 @@ nm_connection_editor_class_init (NMConnectionEditorClass *klass) /* Signals */ editor_signals[EDITOR_DONE] = - g_signal_new ("done", + g_signal_new (NM_CONNECTION_EDITOR_DONE, G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (NMConnectionEditorClass, done), diff --git a/src/connection-editor/nm-connection-editor.h b/src/connection-editor/nm-connection-editor.h index a072f241..65391af2 100644 --- a/src/connection-editor/nm-connection-editor.h +++ b/src/connection-editor/nm-connection-editor.h @@ -32,6 +32,8 @@ #define NM_IS_CONNECTION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CONNECTION_EDITOR)) #define NM_CONNECTION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONNECTION_EDITOR, NMConnectionEditor)) +#define NM_CONNECTION_EDITOR_DONE "done" + typedef struct GetSecretsInfo GetSecretsInfo; typedef struct { diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c index d3bb5fbe..0450c7c8 100644 --- a/src/connection-editor/nm-connection-list.c +++ b/src/connection-editor/nm-connection-list.c @@ -315,7 +315,7 @@ really_add_connection (FUNC_TAG_NEW_CONNECTION_RESULT_IMPL, return; } - g_signal_connect (editor, "done", G_CALLBACK (add_response_cb), list); + g_signal_connect (editor, NM_CONNECTION_EDITOR_DONE, G_CALLBACK (add_response_cb), list); nm_connection_editor_run (editor); } @@ -376,7 +376,7 @@ edit_connection (NMConnectionList *list, NMConnection *connection) NM_CONNECTION (connection), priv->client); if (editor) { - g_signal_connect (editor, "done", G_CALLBACK (edit_done_cb), list); + g_signal_connect (editor, NM_CONNECTION_EDITOR_DONE, G_CALLBACK (edit_done_cb), list); nm_connection_editor_run (editor); } } diff --git a/src/connection-editor/page-master.c b/src/connection-editor/page-master.c index 26ac5b6c..32025eee 100644 --- a/src/connection-editor/page-master.c +++ b/src/connection-editor/page-master.c @@ -383,7 +383,7 @@ add_connection (FUNC_TAG_NEW_CONNECTION_RESULT_IMPL, if (!editor) return; - g_signal_connect (editor, "done", G_CALLBACK (add_response_cb), self); + g_signal_connect (editor, NM_CONNECTION_EDITOR_DONE, G_CALLBACK (add_response_cb), self); nm_connection_editor_run (editor); } @@ -446,7 +446,7 @@ edit_clicked (GtkButton *button, gpointer user_data) if (!editor) return; - g_signal_connect (editor, "done", G_CALLBACK (edit_done_cb), self); + g_signal_connect (editor, NM_CONNECTION_EDITOR_DONE, G_CALLBACK (edit_done_cb), self); nm_connection_editor_run (editor); } diff --git a/src/connection-editor/page-vlan.c b/src/connection-editor/page-vlan.c index 199a97c1..c7977934 100644 --- a/src/connection-editor/page-vlan.c +++ b/src/connection-editor/page-vlan.c @@ -246,7 +246,7 @@ edit_parent (FUNC_TAG_NEW_CONNECTION_RESULT_IMPL, if (!editor) return; - g_signal_connect (editor, "done", G_CALLBACK (edit_parent_cb), self); + g_signal_connect (editor, NM_CONNECTION_EDITOR_DONE, G_CALLBACK (edit_parent_cb), self); nm_connection_editor_run (editor); } |