diff options
author | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-03-08 01:55:48 +0800 |
---|---|---|
committer | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-03-15 02:46:45 +0800 |
commit | e24b350723d74b2f5f86401f3ecd6b85017bf592 (patch) | |
tree | 5dff85ffebf36bab8d1d15b8b5b125aca222dbb7 /src/empathy-accounts-dialog.c | |
parent | 79ca42a36ee2018e1973ccb933aaff49c5acce02 (diff) | |
download | gsoc2013-empathy-e24b350723d74b2f5f86401f3ecd6b85017bf592.tar gsoc2013-empathy-e24b350723d74b2f5f86401f3ecd6b85017bf592.tar.gz gsoc2013-empathy-e24b350723d74b2f5f86401f3ecd6b85017bf592.tar.bz2 gsoc2013-empathy-e24b350723d74b2f5f86401f3ecd6b85017bf592.tar.lz gsoc2013-empathy-e24b350723d74b2f5f86401f3ecd6b85017bf592.tar.xz gsoc2013-empathy-e24b350723d74b2f5f86401f3ecd6b85017bf592.tar.zst gsoc2013-empathy-e24b350723d74b2f5f86401f3ecd6b85017bf592.zip |
Show an EULA when creating an Skype account
The EULA is read from a file so it can be easily changed by
distributors / OEMs.
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r-- | src/empathy-accounts-dialog.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 3dfb40589..c5f94dd58 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -724,6 +724,8 @@ accounts_dialog_protocol_changed_cb (GtkWidget *widget, GtkTreeIter iter; gboolean creating; EmpathyAccountSettings *settings; + TpConnectionManager *cm; + TpConnectionManagerProtocol *proto; gchar *account = NULL, *password = NULL; /* The "changed" signal is fired during the initiation of the @@ -742,6 +744,25 @@ accounts_dialog_protocol_changed_cb (GtkWidget *widget, if (!gtk_tree_selection_get_selected (selection, &model, &iter)) return; + cm = empathy_protocol_chooser_dup_selected ( + EMPATHY_PROTOCOL_CHOOSER (priv->combobox_protocol), &proto, NULL, NULL); + + if (cm == NULL) + return; + + g_object_unref (cm); + + if (!tp_strdiff (proto->name, "skype")) + { + if (!account_widget_skype_show_eula (GTK_WINDOW (dialog))) + { + gtk_combo_box_set_active ( + GTK_COMBO_BOX (priv->combobox_protocol), 0); + empathy_account_dialog_cancel (dialog); + return; + } + } + /* Save "account" and "password" parameters */ g_object_get (priv->setting_widget_object, "settings", &settings, NULL); |