aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-accounts-dialog.c
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-10-19 20:48:29 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-10-19 20:48:29 +0800
commit1ef2b69f17b6f66dd499bf1ebde8481bd43b6f2e (patch)
tree82df81264ab85ba837d0d3923ae98674768be48d /libempathy-gtk/empathy-accounts-dialog.c
parentba1c8fbfc68f2e772d0b9c9749dfc43120c7be20 (diff)
downloadgsoc2013-empathy-1ef2b69f17b6f66dd499bf1ebde8481bd43b6f2e.tar
gsoc2013-empathy-1ef2b69f17b6f66dd499bf1ebde8481bd43b6f2e.tar.gz
gsoc2013-empathy-1ef2b69f17b6f66dd499bf1ebde8481bd43b6f2e.tar.bz2
gsoc2013-empathy-1ef2b69f17b6f66dd499bf1ebde8481bd43b6f2e.tar.lz
gsoc2013-empathy-1ef2b69f17b6f66dd499bf1ebde8481bd43b6f2e.tar.xz
gsoc2013-empathy-1ef2b69f17b6f66dd499bf1ebde8481bd43b6f2e.tar.zst
gsoc2013-empathy-1ef2b69f17b6f66dd499bf1ebde8481bd43b6f2e.zip
2007-10-19 Xavier Claessens <xclaesse@gmail.com>
* libempathy-gtk/empathy-profile-chooser.c: * libempathy-gtk/empathy-profile-chooser.h: * libempathy-gtk/empathy-accounts-dialog.c: set unsensitive the add button if there is no profile installed and tell the user to install some connection managers. * libempathy-gtk/empathy-ui-utils.c: Fix indentation. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@381 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'libempathy-gtk/empathy-accounts-dialog.c')
-rw-r--r--libempathy-gtk/empathy-accounts-dialog.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/libempathy-gtk/empathy-accounts-dialog.c b/libempathy-gtk/empathy-accounts-dialog.c
index cc8ba4f45..914e6d471 100644
--- a/libempathy-gtk/empathy-accounts-dialog.c
+++ b/libempathy-gtk/empathy-accounts-dialog.c
@@ -240,6 +240,8 @@ accounts_dialog_update_account (EmpathyAccountsDialog *dialog,
if (!account) {
GtkTreeView *view;
GtkTreeModel *model;
+ GString *string;
+ gchar *str;
gtk_widget_show (dialog->frame_no_account);
gtk_widget_hide (dialog->vbox_details);
@@ -250,25 +252,32 @@ accounts_dialog_update_account (EmpathyAccountsDialog *dialog,
view = GTK_TREE_VIEW (dialog->treeview);
model = gtk_tree_view_get_model (view);
+ if (empathy_profile_chooser_n_profiles (dialog->combobox_profile) > 0) {
+ string = g_string_new (_("To add a new account, you can click on the "
+ "'Add' button and a new entry will be created "
+ "for you to start configuring."));
+ } else {
+ string = g_string_new (_("To add a new account, you first have to "
+ "install a backend for each protocol "
+ "you want to use."));
+ }
+
if (gtk_tree_model_iter_n_children (model, NULL) > 0) {
gtk_label_set_markup (GTK_LABEL (dialog->label_no_account),
_("<b>No Account Selected</b>"));
- gtk_label_set_markup (GTK_LABEL (dialog->label_no_account_blurb),
- _("To add a new account, you can click on the "
- "'Add' button and a new entry will be created "
- "for you to start configuring.\n"
- "\n"
- "If you do not want to add an account, simply "
- "click on the account you want to configure in "
- "the list on the left."));
+ g_string_append (string, _("\n\n"
+ "If you do not want to add an account, simply "
+ "click on the account you want to configure in "
+ "the list on the left."));
} else {
gtk_label_set_markup (GTK_LABEL (dialog->label_no_account),
_("<b>No Accounts Configured</b>"));
- gtk_label_set_markup (GTK_LABEL (dialog->label_no_account_blurb),
- _("To add a new account, you can click on the "
- "'Add' button and a new entry will be created "
- "for you to start configuring."));
}
+
+ str = g_string_free (string, FALSE);
+ gtk_label_set_markup (GTK_LABEL (dialog->label_no_account_blurb),
+ str);
+ g_free (str);
} else {
McProfile *profile;
const gchar *config_ui;
@@ -1044,6 +1053,9 @@ empathy_accounts_dialog_show (GtkWindow *parent)
dialog->combobox_profile,
TRUE, TRUE, 0);
gtk_widget_show (dialog->combobox_profile);
+ if (empathy_profile_chooser_n_profiles (dialog->combobox_profile) <= 0) {
+ gtk_widget_set_sensitive (dialog->button_add, FALSE);
+ }
/* Set up signalling */
dialog->mc = empathy_mission_control_new ();