#include <stdlib.h>
#include <gtk/gtk.h>
-#include <glade/glade.h>
#include <glib/gi18n.h>
#include <dbus/dbus-glib.h>
gtk_container_add (GTK_CONTAINER (dialog->alignment_settings),
dialog->settings_widget);
+ gtk_widget_show (dialog->settings_widget);
gtk_image_set_from_icon_name (GTK_IMAGE (dialog->image_type),
McAccount *selected_account)
{
static EmpathyAccountsDialog *dialog = NULL;
- GladeXML *glade;
+ GtkBuilder *gui;
gchar *filename;
GList *accounts, *l;
gboolean import_asked;
dialog = g_new0 (EmpathyAccountsDialog, 1);
- filename = empathy_file_lookup ("empathy-accounts-dialog.glade",
+ filename = empathy_file_lookup ("empathy-accounts-dialog.ui",
"src");
- glade = empathy_glade_get_file (filename,
- "accounts_dialog",
- NULL,
+ gui = empathy_builder_get_file (filename,
"accounts_dialog", &dialog->window,
"vbox_details", &dialog->vbox_details,
"frame_no_profile", &dialog->frame_no_profile,
NULL);
g_free (filename);
- empathy_glade_connect (glade,
- dialog,
+ empathy_builder_connect (gui, dialog,
"accounts_dialog", "destroy", accounts_dialog_destroy_cb,
"accounts_dialog", "response", accounts_dialog_response_cb,
"button_create", "clicked", accounts_dialog_button_create_clicked_cb,
g_object_add_weak_pointer (G_OBJECT (dialog->window), (gpointer) &dialog);
- g_object_unref (glade);
+ g_object_unref (gui);
/* Create profile chooser */
dialog->combobox_profile = empathy_profile_chooser_new ();
empathy_conf_get_bool (empathy_conf_get (),
EMPATHY_PREFS_IMPORT_ASKED, &import_asked);
- if (!import_asked) {
- empathy_conf_set_bool (empathy_conf_get (),
- EMPATHY_PREFS_IMPORT_ASKED, TRUE);
- empathy_import_dialog_show (GTK_WINDOW (dialog->window),
- FALSE);
+
+ if (empathy_import_dialog_accounts_to_import ()) {
+
+ if (!import_asked) {
+ empathy_conf_set_bool (empathy_conf_get (),
+ EMPATHY_PREFS_IMPORT_ASKED, TRUE);
+ empathy_import_dialog_show (GTK_WINDOW (dialog->window),
+ FALSE);
+ }
+ } else {
+ gtk_widget_set_sensitive (dialog->button_import, FALSE);
}
return dialog->window;