From 788470113896a3d6c7ff441b0ea031568029f83c Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Tue, 10 Mar 2009 11:20:01 +0000 Subject: Make the "Import Accounts" button insensitive if there's nothing to import. Signed-off-by: Jonny Lamb svn path=/trunk/; revision=2665 --- src/empathy-accounts-dialog.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/empathy-accounts-dialog.c') diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 892f24235..4d9456684 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -1153,11 +1153,17 @@ empathy_accounts_dialog_show (GtkWindow *parent, 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; -- cgit v1.2.3