aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-12-21 23:24:56 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-12-22 17:46:20 +0800
commitd8e5f5d2ec4a2c3582d6764ea388e91ad91a45c6 (patch)
treeb7a667dbe4ae13e80db426e9585bc486976157f0
parent9e63d5fc6b9c74eb9a9961640be621ea2ce6c931 (diff)
downloadgsoc2013-empathy-d8e5f5d2ec4a2c3582d6764ea388e91ad91a45c6.tar
gsoc2013-empathy-d8e5f5d2ec4a2c3582d6764ea388e91ad91a45c6.tar.gz
gsoc2013-empathy-d8e5f5d2ec4a2c3582d6764ea388e91ad91a45c6.tar.bz2
gsoc2013-empathy-d8e5f5d2ec4a2c3582d6764ea388e91ad91a45c6.tar.lz
gsoc2013-empathy-d8e5f5d2ec4a2c3582d6764ea388e91ad91a45c6.tar.xz
gsoc2013-empathy-d8e5f5d2ec4a2c3582d6764ea388e91ad91a45c6.tar.zst
gsoc2013-empathy-d8e5f5d2ec4a2c3582d6764ea388e91ad91a45c6.zip
accounts-dialog: use the new account dialog
-rw-r--r--src/empathy-accounts-dialog.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 139f03db9..de15cae83 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -51,6 +51,7 @@
#include <libempathy-gtk/empathy-cell-renderer-activatable.h>
#include <libempathy-gtk/empathy-contact-widget.h>
#include <libempathy-gtk/empathy-images.h>
+#include <libempathy-gtk/empathy-new-account-dialog.h>
#include "empathy-accounts-dialog.h"
#include "empathy-import-dialog.h"
@@ -1018,10 +1019,28 @@ get_dialog_primary_text (TpAccount *account)
static void
accounts_dialog_button_add_clicked_cb (GtkWidget *button,
- EmpathyAccountsDialog *dialog)
+ EmpathyAccountsDialog *self)
{
- accounts_dialog_setup_ui_to_add_account (dialog);
- account_dialog_create_edit_params_dialog (dialog);
+ GtkWidget *dialog;
+ gint response;
+
+ dialog = empathy_new_account_dialog_new (GTK_WINDOW (self));
+ gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+
+ response = gtk_dialog_run (GTK_DIALOG (dialog));
+
+ if (response == GTK_RESPONSE_OK)
+ {
+ EmpathyAccountSettings *settings;
+
+ settings = empathy_new_account_dialog_get_settings (
+ EMPATHY_NEW_ACCOUNT_DIALOG (dialog));
+
+ accounts_dialog_add (self, settings);
+ accounts_dialog_model_set_selected (self, settings);
+ }
+
+ gtk_widget_destroy (dialog);
}
static void