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;
g_slice_free (EmpathyImportDialog, dialog);
}
+gboolean
+empathy_import_dialog_accounts_to_import (void)
+{
+ return empathy_import_pidgin_accounts_to_import ();
+}
+
void
empathy_import_dialog_show (GtkWindow *parent,
gboolean warning)
EmpathyImportAccountData *empathy_import_account_data_new (const gchar *source);
void empathy_import_account_data_free (EmpathyImportAccountData *data);
+gboolean empathy_import_dialog_accounts_to_import (void);
void empathy_import_dialog_show (GtkWindow *parent, gboolean warning);
G_END_DECLS
return accounts;
}
+gboolean
+empathy_import_pidgin_accounts_to_import (void)
+{
+ gchar *filename;
+ gboolean out;
+ GFile *file;
+
+ filename = g_build_filename (g_get_home_dir (), ".purple", "accounts.xml", NULL);
+ file = g_file_new_for_path (filename);
+ out = g_file_query_exists (file, NULL);
+
+ g_free (filename);
+ g_object_unref (file);
+
+ return out;
+}
G_BEGIN_DECLS
GList *empathy_import_pidgin_load (void);
+gboolean empathy_import_pidgin_accounts_to_import (void);
G_END_DECLS