diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2010-03-24 19:05:09 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2010-03-24 19:24:29 +0800 |
commit | a79cbb8de56de5a163340d31524f0f77bc35ac2a (patch) | |
tree | d21106a685ff51d7e21cd38df7436b09ed55b0c8 | |
parent | d47742d59d3635d1dc78cc298244baaeede9f67d (diff) | |
download | gsoc2013-empathy-a79cbb8de56de5a163340d31524f0f77bc35ac2a.tar gsoc2013-empathy-a79cbb8de56de5a163340d31524f0f77bc35ac2a.tar.gz gsoc2013-empathy-a79cbb8de56de5a163340d31524f0f77bc35ac2a.tar.bz2 gsoc2013-empathy-a79cbb8de56de5a163340d31524f0f77bc35ac2a.tar.lz gsoc2013-empathy-a79cbb8de56de5a163340d31524f0f77bc35ac2a.tar.xz gsoc2013-empathy-a79cbb8de56de5a163340d31524f0f77bc35ac2a.tar.zst gsoc2013-empathy-a79cbb8de56de5a163340d31524f0f77bc35ac2a.zip |
Automatically reap the empathy-accounts child process
Remove unrequired exit_cb code
-rw-r--r-- | src/empathy-accounts-dialog.c | 17 | ||||
-rw-r--r-- | src/empathy-accounts-dialog.h | 2 | ||||
-rw-r--r-- | src/empathy-main-window.c | 6 | ||||
-rw-r--r-- | src/empathy.c | 14 |
4 files changed, 8 insertions, 31 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 8e85a3653..6285d2d37 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -2286,13 +2286,10 @@ empathy_accounts_dialog_show (GtkWindow *parent, void empathy_accounts_dialog_show_application (GdkScreen *screen, - GChildWatchFunc application_exit_cb, - gpointer user_data, TpAccount *selected_account, gboolean if_needed, gboolean hidden) { - gint command_pid; GError *error = NULL; gchar *argv[4] = { NULL, }; gint i = 0; @@ -2314,7 +2311,7 @@ empathy_accounts_dialog_show_application (GdkScreen *screen, argv[i++] = path; - if (selected_account) + if (selected_account != NULL) { const gchar *account_path; @@ -2336,20 +2333,14 @@ empathy_accounts_dialog_show_application (GdkScreen *screen, selected_account == NULL ? "<none selected>" : tp_proxy_get_object_path (TP_PROXY (selected_account))); - gdk_spawn_on_screen (screen, NULL, argv, NULL, - G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, - &command_pid, &error); - if (error) + gdk_spawn_on_screen (screen, NULL, argv, NULL, G_SPAWN_SEARCH_PATH, + NULL, NULL, NULL, &error); + if (error != NULL) { g_warning ("Failed to open accounts dialog: %s", error->message); g_error_free (error); } - /* XXX: unportable cast to GPid; then again, gdk_spawn_on_screen() seems - * unportable since it always takes a gint* for the PID */ - if (application_exit_cb) - g_child_watch_add ((GPid) command_pid, application_exit_cb, NULL); - g_free (account_option); g_free (path); } diff --git a/src/empathy-accounts-dialog.h b/src/empathy-accounts-dialog.h index f7442345c..5fe6f51f7 100644 --- a/src/empathy-accounts-dialog.h +++ b/src/empathy-accounts-dialog.h @@ -61,8 +61,6 @@ void empathy_account_dialog_cancel (EmpathyAccountsDialog *dialog); gboolean empathy_accounts_dialog_is_creating (EmpathyAccountsDialog *dialog); void empathy_accounts_dialog_show_application (GdkScreen *screen, - GChildWatchFunc application_exit_cb, - gpointer user_data, TpAccount *selected_account, gboolean if_needed, gboolean hidden); diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index fe9af9c4d..daeefeb33 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -362,7 +362,7 @@ main_window_error_edit_clicked_cb (GtkButton *button, account = g_object_get_data (G_OBJECT (button), "account"); empathy_accounts_dialog_show_application ( - gtk_widget_get_screen (GTK_WIDGET (button)), NULL, NULL, + gtk_widget_get_screen (GTK_WIDGET (button)), account, FALSE, FALSE); main_window_remove_error (window, account); @@ -1068,7 +1068,7 @@ main_window_edit_accounts_cb (GtkAction *action, EmpathyMainWindow *window) { empathy_accounts_dialog_show_application (gdk_screen_get_default (), - NULL, NULL, NULL, FALSE, FALSE); + NULL, FALSE, FALSE); } static void @@ -1146,7 +1146,7 @@ main_window_throbber_button_press_event_cb (GtkWidget *throbber_ebox, empathy_accounts_dialog_show_application ( gtk_widget_get_screen (GTK_WIDGET (throbber_ebox)), - NULL, NULL, NULL, FALSE, FALSE); + NULL, FALSE, FALSE); return FALSE; } diff --git a/src/empathy.c b/src/empathy.c index f84791423..377feea30 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -241,23 +241,11 @@ migrate_config_to_xdg_dir (void) } static void -accounts_application_exited_cb (GPid pid, - gint status, - gpointer data) -{ - if (status) - { - g_warning ("accounts application exited with status %d: '%s'", - status, g_strerror (status)); - } -} - -static void show_accounts_ui (GdkScreen *screen, gboolean if_needed) { empathy_accounts_dialog_show_application (screen, - accounts_application_exited_cb, NULL, NULL, if_needed, start_hidden); + NULL, if_needed, start_hidden); } static UniqueResponse |