diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2007-10-21 21:22:40 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-10-21 21:22:40 +0800 |
commit | 83e0eceb85a5362835421555408e90013664b00a (patch) | |
tree | 6193292ba2fb6995a6c1be4e17bb41275eddf357 | |
parent | 004e78f70d1088c94bdd00e66c96260abe03cae9 (diff) | |
download | gsoc2013-empathy-83e0eceb85a5362835421555408e90013664b00a.tar gsoc2013-empathy-83e0eceb85a5362835421555408e90013664b00a.tar.gz gsoc2013-empathy-83e0eceb85a5362835421555408e90013664b00a.tar.bz2 gsoc2013-empathy-83e0eceb85a5362835421555408e90013664b00a.tar.lz gsoc2013-empathy-83e0eceb85a5362835421555408e90013664b00a.tar.xz gsoc2013-empathy-83e0eceb85a5362835421555408e90013664b00a.tar.zst gsoc2013-empathy-83e0eceb85a5362835421555408e90013664b00a.zip |
Don't allow to change account if we are editing information of
2007-10-21 Xavier Claessens <xclaesse@gmail.com>
* libempathy-gtk/empathy-contact-dialogs.h:
* libempathy-gtk/empathy-contact-dialogs.c:
* libempathy-gtk/empathy-main-window.c:
* libempathy-gtk/empathy-contact-list-view.c: Don't allow to change
account if we are editing information of self-contact.
svn path=/trunk/; revision=385
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | libempathy-gtk/empathy-contact-dialogs.c | 12 | ||||
-rw-r--r-- | libempathy-gtk/empathy-contact-dialogs.h | 2 | ||||
-rw-r--r-- | libempathy-gtk/empathy-contact-list-view.c | 2 | ||||
-rw-r--r-- | libempathy-gtk/empathy-main-window.c | 2 |
5 files changed, 16 insertions, 9 deletions
@@ -1,5 +1,12 @@ 2007-10-21 Xavier Claessens <xclaesse@gmail.com> + * libempathy-gtk/empathy-contact-dialogs.h: + * libempathy-gtk/empathy-contact-dialogs.c: + * libempathy-gtk/empathy-main-window.c: + * libempathy-gtk/empathy-contact-list-view.c: + +2007-10-21 Xavier Claessens <xclaesse@gmail.com> + * libempathy-gtk/empathy-account-chooser.c: * libempathy-gtk/empathy-contact-dialogs.c: * libempathy-gtk/empathy-contact-widget.c: diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c index 96895cc2f..6026374ea 100644 --- a/libempathy-gtk/empathy-contact-dialogs.c +++ b/libempathy-gtk/empathy-contact-dialogs.c @@ -151,7 +151,7 @@ void empathy_contact_information_dialog_show (EmpathyContact *contact, GtkWindow *parent, gboolean edit, - gboolean edit_groups) + gboolean is_user) { GtkWidget *dialog; GtkWidget *button; @@ -186,12 +186,12 @@ empathy_contact_information_dialog_show (EmpathyContact *contact, /* Contact info widget */ if (edit) { flags |= EMPATHY_CONTACT_WIDGET_EDIT_ALIAS; - if (empathy_contact_is_user (contact)) { - flags |= EMPATHY_CONTACT_WIDGET_EDIT_ACCOUNT | - EMPATHY_CONTACT_WIDGET_EDIT_AVATAR; - } } - if (edit_groups) { + if (is_user) { + flags |= EMPATHY_CONTACT_WIDGET_EDIT_ACCOUNT; + flags |= EMPATHY_CONTACT_WIDGET_EDIT_AVATAR; + } + if (!is_user && edit) { flags |= EMPATHY_CONTACT_WIDGET_EDIT_GROUPS; } contact_widget = empathy_contact_widget_new (contact, flags); diff --git a/libempathy-gtk/empathy-contact-dialogs.h b/libempathy-gtk/empathy-contact-dialogs.h index 65ded4e7e..7cd7f4bc5 100644 --- a/libempathy-gtk/empathy-contact-dialogs.h +++ b/libempathy-gtk/empathy-contact-dialogs.h @@ -34,7 +34,7 @@ void empathy_subscription_dialog_show (EmpathyContact *contact, void empathy_contact_information_dialog_show (EmpathyContact *contact, GtkWindow *parent, gboolean edit, - gboolean edit_groups); + gboolean is_user); void empathy_new_contact_dialog_show (GtkWindow *parent); G_END_DECLS diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c index a30298e3a..0389a19b8 100644 --- a/libempathy-gtk/empathy-contact-list-view.c +++ b/libempathy-gtk/empathy-contact-list-view.c @@ -1404,7 +1404,7 @@ contact_list_view_action_cb (GtkAction *action, empathy_contact_information_dialog_show (contact, parent, FALSE, FALSE); } else if (contact && strcmp (name, "Edit") == 0) { - empathy_contact_information_dialog_show (contact, parent, TRUE, TRUE); + empathy_contact_information_dialog_show (contact, parent, TRUE, FALSE); } else if (contact && strcmp (name, "Remove") == 0) { /* FIXME: Ask for confirmation */ diff --git a/libempathy-gtk/empathy-main-window.c b/libempathy-gtk/empathy-main-window.c index 26e54226f..8655c0c99 100644 --- a/libempathy-gtk/empathy-main-window.c +++ b/libempathy-gtk/empathy-main-window.c @@ -668,7 +668,7 @@ main_window_edit_personal_information_cb (GtkWidget *widget, contact = empathy_contact_factory_get_user (factory, account); empathy_contact_information_dialog_show (contact, GTK_WINDOW (window->window), - TRUE, FALSE); + TRUE, TRUE); g_slist_foreach (accounts, (GFunc) g_object_unref, NULL); g_slist_free (accounts); g_object_unref (factory); |