diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2007-06-09 03:22:39 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-06-09 03:22:39 +0800 |
commit | db7cecd7653d88081ea9c89ac7e68b0816961189 (patch) | |
tree | bfa907fe6da0e13001c0ec3c8617506e3e5d7e92 /libempathy-gtk/empathy-contact-dialogs.c | |
parent | d8b89b20f13552d3bd1c658f3396714e24744ff6 (diff) | |
download | gsoc2013-empathy-db7cecd7653d88081ea9c89ac7e68b0816961189.tar gsoc2013-empathy-db7cecd7653d88081ea9c89ac7e68b0816961189.tar.gz gsoc2013-empathy-db7cecd7653d88081ea9c89ac7e68b0816961189.tar.bz2 gsoc2013-empathy-db7cecd7653d88081ea9c89ac7e68b0816961189.tar.lz gsoc2013-empathy-db7cecd7653d88081ea9c89ac7e68b0816961189.tar.xz gsoc2013-empathy-db7cecd7653d88081ea9c89ac7e68b0816961189.tar.zst gsoc2013-empathy-db7cecd7653d88081ea9c89ac7e68b0816961189.zip |
Do not save when closing the dialog. Update information in real-time and
2007-06-08 Xavier Claessens <xclaesse@gmail.com>
* libempathy-gtk/empathy-contact-dialogs.c:
* libempathy-gtk/empathy-contact-widget.c:
* libempathy-gtk/empathy-contact-widget.h: Do not save when closing the
dialog. Update information in real-time and just provides a "Close"
button. That's more GNOME spirite.
* libempathy/empathy-tp-contact-list.c:
* libempathy/gossip-contact.h:
* libempathy/gossip-contact.c: New methods:
gossip_contact_add/remove_group(). This fixes leaks when a contact is
added/removed from a group.
svn path=/trunk/; revision=132
Diffstat (limited to 'libempathy-gtk/empathy-contact-dialogs.c')
-rw-r--r-- | libempathy-gtk/empathy-contact-dialogs.c | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c index e38eb84d1..ff2f87134 100644 --- a/libempathy-gtk/empathy-contact-dialogs.c +++ b/libempathy-gtk/empathy-contact-dialogs.c @@ -53,7 +53,6 @@ subscription_dialog_response_cb (GtkDialog *dialog, manager = empathy_contact_manager_new (); contact = empathy_contact_widget_get_contact (contact_widget); - empathy_contact_widget_save (contact_widget); if (response == GTK_RESPONSE_YES) { empathy_contact_list_add (EMPATHY_CONTACT_LIST (manager), @@ -131,11 +130,6 @@ contact_information_response_cb (GtkDialog *dialog, GossipContact *contact; contact = empathy_contact_widget_get_contact (contact_widget); - - if (response == GTK_RESPONSE_OK) { - empathy_contact_widget_save (contact_widget); - } - g_hash_table_remove (information_dialogs, contact); } @@ -163,35 +157,20 @@ empathy_contact_information_dialog_show (GossipContact *contact, return; } + /* Create dialog */ dialog = gtk_dialog_new (); gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); - if (edit) { - /* Cancel button */ - button = gtk_button_new_with_label (GTK_STOCK_CANCEL); - gtk_button_set_use_stock (GTK_BUTTON (button), TRUE); - gtk_dialog_add_action_widget (GTK_DIALOG (dialog), - button, - GTK_RESPONSE_CANCEL); - gtk_widget_show (button); - - button = gtk_button_new_with_label (GTK_STOCK_SAVE); - gtk_button_set_use_stock (GTK_BUTTON (button), TRUE); - gtk_dialog_add_action_widget (GTK_DIALOG (dialog), - button, - GTK_RESPONSE_OK); - gtk_widget_show (button); - } else { - /* Close button */ - button = gtk_button_new_with_label (GTK_STOCK_CLOSE); - gtk_button_set_use_stock (GTK_BUTTON (button), TRUE); - gtk_dialog_add_action_widget (GTK_DIALOG (dialog), - button, - GTK_RESPONSE_CLOSE); - gtk_widget_show (button); - } + /* Close button */ + button = gtk_button_new_with_label (GTK_STOCK_CLOSE); + gtk_button_set_use_stock (GTK_BUTTON (button), TRUE); + gtk_dialog_add_action_widget (GTK_DIALOG (dialog), + button, + GTK_RESPONSE_CLOSE); + gtk_widget_show (button); + /* Contact infor widget */ contact_widget = empathy_contact_widget_new (contact, edit); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), contact_widget, |