[gnome-contacts] Push edit mode down to FieldRow
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Push edit mode down to FieldRow
- Date: Fri, 16 Dec 2011 18:06:49 +0000 (UTC)
commit 19f08ba61dc1ed39cf87d4764e0017b1b913d8a3
Author: Alexander Larsson <alexl redhat com>
Date: Fri Dec 16 18:38:15 2011 +0100
Push edit mode down to FieldRow
This means we can also edit non-DataFieldRows, such as the title rows
for personas
src/contacts-contact-pane.vala | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index efeb9f2..d0af9ff 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -245,6 +245,13 @@ public class Contacts.FieldRow : Contacts.Row {
b.set_halign (Align.CENTER);
return b;
}
+
+ public virtual bool enter_edit_mode () {
+ return false;
+ }
+
+ public virtual void exit_edit_mode (bool save) {
+ }
}
public abstract class Contacts.FieldSet : Grid {
@@ -367,7 +374,7 @@ public abstract class Contacts.DataFieldRow : FieldRow {
return false;
}
- public bool enter_edit_mode () {
+ public override bool enter_edit_mode () {
if (!editable)
return false;
@@ -407,7 +414,7 @@ public abstract class Contacts.DataFieldRow : FieldRow {
return true;
}
- public void exit_edit_mode (bool save) {
+ public override void exit_edit_mode (bool save) {
if (!editable)
return;
@@ -1348,7 +1355,7 @@ public class Contacts.ContactPane : ScrolledWindow {
private Grid card_grid;
private Grid personas_grid;
public RowGroup row_group;
- public DataFieldRow? editing_row;
+ public FieldRow? editing_row;
public Button email_button;
public Button chat_button;
@@ -1551,7 +1558,7 @@ public class Contacts.ContactPane : ScrolledWindow {
update_buttons ();
}
- public void enter_edit_mode (DataFieldRow row) {
+ public void enter_edit_mode (FieldRow row) {
if (editing_row != row) {
exit_edit_mode (true);
editing_row = null;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]