diff options
author | Dan Winship <danw@gnome.org> | 2014-01-24 10:24:29 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-01-30 11:43:15 -0500 |
commit | 54dab9caf9477f07955d44dd5675ed963c6df579 (patch) | |
tree | 8488f8b63f584a24b2090f6c40f104af457b6d88 /tui | |
parent | 7b85fb6f783847940bf1f9edd6923ff9d6c34ae6 (diff) | |
download | NetworkManager-54dab9caf9477f07955d44dd5675ed963c6df579.tar.gz |
tui: fix a crash when creating a new connection
Make all the signals RUN_FIRST instead of RUN_LAST. In particular,
this fixes a crash when creating a new connection and activating the
listbox directly, in which case nmt_newt_listbox_activated() was
running after NmtAddConnection:create_connection() had already quit
the form and unrealized the listbox.
Diffstat (limited to 'tui')
-rw-r--r-- | tui/newt/nmt-newt-button.c | 2 | ||||
-rw-r--r-- | tui/newt/nmt-newt-widget.c | 4 | ||||
-rw-r--r-- | tui/nmt-edit-connection-list.c | 6 | ||||
-rw-r--r-- | tui/nmt-widget-list.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/tui/newt/nmt-newt-button.c b/tui/newt/nmt-newt-button.c index cdec789814..97ad50ca67 100644 --- a/tui/newt/nmt-newt-button.c +++ b/tui/newt/nmt-newt-button.c @@ -241,7 +241,7 @@ nmt_newt_button_class_init (NmtNewtButtonClass *button_class) signals[CLICKED] = g_signal_new ("clicked", G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, + G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0); diff --git a/tui/newt/nmt-newt-widget.c b/tui/newt/nmt-newt-widget.c index f7c8d20fe5..ba37f173fe 100644 --- a/tui/newt/nmt-newt-widget.c +++ b/tui/newt/nmt-newt-widget.c @@ -580,7 +580,7 @@ nmt_newt_widget_class_init (NmtNewtWidgetClass *widget_class) signals[NEEDS_REBUILD] = g_signal_new ("needs-rebuild", G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (NmtNewtWidgetClass, needs_rebuild), NULL, NULL, NULL, G_TYPE_NONE, 0); @@ -594,7 +594,7 @@ nmt_newt_widget_class_init (NmtNewtWidgetClass *widget_class) signals[ACTIVATED] = g_signal_new ("activated", G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (NmtNewtWidgetClass, activated), NULL, NULL, NULL, G_TYPE_NONE, 0); diff --git a/tui/nmt-edit-connection-list.c b/tui/nmt-edit-connection-list.c index eeba78ddad..a08ffc75f2 100644 --- a/tui/nmt-edit-connection-list.c +++ b/tui/nmt-edit-connection-list.c @@ -425,7 +425,7 @@ nmt_edit_connection_list_class_init (NmtEditConnectionListClass *list_class) signals[ADD_CONNECTION] = g_signal_new ("add-connection", G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (NmtEditConnectionListClass, add_connection), NULL, NULL, NULL, G_TYPE_NONE, 0); @@ -441,7 +441,7 @@ nmt_edit_connection_list_class_init (NmtEditConnectionListClass *list_class) signals[EDIT_CONNECTION] = g_signal_new ("edit-connection", G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (NmtEditConnectionListClass, edit_connection), NULL, NULL, NULL, G_TYPE_NONE, 1, @@ -457,7 +457,7 @@ nmt_edit_connection_list_class_init (NmtEditConnectionListClass *list_class) signals[REMOVE_CONNECTION] = g_signal_new ("remove-connection", G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (NmtEditConnectionListClass, remove_connection), NULL, NULL, NULL, G_TYPE_NONE, 1, diff --git a/tui/nmt-widget-list.c b/tui/nmt-widget-list.c index eb3e850fca..83c0b9b9e8 100644 --- a/tui/nmt-widget-list.c +++ b/tui/nmt-widget-list.c @@ -412,7 +412,7 @@ nmt_widget_list_class_init (NmtWidgetListClass *list_class) signals[ADD_CLICKED] = g_signal_new ("add-clicked", G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (NmtWidgetListClass, add_clicked), NULL, NULL, NULL, G_TYPE_NONE, 0); @@ -431,7 +431,7 @@ nmt_widget_list_class_init (NmtWidgetListClass *list_class) signals[REMOVE_CLICKED] = g_signal_new ("remove-clicked", G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (NmtWidgetListClass, remove_clicked), NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_INT); |