aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-accounts-dialog.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-02-14 18:21:32 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-02-21 21:28:40 +0800
commitdacccf3c68817345bffaeff830f911eceee95cf2 (patch)
tree4c7a5fdbfe17172bf0f5f6b7afdc8096b866b1e4 /src/empathy-accounts-dialog.c
parente8dae499471d378eae7b0f1bff92b4b0788a0bc7 (diff)
downloadgsoc2013-empathy-dacccf3c68817345bffaeff830f911eceee95cf2.tar
gsoc2013-empathy-dacccf3c68817345bffaeff830f911eceee95cf2.tar.gz
gsoc2013-empathy-dacccf3c68817345bffaeff830f911eceee95cf2.tar.bz2
gsoc2013-empathy-dacccf3c68817345bffaeff830f911eceee95cf2.tar.lz
gsoc2013-empathy-dacccf3c68817345bffaeff830f911eceee95cf2.tar.xz
gsoc2013-empathy-dacccf3c68817345bffaeff830f911eceee95cf2.tar.zst
gsoc2013-empathy-dacccf3c68817345bffaeff830f911eceee95cf2.zip
try installing telepathy-haze
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r--src/empathy-accounts-dialog.c21
1 files changed, 21 insertions, 0 deletions
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 <libempathy/empathy-utils.h>
#include <libempathy/empathy-connection-managers.h>
#include <libempathy/empathy-connectivity.h>
+#include <libempathy/empathy-pkg-kit.h>
#include <libempathy/empathy-tp-contact-factory.h>
#include <libempathy-gtk/empathy-ui-utils.h>
@@ -262,6 +263,21 @@ accounts_dialog_enable_switch_active_cb (GtkSwitch *sw,
}
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
{