gnome: add to contact
Adds context menu item which allows the user to choose an existing
contact or create a new contact to add the selected contact method
to.
Note: this currently seems to fail with non local address books
(specifically with google contacts), even though the EDS methods
will ocasionally return as having succeeded. This is a bug which
will be addressed in later patches.
Issue: #78234
Change-Id: Ia7dc4e8cf5cc5582d4f734f6e46d26cf4b2195dd
diff --git a/ui/choosecontactview.ui b/ui/choosecontactview.ui
new file mode 100644
index 0000000..79c39bb
--- /dev/null
+++ b/ui/choosecontactview.ui
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="3.10"/>
+ <template class="ChooseContactView" parent="GtkBox">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow_choose_contact">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="shadow_type">none</property>
+ <property name="min-content-width">300</property>
+ <property name="min-content-height">300</property>
+ <child>
+ <object class="GtkTreeView" id="treeview_choose_contact">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers-visible">False</property>
+ <!-- we hide the expanders since there is no need to show the contact methods -->
+ <property name="show-expanders">False</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button_create_contact">
+ <property name="label" translatable="yes">Create New</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="always_show_image">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </template>
+</interface>