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;
argv[i++] = path;
- if (selected_account)
+ if (selected_account != NULL)
{
const gchar *account_path;
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);
}
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);
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);
EmpathyMainWindow *window)
{
empathy_accounts_dialog_show_application (gdk_screen_get_default (),
- NULL, NULL, NULL, FALSE, FALSE);
+ NULL, FALSE, FALSE);
}
static void
empathy_accounts_dialog_show_application (
gtk_widget_get_screen (GTK_WIDGET (throbber_ebox)),
- NULL, NULL, NULL, FALSE, FALSE);
+ NULL, FALSE, FALSE);
return FALSE;
}
g_free (old_dir);
}
-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