[empathy] accounts-dialog: use the new account dialog



commit d8e5f5d2ec4a2c3582d6764ea388e91ad91a45c6
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Dec 21 16:24:56 2011 +0100

    accounts-dialog: use the new account dialog

 src/empathy-accounts-dialog.c |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 139f03d..de15cae 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]