aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-account-widget-skype.c12
-rw-r--r--libempathy-gtk/empathy-account-widget.c15
2 files changed, 22 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-account-widget-skype.c b/libempathy-gtk/empathy-account-widget-skype.c
index 9b8e6270f..2b6a769e8 100644
--- a/libempathy-gtk/empathy-account-widget-skype.c
+++ b/libempathy-gtk/empathy-account-widget-skype.c
@@ -962,12 +962,16 @@ static gboolean
is_other_psyke_account (TpAccount *ours,
TpAccount *other)
{
- if (ours == NULL)
- return TRUE;
+ gboolean paths_diff;
- return (tp_strdiff (
+ if (ours == NULL)
+ paths_diff = TRUE;
+ else
+ paths_diff = tp_strdiff (
tp_proxy_get_object_path (ours),
- tp_proxy_get_object_path (other)) &&
+ tp_proxy_get_object_path (other));
+
+ return (paths_diff &&
tp_account_is_enabled (other) &&
!tp_strdiff (tp_account_get_connection_manager (other), "psyke"));
}
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index c78bcb7b8..edc2f98eb 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -866,7 +866,20 @@ static void
account_widget_apply_clicked_cb (GtkWidget *button,
EmpathyAccountWidget *self)
{
- empathy_accounts_dialog_skype_disable_other_accounts (NULL, NULL);
+ EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
+ GtkWidget *parent;
+
+ parent = gtk_widget_get_toplevel (button);
+ if (!GTK_IS_WINDOW (parent) || !gtk_widget_is_toplevel (parent))
+ parent = NULL;
+
+ if (priv->creating_account)
+ {
+ if (!empathy_accounts_dialog_skype_disable_other_accounts (NULL,
+ GTK_WINDOW (parent)))
+ /* the user chose not to proceed */
+ return;
+ }
account_widget_apply_and_log_in (self);
}