From dacccf3c68817345bffaeff830f911eceee95cf2 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 14 Feb 2012 11:21:32 +0100 Subject: try installing telepathy-haze --- src/empathy-accounts-dialog.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src') diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index d25766cf2..a3cb149b3 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -261,6 +262,21 @@ accounts_dialog_enable_switch_active_cb (GtkSwitch *sw, accounts_dialog_enable_account_cb, NULL); } +static void +install_haze_cb (GObject *source, + GAsyncResult *result, + gpointer user_data) +{ + GError *error = NULL; + + if (!empathy_pkg_kit_install_packages_finish (result, &error)) + { + DEBUG ("Failed to install telepathy-haze: %s", error->message); + + g_error_free (error); + } +} + static void accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog, TpAccount *account) @@ -436,10 +452,15 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog, if (!tp_strdiff (tp_account_get_connection_manager (account), "butterfly")) { + const gchar *packages[] = { "telepathy-haze", NULL }; + accounts_dialog_status_infobar_set_message (dialog, _("This account has been disabled because it relies on an old, " "unsupported backend. Please install telepathy-haze and " "restart your session to migrate the account.")); + + empathy_pkg_kit_install_packages_async (0, packages, NULL, NULL, + install_haze_cb, NULL); } else { -- cgit v1.2.3