From 3dd56d0ef6d6f1c2c0f29ad78c3a3aa533c994f6 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 13 Dec 2011 22:28:27 +0100 Subject: Add helper to create entry + type combo --- src/contacts-contact-pane.vala | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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) { -- cgit v1.2.1