]> git.0d.be Git - empathy.git/commitdiff
Don't allow to change account if we are editing information of
authorXavier Claessens <xclaesse@gmail.com>
Sun, 21 Oct 2007 13:22:40 +0000 (13:22 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Sun, 21 Oct 2007 13:22:40 +0000 (13:22 +0000)
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

ChangeLog
libempathy-gtk/empathy-contact-dialogs.c
libempathy-gtk/empathy-contact-dialogs.h
libempathy-gtk/empathy-contact-list-view.c
libempathy-gtk/empathy-main-window.c

index 09a897d97b34305a78bee8f180e6035a508db556..3a11f14a7cfc3b6eb2dbc62bee09db516b18d406 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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:
index 96895cc2ff8f4bbbfb4886e17995a65e7cd795ba..6026374ea18023fe92f165c62ed81504fd9e32ba 100644 (file)
@@ -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);
index 65ded4e7e3cfa338de900a70fc127367ddfc4697..7cd7f4bc51bbbe091ba79ef0a215b7cbcf1d896e 100644 (file)
@@ -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
index a30298e3adc6322e2a2ffac2be4bd1ed92469e1e..0389a19b82dbe882069aa29490aa322ca15537f9 100644 (file)
@@ -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 */
index 26e54226f9f2b5ae4d94314a8b83332553fcbb59..8655c0c9922872d32358b0725ec0a10ef994b016 100644 (file)
@@ -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);