summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2011-12-13 22:28:27 +0100
committerAlexander Larsson <alexl@redhat.com>2011-12-13 22:28:27 +0100
commit3dd56d0ef6d6f1c2c0f29ad78c3a3aa533c994f6 (patch)
tree071fd1fdfb05bc601fb659a7daa4d6dfaef41d31
parentfe9fda29d928dfa28fa99922654d8f26c9adf240 (diff)
downloadgnome-contacts-3dd56d0ef6d6f1c2c0f29ad78c3a3aa533c994f6.tar.gz
Add helper to create entry + type combo
-rw-r--r--src/contacts-contact-pane.vala20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 3aebcf9..20b6aab 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -518,7 +518,27 @@ public class Contacts.FieldRow : Contacts.Row {
grid.add (l);
pack (grid);
+ }
+
+ public void pack_entry_detail_combo (string text, AbstractFieldDetails detail, TypeSet type_set, out Entry entry, out TypeCombo combo) {
+ var grid = new Grid ();
+ grid.set_column_spacing (16);
+
+ entry = new Entry ();
+ entry.set_text (text);
+ entry.set_hexpand (true);
+ entry.set_halign (Align.FILL);
+ grid.add (entry);
+ combo = new TypeCombo (type_set);
+ combo.set_hexpand (false);
+ combo.set_halign (Align.END);
+ combo.set_active (detail);
+
+ grid.set_halign (Align.FILL);
+ grid.add (combo);
+
+ pack (grid);
}
public Entry pack_entry (string s) {