[gnome-contacts] Fixed link-suggestion grid behavior.
- From: Erick PÃrez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Fixed link-suggestion grid behavior.
- Date: Wed, 19 Dec 2012 21:28:04 +0000 (UTC)
commit c963505f6ae708a4be7bc2c3ad9b7ad95782a501
Author: Erick PÃrez Castellanos <erick red gmail com>
Date: Wed Dec 19 16:20:25 2012 -0500
Fixed link-suggestion grid behavior.
src/contacts-contact-pane.vala | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 9ff08a5..06932f0 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -95,6 +95,11 @@ public class Contacts.ContactPane : Grid {
public void add_suggestion (Contact c) {
var parent_overlay = this.get_parent () as Overlay;
+ if (suggestion_grid != null) {
+ suggestion_grid.destroy ();
+ suggestion_grid = null;
+ }
+
suggestion_grid = new Grid ();
suggestion_grid.set_valign (Align.END);
parent_overlay.add_overlay (suggestion_grid);
@@ -170,6 +175,11 @@ public class Contacts.ContactPane : Grid {
if (contact == new_contact)
return;
+ if (suggestion_grid != null) {
+ suggestion_grid.destroy ();
+ suggestion_grid = null;
+ }
+
if (contact != null) {
contact.personas_changed.disconnect (personas_changed_cb);
contact.changed.disconnect (contact_changed_cb);
@@ -182,9 +192,6 @@ public class Contacts.ContactPane : Grid {
update_sheet ();
- if (suggestion_grid != null)
- suggestion_grid.destroy ();
-
bool can_remove = false;
if (contact != null) {
@@ -442,8 +449,10 @@ public class Contacts.ContactPane : Grid {
sheet.clear ();
sheet.hide ();
- if (suggestion_grid != null)
+ if (suggestion_grid != null) {
suggestion_grid.destroy ();
+ suggestion_grid = null;
+ }
editor.clear ();
editor.update (contact);
@@ -458,8 +467,7 @@ public class Contacts.ContactPane : Grid {
Contact.set_persona_property.end (result);
} catch (Error e2) {
App.app.show_message (e2.message);
- /* FIXME: add this back */
- /* update_sheet (); */
+ update_sheet ();
}
});
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]