Commit dbbc4e9d authored by Lubomir Rintel's avatar Lubomir Rintel

editor/connection-list: drop editing-done signal

It's of no use anymore now that GtkApplication decides when to quit.
parent dca00372
......@@ -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);
}
......
......@@ -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),
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment