diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2018-06-06 23:14:40 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2018-06-19 19:58:03 +0200 |
commit | dbbc4e9d068492db6d36f29f59030cffbd316a7a (patch) | |
tree | 08cab560dd1044233489d0e70a18fa6a3c092f25 | |
parent | dca00372da1030e001691699b92fce356c95fb25 (diff) | |
download | network-manager-applet-dbbc4e9d068492db6d36f29f59030cffbd316a7a.tar.gz |
editor/connection-list: drop editing-done signal
It's of no use anymore now that GtkApplication decides when to quit.
-rw-r--r-- | src/connection-editor/main.c | 8 | ||||
-rw-r--r-- | src/connection-editor/nm-connection-list.c | 19 | ||||
-rw-r--r-- | src/connection-editor/nm-connection-list.h | 3 |
3 files changed, 7 insertions, 23 deletions
diff --git a/src/connection-editor/main.c b/src/connection-editor/main.c index a678cdac..d3a716de 100644 --- a/src/connection-editor/main.c +++ b/src/connection-editor/main.c @@ -33,6 +33,8 @@ #include "connection-helpers.h" #include "vpn-helpers.h" +#define CONNECTION_LIST_TAG "nm-connection-list" + gboolean nm_ce_keep_above; /*************************************************/ @@ -78,7 +80,7 @@ handle_arguments (GApplication *application, const char *edit_uuid, const char *import) { - NMConnectionList *list = g_object_get_data (G_OBJECT (application), "connection-list"); + NMConnectionList *list = g_object_get_data (G_OBJECT (application), CONNECTION_LIST_TAG); gboolean show_list = TRUE; GType ctype = 0; gs_free char *type_tmp = NULL; @@ -204,7 +206,7 @@ editor_startup (GApplication *application, gpointer user_data) return; } - g_object_set_data_full (G_OBJECT (application), "connection-list", g_object_ref (list), g_object_unref); + g_object_set_data_full (G_OBJECT (application), CONNECTION_LIST_TAG, g_object_ref (list), g_object_unref); g_signal_connect_object (list, NM_CONNECTION_LIST_NEW_EDITOR, G_CALLBACK (new_editor_cb), application, 0); g_signal_connect_object (list, "notify::visible", G_CALLBACK (list_visible_cb), application, 0); g_signal_connect (list, "delete-event", G_CALLBACK (gtk_widget_hide_on_delete), NULL); @@ -213,7 +215,7 @@ editor_startup (GApplication *application, gpointer user_data) static void editor_activate (GApplication *application, gpointer user_data) { - NMConnectionList *list = g_object_get_data (G_OBJECT (application), "connection-list"); + NMConnectionList *list = g_object_get_data (G_OBJECT (application), CONNECTION_LIST_TAG); nm_connection_list_present (list); } diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c index 41a8adce..c3d886b6 100644 --- a/src/connection-editor/nm-connection-list.c +++ b/src/connection-editor/nm-connection-list.c @@ -38,7 +38,6 @@ extern gboolean nm_ce_keep_above; enum { - EDITING_DONE, NEW_EDITOR, LIST_LAST_SIGNAL }; @@ -286,7 +285,6 @@ add_response_cb (NMConnectionEditor *editor, GtkResponseType response, gpointer delete_slaves_of_connection (list, nm_connection_editor_get_connection (editor)); g_object_unref (editor); - g_signal_emit (list, list_signals[EDITING_DONE], 0, 0); } static void @@ -306,10 +304,8 @@ really_add_connection (FUNC_TAG_NEW_CONNECTION_RESULT_IMPL, NMConnectionListPrivate *priv = NM_CONNECTION_LIST_GET_PRIVATE (list); NMConnectionEditor *editor; - if (!connection) { - g_signal_emit (list, list_signals[EDITING_DONE], 0, 0); + if (!connection) return; - } if (connection_supports_proxy (connection) && !nm_connection_get_setting_proxy (connection)) nm_connection_add_setting (connection, nm_setting_proxy_new ()); @@ -319,10 +315,8 @@ really_add_connection (FUNC_TAG_NEW_CONNECTION_RESULT_IMPL, nm_connection_add_setting (connection, nm_setting_ip6_config_new ()); editor = nm_connection_editor_new (GTK_WINDOW (list), connection, priv->client); - if (!editor) { - g_signal_emit (list, list_signals[EDITING_DONE], 0, 0); + if (!editor) return; - } g_signal_connect (editor, NM_CONNECTION_EDITOR_DONE, G_CALLBACK (add_response_cb), list); g_signal_connect (editor, NM_CONNECTION_EDITOR_NEW_EDITOR, G_CALLBACK (new_editor_cb), list); @@ -366,7 +360,6 @@ edit_done_cb (NMConnectionEditor *editor, GtkResponseType response, gpointer use } g_object_unref (editor); - g_signal_emit (list, list_signals[EDITING_DONE], 0, 0); } static void @@ -533,14 +526,6 @@ nm_connection_list_class_init (NMConnectionListClass *klass) object_class->dispose = dispose; /* Signals */ - list_signals[EDITING_DONE] = - g_signal_new ("editing-done", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (NMConnectionListClass, editing_done), - NULL, NULL, NULL, - G_TYPE_NONE, 1, G_TYPE_INT); - list_signals[NEW_EDITOR] = g_signal_new (NM_CONNECTION_LIST_NEW_EDITOR, G_OBJECT_CLASS_TYPE (object_class), diff --git a/src/connection-editor/nm-connection-list.h b/src/connection-editor/nm-connection-list.h index ad3bae97..a4a9cc0a 100644 --- a/src/connection-editor/nm-connection-list.h +++ b/src/connection-editor/nm-connection-list.h @@ -46,9 +46,6 @@ typedef struct { typedef struct { GtkApplicationWindowClass parent_class; - - /* Signals */ - void (*editing_done) (NMConnectionList *list, gint result); } NMConnectionListClass; GType nm_connection_list_get_type (void); |