gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r33570 - in gnunet-gtk: contrib src/include src/namestore


From: gnunet
Subject: [GNUnet-SVN] r33570 - in gnunet-gtk: contrib src/include src/namestore
Date: Fri, 6 Jun 2014 15:22:11 +0200

Author: grothoff
Date: 2014-06-06 15:22:11 +0200 (Fri, 06 Jun 2014)
New Revision: 33570

Added:
   gnunet-gtk/contrib/gnunet_namestore_edit_box.glade
   gnunet-gtk/src/namestore/plugin_gtk_namestore_box.c
Modified:
   gnunet-gtk/contrib/Makefile.am
   gnunet-gtk/contrib/gnunet_namestore_edit_srv.glade
   gnunet-gtk/src/include/gnunet_gtk_namestore_plugin.h
   gnunet-gtk/src/namestore/Makefile.am
   gnunet-gtk/src/namestore/gnunet-namestore-gtk.c
   gnunet-gtk/src/namestore/plugin_gtk_namestore_phone.c
   gnunet-gtk/src/namestore/plugin_gtk_namestore_soa.c
   gnunet-gtk/src/namestore/plugin_gtk_namestore_srv.c
Log:
basic logic to edit boxed srv

Modified: gnunet-gtk/contrib/Makefile.am
===================================================================
--- gnunet-gtk/contrib/Makefile.am      2014-06-06 13:17:21 UTC (rev 33569)
+++ gnunet-gtk/contrib/Makefile.am      2014-06-06 13:22:11 UTC (rev 33570)
@@ -68,6 +68,7 @@
   gnunet_namestore_gtk_qr_save_as_dialog.glade \
   gnunet_namestore_edit_a.glade \
   gnunet_namestore_edit_aaaa.glade \
+  gnunet_namestore_edit_box.glade \
   gnunet_namestore_edit_cert.glade \
   gnunet_namestore_edit_cname.glade \
   gnunet_namestore_edit_gns2dns.glade \

Added: gnunet-gtk/contrib/gnunet_namestore_edit_box.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_namestore_edit_box.glade                          
(rev 0)
+++ gnunet-gtk/contrib/gnunet_namestore_edit_box.glade  2014-06-06 13:22:11 UTC 
(rev 33570)
@@ -0,0 +1,1126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <object class="GtkDialog" id="edit_box_dialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="modal">True</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="destroy_with_parent">True</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="edit_dialog_vbox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="edit_dialog_action_area">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="edit_dialog_cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="edit_dialog_delete_button">
+                <property name="label">gtk-delete</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="edit_dialog_save_button">
+                <property name="label">gtk-save</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="tooltip_text" translatable="yes">Store the 
updated record in the database. If the record is public, GNUnet will begin to 
publish the record to the world, limiting your ability to change it later 
(based on the selected expiration values).</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkScrolledWindow" id="edit_box_scrolledwindow">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="shadow_type">in</property>
+            <child>
+              <object class="GtkViewport" id="edit_box_viewport">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkBox" id="edit_box_main_box">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkFrame" id="edit_dialog_name_frame">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">none</property>
+                        <child>
+                          <object class="GtkAlignment" 
id="edit_dialog_name_alignment">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkHBox" 
id="edit_dialog_name_hbox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkLabel" 
id="edit_dialog_srv_port_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" 
translatable="yes">_Port:</property>
+                                    <property 
name="use_underline">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkSpinButton" 
id="edit_dialog_srv_port_spinbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="max_length">5</property>
+                                    <property name="width_chars">5</property>
+                                    <property 
name="max_width_chars">5</property>
+                                    <property name="text" 
translatable="yes">80</property>
+                                    <property 
name="adjustment">edit_dialog_srv_port_adjustment</property>
+                                    <property name="climb_rate">1</property>
+                                    <property name="numeric">True</property>
+                                    <property name="value">80</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" 
id="edit_dialog_srv_protocol_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" 
translatable="yes">Protocol:</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBox" 
id="edit_dialog_srv_protocol_combobox">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property 
name="model">edit_dialog_protocol_liststore</property>
+                                    <property name="active">0</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" 
id="edit_dialog_srv_protocol_name_cellrenderertext"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">3</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" 
id="edit_dialog_srv_label_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" 
translatable="yes">Label:</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">4</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkEntry" 
id="edit_dialog_name_entry">
+                                    <property name="visible">True</property>
+                                    <property name="sensitive">False</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip_text" 
translatable="yes">Name of the record in the zone.</property>
+                                    <property name="max_length">63</property>
+                                    <property 
name="invisible_char">●</property>
+                                    <property 
name="primary_icon_activatable">False</property>
+                                    <property 
name="secondary_icon_activatable">False</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">5</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" 
id="edit_dialog_name_in_zone_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" 
translatable="yes">in</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">10</property>
+                                    <property name="position">6</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBox" 
id="edit_dialog_zone_combobox">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="tooltip_text" 
translatable="yes">Select the desired zone for the record.  Changing this value 
here will move the record to the selected zone.</property>
+                                    <property name="active">0</property>
+                                    <property 
name="entry_text_column">0</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" 
id="edit_dialog_zone_combobox_cellrenderertext"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">7</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="edit_dialog_name_label">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" 
translatable="yes">&lt;b&gt;Name&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkBox" id="edit_dialog_boxed_value_hbox">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkFrame" id="edit_dialog_srv_frame">
+                            <property name="can_focus">False</property>
+                            <property name="label_xalign">0</property>
+                            <property name="shadow_type">none</property>
+                            <child>
+                              <object class="GtkAlignment" 
id="edit_dialog_srv_alignment">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="top_padding">4</property>
+                                <property name="left_padding">12</property>
+                                <child>
+                                  <object class="GtkGrid" 
id="edit_dialog_srv_grid">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="row_spacing">5</property>
+                                    <property 
name="column_spacing">5</property>
+                                    <child>
+                                      <object class="GtkLabel" 
id="edit_dialog_srv_priority_label">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <property name="label" 
translatable="yes">Priority:</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="left_attach">0</property>
+                                        <property 
name="top_attach">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" 
id="edit_dialog_srv_weight_label">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <property name="label" 
translatable="yes">Weight:</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="left_attach">0</property>
+                                        <property 
name="top_attach">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" 
id="edit_dialog_srv_value_port_label">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <property name="label" 
translatable="yes">Port:</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="left_attach">0</property>
+                                        <property 
name="top_attach">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" 
id="edit_dialog_srv_target_label">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <property name="label" 
translatable="yes">Target:</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="left_attach">0</property>
+                                        <property 
name="top_attach">3</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" 
id="edit_dialog_srv_priority_spinbutton">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property name="tooltip_text" 
translatable="yes">Priority of the target, lower values means more 
preferred</property>
+                                        <property 
name="invisible_char">●</property>
+                                        <property name="text" 
translatable="yes">0</property>
+                                        <property 
name="primary_icon_activatable">False</property>
+                                        <property 
name="secondary_icon_activatable">False</property>
+                                        <property 
name="adjustment">srv_priority_adjustment</property>
+                                        <property 
name="numeric">True</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="left_attach">1</property>
+                                        <property 
name="top_attach">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" 
id="edit_dialog_srv_weight_spinbutton">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property name="tooltip_text" 
translatable="yes">Relative weight for records with the same priority</property>
+                                        <property 
name="invisible_char">●</property>
+                                        <property name="text" 
translatable="yes">0</property>
+                                        <property 
name="primary_icon_activatable">False</property>
+                                        <property 
name="secondary_icon_activatable">False</property>
+                                        <property 
name="adjustment">srv_weight_adjustment</property>
+                                        <property 
name="numeric">True</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="left_attach">1</property>
+                                        <property 
name="top_attach">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" 
id="edit_dialog_srv_value_port_spinbutton">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property name="tooltip_text" 
translatable="yes">TCP or UDP port on which the service is to be 
found</property>
+                                        <property 
name="invisible_char">●</property>
+                                        <property name="text" 
translatable="yes">0</property>
+                                        <property 
name="primary_icon_activatable">False</property>
+                                        <property 
name="secondary_icon_activatable">False</property>
+                                        <property 
name="adjustment">srv_port_adjustment</property>
+                                        <property 
name="numeric">True</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="left_attach">1</property>
+                                        <property 
name="top_attach">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkEntry" 
id="edit_dialog_srv_target_entry">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property name="tooltip_text" 
translatable="yes">Canonical hostname of the machine providing the 
service</property>
+                                        <property 
name="invisible_char">●</property>
+                                        <property 
name="primary_icon_activatable">False</property>
+                                        <property 
name="secondary_icon_activatable">False</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="left_attach">1</property>
+                                        <property 
name="top_attach">3</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                            <child type="label">
+                              <object class="GtkLabel" 
id="edit_dialog_srv_label">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" 
translatable="yes">&lt;b&gt;Service record (SRV)&lt;/b&gt;</property>
+                                <property name="use_markup">True</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="padding">5</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkFrame" id="edit_dialog_tlsa_frame">
+                            <property name="can_focus">False</property>
+                            <property name="label_xalign">0</property>
+                            <property name="shadow_type">none</property>
+                            <child>
+                              <object class="GtkAlignment" 
id="edit_dialog_tlsa_alignment">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="top_padding">4</property>
+                                <property name="left_padding">12</property>
+                                <child>
+                                  <object class="GtkVBox" 
id="edit_dialog_tlsa_vbox">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <child>
+                                      <object class="GtkHBox" 
id="edit_dialog_tlsa_usage_hbox">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <child>
+                                          <object class="GtkLabel" 
id="edit_dialog_tlsa_usage_label">
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">False</property>
+                                            <property name="label" 
translatable="yes">Usage:</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">False</property>
+                                            <property 
name="fill">False</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkRadioButton" 
id="edit_dialog_tlsa_usage_ca_radiobutton">
+                                            <property name="label" 
translatable="yes">CA Constr.</property>
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">True</property>
+                                            <property 
name="receives_default">False</property>
+                                            <property 
name="use_underline">True</property>
+                                            <property 
name="xalign">0</property>
+                                            <property 
name="active">True</property>
+                                            <property 
name="draw_indicator">True</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">False</property>
+                                            <property 
name="fill">False</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkRadioButton" 
id="edit_dialog_tlsa_usage_service_cert_radiobutton">
+                                            <property name="label" 
translatable="yes">Service Cert. Constr.</property>
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">True</property>
+                                            <property 
name="receives_default">False</property>
+                                            <property 
name="use_underline">True</property>
+                                            <property 
name="xalign">0</property>
+                                            <property 
name="draw_indicator">True</property>
+                                            <property 
name="group">edit_dialog_tlsa_usage_ca_radiobutton</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">False</property>
+                                            <property 
name="fill">False</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">2</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkRadioButton" 
id="edit_dialog_tlsa_usage_trust_anchor_radiobutton">
+                                            <property name="label" 
translatable="yes">Trust Anchor Assertion</property>
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">True</property>
+                                            <property 
name="receives_default">False</property>
+                                            <property 
name="xalign">0</property>
+                                            <property 
name="draw_indicator">True</property>
+                                            <property 
name="group">edit_dialog_tlsa_usage_ca_radiobutton</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">False</property>
+                                            <property 
name="fill">False</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">3</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkRadioButton" 
id="edit_dialog_tlsa_usage_domain_issued_cert_radiobutton">
+                                            <property name="label" 
translatable="yes">Domain Issued Cert.</property>
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">True</property>
+                                            <property 
name="receives_default">False</property>
+                                            <property 
name="xalign">0</property>
+                                            <property 
name="draw_indicator">True</property>
+                                            <property 
name="group">edit_dialog_tlsa_usage_ca_radiobutton</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">True</property>
+                                            <property 
name="fill">True</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">4</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkHBox" 
id="edit_dialog_tlsa_selector_hbox">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <child>
+                                          <object class="GtkLabel" 
id="edit_dialog_tlsa_selector_label">
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">False</property>
+                                            <property name="label" 
translatable="yes">Selector:</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">False</property>
+                                            <property 
name="fill">False</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkRadioButton" 
id="edit_dialog_tlsa_selector_full_cert_radiobutton">
+                                            <property name="label" 
translatable="yes">Full certificate</property>
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">True</property>
+                                            <property 
name="receives_default">False</property>
+                                            <property 
name="xalign">0</property>
+                                            <property 
name="active">True</property>
+                                            <property 
name="draw_indicator">True</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">False</property>
+                                            <property 
name="fill">False</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkRadioButton" 
id="edit_dialog_tlsa_selector_subject_public_key_radiobutton">
+                                            <property name="label" 
translatable="yes">Subject public key</property>
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">True</property>
+                                            <property 
name="receives_default">False</property>
+                                            <property 
name="xalign">0</property>
+                                            <property 
name="draw_indicator">True</property>
+                                            <property 
name="group">edit_dialog_tlsa_selector_full_cert_radiobutton</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">False</property>
+                                            <property 
name="fill">False</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">2</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkHBox" 
id="edit_dialog_tlsa_matching_type_hbox">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <child>
+                                          <object class="GtkLabel" 
id="edit_dialog_tlsa_matching_type_label">
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">False</property>
+                                            <property name="label" 
translatable="yes">Matching-Type:</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">False</property>
+                                            <property 
name="fill">False</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkRadioButton" 
id="edit_dialog_tlsa_matching_type_full_contents_radiobutton">
+                                            <property name="label" 
translatable="yes">Full contents</property>
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">True</property>
+                                            <property 
name="receives_default">False</property>
+                                            <property 
name="xalign">0</property>
+                                            <property 
name="active">True</property>
+                                            <property 
name="draw_indicator">True</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">False</property>
+                                            <property 
name="fill">False</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkRadioButton" 
id="edit_dialog_tlsa_matching_type_sha256_radiobutton">
+                                            <property name="label" 
translatable="yes">SHA-256</property>
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">True</property>
+                                            <property 
name="receives_default">False</property>
+                                            <property 
name="xalign">0</property>
+                                            <property 
name="draw_indicator">True</property>
+                                            <property 
name="group">edit_dialog_tlsa_matching_type_full_contents_radiobutton</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">False</property>
+                                            <property 
name="fill">False</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">2</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkRadioButton" 
id="edit_dialog_tlsa_matching_type_sha512_radiobutton">
+                                            <property name="label" 
translatable="yes">SHA-512</property>
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">True</property>
+                                            <property 
name="receives_default">False</property>
+                                            <property 
name="xalign">0</property>
+                                            <property 
name="draw_indicator">True</property>
+                                            <property 
name="group">edit_dialog_tlsa_matching_type_full_contents_radiobutton</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">False</property>
+                                            <property 
name="fill">False</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">3</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkHBox" 
id="edit_dialog_tlsa_value_hbox">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <child>
+                                          <object class="GtkLabel" 
id="edit_dialog_tlsa_value_label">
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">False</property>
+                                            <property name="label" 
translatable="yes">Certificate:</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">False</property>
+                                            <property 
name="fill">False</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkTextView" 
id="edit_dialog_tlsa_value_textview">
+                                            <property 
name="height_request">100</property>
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">True</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">True</property>
+                                            <property 
name="fill">True</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">3</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkHBox" 
id="edit_dialog_tlsa_import_hbox">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <child>
+                                          <object class="GtkLabel" 
id="edit_dialog_tlsa_import_label">
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">False</property>
+                                            <property name="label" 
translatable="yes">Import ID:</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">False</property>
+                                            <property 
name="fill">False</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkEntry" 
id="edit_dialog_tlsa_import_entry">
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">True</property>
+                                            <property name="tooltip_text" 
translatable="yes">Enter identifier to import certificate information from the 
network.
+For example, for X.509 specify the DNS name.
+For PGP, specify the key identifier.
+</property>
+                                            <property 
name="max_length">15</property>
+                                            <property 
name="invisible_char">●</property>
+                                            <property 
name="primary_icon_activatable">False</property>
+                                            <property 
name="secondary_icon_activatable">False</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">True</property>
+                                            <property 
name="fill">True</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" 
id="edit_dialog_tlsa_import_button">
+                                            <property 
name="label">gtk-convert</property>
+                                            <property 
name="visible">True</property>
+                                            <property 
name="can_focus">True</property>
+                                            <property 
name="receives_default">True</property>
+                                            <property name="tooltip_text" 
translatable="yes">Import Certificate from external source.</property>
+                                            <property 
name="use_stock">True</property>
+                                          </object>
+                                          <packing>
+                                            <property 
name="expand">False</property>
+                                            <property 
name="fill">False</property>
+                                            <property 
name="padding">5</property>
+                                            <property 
name="position">2</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">4</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                            <child type="label">
+                              <object class="GtkLabel" 
id="edit_dialog_tlsa_label">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" 
translatable="yes">&lt;b&gt;TLSA Record Information&lt;/b&gt;</property>
+                                <property name="use_markup">True</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="padding">5</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="edit_dialog_options_frame">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">none</property>
+                        <child>
+                          <object class="GtkAlignment" 
id="edit_dialog_options_alignment">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkVBox" 
id="edit_dialog_options_vbox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkCheckButton" 
id="edit_dialog_options_public_checkbutton">
+                                    <property name="label" 
translatable="yes">Record is public (visible to other users)</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property 
name="receives_default">False</property>
+                                    <property name="tooltip_text" 
translatable="yes">Not that while it is recommended that 'private' records 
should be in the 'private zone', you are allowed to mark records in other zones 
as private as well.  Please be aware that once a record is made public, you are 
less free to change expiration times.  Most importantly, if your record is set 
to never expire, you will never be able to change the mapping in the future if 
the record is public.</property>
+                                    <property name="xalign">0</property>
+                                    <property 
name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" 
id="edit_dialog_options_shadow_checkbutton">
+                                    <property name="label" 
translatable="yes">Record is a shadow record (valid after other records 
expire)</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property 
name="receives_default">False</property>
+                                    <property name="tooltip_text" 
translatable="yes">A shadow record is a record which becomes valid in the 
future.  They are not used as long as a second non-expired record with the same 
name and type exists. This is useful if a mapping is to be changed as soon as 
an existing record expires. For example, if a users are supposed to switch at 
midnight from one IP address to another, two records would be placed into the 
system: one that is valid until midnight, and a second "shadow" record that 
becomes valid at midnight.</property>
+                                    <property name="xalign">0</property>
+                                    <property 
name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" 
id="edit_dialog_options_pending_checkbutton">
+                                    <property name="label" 
translatable="yes">Record is pending approval (not currently usable for 
anyone)</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property 
name="receives_default">False</property>
+                                    <property name="xalign">0</property>
+                                    <property 
name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" 
id="edit_dialog_options_label">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" 
translatable="yes">&lt;b&gt;Options&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" 
id="edit_dialog_expiration_frame">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">none</property>
+                        <child>
+                          <object class="GtkAlignment" 
id="edit_dialog_expiration_alignment">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="top_padding">5</property>
+                            <property name="bottom_padding">5</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkVBox" 
id="edit_dialog_expiration_vbox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">5</property>
+                                <child>
+                                  <object class="GtkHBox" 
id="edit_dialog_expiration_hbox">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <child>
+                                      <object class="GtkRadioButton" 
id="edit_dialog_expiration_relative_radiobutton">
+                                        <property name="label" 
translatable="yes">Relative</property>
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property 
name="receives_default">False</property>
+                                        <property name="tooltip_text" 
translatable="yes">Records with a relative expiration time (such as 1 week) are 
always valid for at least that time period into the future. In other words, the 
auto-renew their own expiration to the given time period into the future. When 
you convert a public record with a relative expiration time to one with an 
absolute expiration time, the earliest possible expiration will be the 
respective relative time in the future. Use relative expiration times for 
entries for which you do not know a specific date when they will 
expire.</property>
+                                        <property name="xalign">0</property>
+                                        <property name="active">True</property>
+                                        <property 
name="draw_indicator">True</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkRadioButton" 
id="edit_dialog_expiration_absolute_radiobutton">
+                                        <property name="label" 
translatable="yes">Absolute</property>
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property 
name="receives_default">False</property>
+                                        <property name="tooltip_text" 
translatable="yes">Records with an absolute expiration time are valid until the 
specified date. You can change that date to an even later date, but you cannot 
set it to an earlier time (as other users may have cached the longer expiration 
time). Use absolute expiration times if you know that a particular record will 
only be valid until a particular day.</property>
+                                        <property name="xalign">0</property>
+                                        <property 
name="draw_indicator">True</property>
+                                        <property 
name="group">edit_dialog_expiration_relative_radiobutton</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkRadioButton" 
id="edit_dialog_expiration_never_radiobutton">
+                                        <property name="label" 
translatable="yes">Never</property>
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property 
name="receives_default">False</property>
+                                        <property name="tooltip_text" 
translatable="yes">Records can be set to be valid forever. This is great if you 
are worried about censorship or certain that the mapping will never change.  
Note that if you set a public record to never expire, you cannot later change 
it (as other users are free to cache the old value forever).</property>
+                                        <property name="xalign">0</property>
+                                        <property 
name="draw_indicator">True</property>
+                                        <property 
name="group">edit_dialog_expiration_relative_radiobutton</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">2</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCalendar" 
id="edit_dialog_expiration_absolute_calendar">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip_text" 
translatable="yes">Select the date on which you want this record to expire. At 
that date, you can then create a new mapping or have a shadow record go 
automatically into effect.  Note that for public records you cannot change the 
expiration time to an earlier date after the fact.</property>
+                                    <property name="year">2012</property>
+                                    <property name="month">9</property>
+                                    <property name="day">17</property>
+                                    <property 
name="show_week_numbers">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkHBox" 
id="edit_dialog_expiration_absolute_hbox">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <child>
+                                      <object class="GtkLabel" 
id="edit_dialog_expiration_absolute_hours_label">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <property name="label" 
translatable="yes">Hours:</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="padding">5</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" 
id="edit_dialog_expiration_absolute_hours_spinbutton">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property name="tooltip_text" 
translatable="yes">Which hour of the day selected above should the record 
expire?</property>
+                                        <property 
name="max_length">2</property>
+                                        <property 
name="invisible_char">●</property>
+                                        <property name="text" 
translatable="yes">0</property>
+                                        <property 
name="primary_icon_activatable">False</property>
+                                        <property 
name="secondary_icon_activatable">False</property>
+                                        <property 
name="adjustment">absolute_expiration_hours_adjustment</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" 
id="edit_dialog_expiration_absolute_minutes_label">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <property name="label" 
translatable="yes">Minutes:</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="padding">5</property>
+                                        <property name="position">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" 
id="edit_dialog_expiration_absolute_minutes_spinbutton">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property name="tooltip_text" 
translatable="yes">Which minute of the day selected above should the record 
expire?</property>
+                                        <property 
name="max_length">2</property>
+                                        <property 
name="invisible_char">●</property>
+                                        <property name="text" 
translatable="yes">0</property>
+                                        <property 
name="primary_icon_activatable">False</property>
+                                        <property 
name="secondary_icon_activatable">False</property>
+                                        <property 
name="adjustment">absolute_expiration_minutes_adjustment</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">3</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" 
id="edit_dialog_expiration_absolute_seconds_label">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <property name="label" 
translatable="yes">Seconds:</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="padding">5</property>
+                                        <property name="position">4</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" 
id="edit_dialog_expiration_absolute_seconds_spinbutton">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property name="tooltip_text" 
translatable="yes">Which second of the day selected above should the record 
expire?</property>
+                                        <property 
name="max_length">2</property>
+                                        <property 
name="invisible_char">●</property>
+                                        <property name="text" 
translatable="yes">0</property>
+                                        <property 
name="primary_icon_activatable">False</property>
+                                        <property 
name="secondary_icon_activatable">False</property>
+                                        <property 
name="adjustment">absolute_expiration_seconds_adjustment</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">5</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBox" 
id="edit_dialog_expiration_relative_combobox">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="tooltip_text" 
translatable="yes">Relative expiration time of the record.  The syntax is a 
number followed by a space and a time unit, possibly followed by additional 
numbers and time units. For example, you can specify "1 d" or "6 h 30 m 15 s". 
Use the drop-down menu to select from a set of common defaults. (Editing is not 
possible right now as Gtk2 and Gtk3 use incompatible ways for doing this.) 
</property>
+                                    <property 
name="model">edit_dialog_expiration_relative_liststore</property>
+                                    <property 
name="entry_text_column">0</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" 
id="edit_dialog_expiration_relative_combobox_cellrenderertext"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">3</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" 
id="edit_dialog_expiration_label">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" 
translatable="yes">&lt;b&gt;Expiration Time&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-6">edit_dialog_cancel_button</action-widget>
+      <action-widget response="-2">edit_dialog_delete_button</action-widget>
+      <action-widget response="-5">edit_dialog_save_button</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkListStore" id="edit_dialog_expiration_relative_liststore">
+    <columns>
+      <!-- column-name relativetime -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0">7 days</col>
+      </row>
+      <row>
+        <col id="0">1 day</col>
+      </row>
+      <row>
+        <col id="0">1 h</col>
+      </row>
+    </data>
+  </object>
+</interface>

Modified: gnunet-gtk/contrib/gnunet_namestore_edit_srv.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_namestore_edit_srv.glade  2014-06-06 13:17:21 UTC 
(rev 33569)
+++ gnunet-gtk/contrib/gnunet_namestore_edit_srv.glade  2014-06-06 13:22:11 UTC 
(rev 33570)
@@ -67,21 +67,6 @@
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
-  <object class="GtkAdjustment" id="srv_port_adjustment">
-    <property name="upper">65535</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="srv_priority_adjustment">
-    <property name="upper">9999999</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="srv_weight_adjustment">
-    <property name="upper">65535</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
   <object class="GtkDialog" id="edit_srv_dialog">
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
@@ -95,704 +80,721 @@
         <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="edit_dialog_action_area">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="edit_dialog_cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="edit_dialog_delete_button">
-                <property name="label">gtk-delete</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="edit_dialog_save_button">
-                <property name="label">gtk-save</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="tooltip_text" translatable="yes">Store the 
updated record in the database. If the record is public, GNUnet will begin to 
publish the record to the world, limiting your ability to change it later 
(based on the selected expiration values).</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
         <child>
-          <object class="GtkFrame" id="edit_dialog_name_frame">
+          <object class="GtkScrolledWindow" id="edit_srv_scrolledwindow">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">none</property>
+            <property name="can_focus">True</property>
+            <property name="shadow_type">in</property>
             <child>
-              <object class="GtkAlignment" id="edit_dialog_name_alignment">
+              <object class="GtkViewport" id="edit_srv_viewport">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="left_padding">12</property>
                 <child>
-                  <object class="GtkHBox" id="edit_dialog_name_hbox">
+                  <object class="GtkBox" id="edit_srv_main_box">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
                     <child>
-                      <object class="GtkLabel" id="edit_dialog_srv_port_label">
+                      <object class="GtkFrame" id="edit_dialog_name_frame">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label" 
translatable="yes">_Port:</property>
-                        <property name="use_underline">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">5</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkSpinButton" 
id="edit_dialog_srv_port_spinbutton">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="max_length">5</property>
-                        <property name="width_chars">5</property>
-                        <property name="max_width_chars">5</property>
-                        <property name="text" translatable="yes">443</property>
-                        <property 
name="adjustment">edit_dialog_srv_port_adjustment</property>
-                        <property name="climb_rate">1</property>
-                        <property name="numeric">True</property>
-                        <property name="value">80</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">5</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" 
id="edit_dialog_srv_protocol_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" 
translatable="yes">Protocol:</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">5</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkComboBox" 
id="edit_dialog_srv_protocol_combobox">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property 
name="model">edit_dialog_protocol_liststore</property>
-                        <property name="active">0</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">none</property>
                         <child>
-                          <object class="GtkCellRendererText" 
id="edit_dialog_srv_protocol_name_cellrenderertext"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
+                          <object class="GtkAlignment" 
id="edit_dialog_name_alignment">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkHBox" 
id="edit_dialog_name_hbox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkLabel" 
id="edit_dialog_srv_port_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" 
translatable="yes">_Port:</property>
+                                    <property 
name="use_underline">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkSpinButton" 
id="edit_dialog_srv_port_spinbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="max_length">5</property>
+                                    <property name="width_chars">5</property>
+                                    <property 
name="max_width_chars">5</property>
+                                    <property name="text" 
translatable="yes">80</property>
+                                    <property 
name="adjustment">edit_dialog_srv_port_adjustment</property>
+                                    <property name="climb_rate">1</property>
+                                    <property name="numeric">True</property>
+                                    <property name="value">80</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" 
id="edit_dialog_srv_protocol_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" 
translatable="yes">Protocol:</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBox" 
id="edit_dialog_srv_protocol_combobox">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property 
name="model">edit_dialog_protocol_liststore</property>
+                                    <property name="active">0</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" 
id="edit_dialog_srv_protocol_name_cellrenderertext"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">3</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" 
id="edit_dialog_srv_label_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" 
translatable="yes">Label:</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">4</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkEntry" 
id="edit_dialog_name_entry">
+                                    <property name="visible">True</property>
+                                    <property name="sensitive">False</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip_text" 
translatable="yes">Name of the record in the zone.</property>
+                                    <property name="max_length">63</property>
+                                    <property 
name="invisible_char">●</property>
+                                    <property 
name="primary_icon_activatable">False</property>
+                                    <property 
name="secondary_icon_activatable">False</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">5</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" 
id="edit_dialog_name_in_zone_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" 
translatable="yes">in</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">10</property>
+                                    <property name="position">6</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBox" 
id="edit_dialog_zone_combobox">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="tooltip_text" 
translatable="yes">Select the desired zone for the record.  Changing this value 
here will move the record to the selected zone.</property>
+                                    <property name="active">0</property>
+                                    <property 
name="entry_text_column">0</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" 
id="edit_dialog_zone_combobox_cellrenderertext"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">7</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
                         </child>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">5</property>
-                        <property name="position">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" 
id="edit_dialog_srv_label_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" 
translatable="yes">Label:</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">5</property>
-                        <property name="position">4</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkEntry" id="edit_dialog_name_entry">
-                        <property name="visible">True</property>
-                        <property name="sensitive">False</property>
-                        <property name="can_focus">False</property>
-                        <property name="tooltip_text" translatable="yes">Name 
of the record in the zone.</property>
-                        <property name="max_length">63</property>
-                        <property name="invisible_char">●</property>
-                        <property 
name="primary_icon_activatable">False</property>
-                        <property 
name="secondary_icon_activatable">False</property>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">5</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" 
id="edit_dialog_name_in_zone_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">in</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">10</property>
-                        <property name="position">6</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkComboBox" 
id="edit_dialog_zone_combobox">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="tooltip_text" 
translatable="yes">Select the desired zone for the record.  Changing this value 
here will move the record to the selected zone.</property>
-                        <property name="active">0</property>
-                        <property name="entry_text_column">0</property>
-                        <child>
-                          <object class="GtkCellRendererText" 
id="edit_dialog_zone_combobox_cellrenderertext"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
+                        <child type="label">
+                          <object class="GtkLabel" id="edit_dialog_name_label">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" 
translatable="yes">&lt;b&gt;Name&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
                         </child>
                       </object>
                       <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">7</property>
-                      </packing>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child type="label">
-              <object class="GtkLabel" id="edit_dialog_name_label">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" 
translatable="yes">&lt;b&gt;Name&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkFrame" id="edit_dialog_srv_frame">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">none</property>
-            <child>
-              <object class="GtkAlignment" id="edit_dialog_srv_alignment">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="top_padding">4</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <object class="GtkTable" id="edit_dialog_srv_table">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="n_rows">4</property>
-                    <property name="n_columns">2</property>
-                    <child>
-                      <object class="GtkLabel" 
id="edit_dialog_srv_priority_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" 
translatable="yes">Priority:</property>
-                      </object>
-                      <packing>
-                        <property name="x_options"/>
-                        <property name="y_options"/>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" 
id="edit_dialog_srv_weight_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" 
translatable="yes">Weight:</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options"/>
-                        <property name="y_options"/>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="edit_dialog_srv_port_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" 
translatable="yes">Port:</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                        <property name="x_options"/>
-                        <property name="y_options"/>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" 
id="edit_dialog_srv_target_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" 
translatable="yes">Target:</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                        <property name="x_options"/>
-                        <property name="y_options"/>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkSpinButton" 
id="edit_dialog_srv_priority_spinbutton">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="tooltip_text" 
translatable="yes">Priority of the target, lower values means more 
preferred</property>
-                        <property name="invisible_char">●</property>
-                        <property 
name="primary_icon_activatable">False</property>
-                        <property 
name="secondary_icon_activatable">False</property>
-                        <property 
name="adjustment">srv_priority_adjustment</property>
-                        <property name="numeric">True</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkSpinButton" 
id="edit_dialog_srv_weight_spinbutton">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="tooltip_text" 
translatable="yes">Relative weight for records with the same priority</property>
-                        <property name="invisible_char">●</property>
-                        <property 
name="primary_icon_activatable">False</property>
-                        <property 
name="secondary_icon_activatable">False</property>
-                        <property 
name="adjustment">srv_weight_adjustment</property>
-                        <property name="numeric">True</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkSpinButton" 
id="edit_dialog_srv_port_spinbutton">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="tooltip_text" translatable="yes">TCP 
or UDP port on which the service is to be found</property>
-                        <property name="invisible_char">●</property>
-                        <property 
name="primary_icon_activatable">False</property>
-                        <property 
name="secondary_icon_activatable">False</property>
-                        <property 
name="adjustment">srv_port_adjustment</property>
-                        <property name="numeric">True</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkEntry" 
id="edit_dialog_srv_target_entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="tooltip_text" 
translatable="yes">Canonical hostname of the machine providing the 
service</property>
-                        <property name="invisible_char">●</property>
-                        <property 
name="primary_icon_activatable">False</property>
-                        <property 
name="secondary_icon_activatable">False</property>
-                        <signal name="changed" 
handler="GNS_edit_dialog_srv_target_entry_changed_cb" swapped="no"/>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                      </packing>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child type="label">
-              <object class="GtkLabel" id="edit_dialog_srv_label">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">&lt;b&gt;Service 
record (SRV)&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="padding">5</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkFrame" id="edit_dialog_options_frame">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">none</property>
-            <child>
-              <object class="GtkAlignment" id="edit_dialog_options_alignment">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <object class="GtkVBox" id="edit_dialog_options_vbox">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkCheckButton" 
id="edit_dialog_options_public_checkbutton">
-                        <property name="label" translatable="yes">Record is 
public (visible to other users)</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Not 
that while it is recommended that 'private' records should be in the 'private 
zone', you are allowed to mark records in other zones as private as well.  
Please be aware that once a record is made public, you are less free to change 
expiration times.  Most importantly, if your record is set to never expire, you 
will never be able to change the mapping in the future if the record is 
public.</property>
-                        <property name="xalign">0.5</property>
-                        <property name="draw_indicator">True</property>
-                      </object>
-                      <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkCheckButton" 
id="edit_dialog_options_shadow_checkbutton">
-                        <property name="label" translatable="yes">Record is a 
shadow record (valid after other records expire)</property>
+                      <object class="GtkFrame" id="edit_dialog_srv_frame">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">A 
shadow record is a record which becomes valid in the future.  They are not used 
as long as a second non-expired record with the same name and type exists. This 
is useful if a mapping is to be changed as soon as an existing record expires. 
For example, if a users are supposed to switch at midnight from one IP address 
to another, two records would be placed into the system: one that is valid 
until midnight, and a second "shadow" record that becomes valid at 
midnight.</property>
-                        <property name="xalign">0.5</property>
-                        <property name="draw_indicator">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkCheckButton" 
id="edit_dialog_options_pending_checkbutton">
-                        <property name="label" translatable="yes">Record is 
pending approval (not currently usable for anyone)</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="xalign">0.5</property>
-                        <property name="draw_indicator">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child type="label">
-              <object class="GtkLabel" id="edit_dialog_options_label">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" 
translatable="yes">&lt;b&gt;Options&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkFrame" id="edit_dialog_expiration_frame">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">none</property>
-            <child>
-              <object class="GtkAlignment" 
id="edit_dialog_expiration_alignment">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="top_padding">5</property>
-                <property name="bottom_padding">5</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <object class="GtkVBox" id="edit_dialog_expiration_vbox">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">5</property>
-                    <child>
-                      <object class="GtkHBox" id="edit_dialog_expiration_hbox">
-                        <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">none</property>
                         <child>
-                          <object class="GtkRadioButton" 
id="edit_dialog_expiration_relative_radiobutton">
-                            <property name="label" 
translatable="yes">Relative</property>
+                          <object class="GtkAlignment" 
id="edit_dialog_srv_alignment">
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="tooltip_text" 
translatable="yes">Records with a relative expiration time (such as 1 week) are 
always valid for at least that time period into the future. In other words, the 
auto-renew their own expiration to the given time period into the future. When 
you convert a public record with a relative expiration time to one with an 
absolute expiration time, the earliest possible expiration will be the 
respective relative time in the future. Use relative expiration times for 
entries for which you do not know a specific date when they will 
expire.</property>
-                            <property name="xalign">0.5</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <signal name="toggled" 
handler="GNS_edit_dialog_expiration_relative_radiobutton_toggled_cb" 
swapped="no"/>
+                            <property name="can_focus">False</property>
+                            <property name="top_padding">4</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkGrid" 
id="edit_dialog_srv_grid">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="row_spacing">5</property>
+                                <property name="column_spacing">5</property>
+                                <child>
+                                  <object class="GtkLabel" 
id="edit_dialog_srv_priority_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" 
translatable="yes">Priority:</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" 
id="edit_dialog_srv_weight_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" 
translatable="yes">Weight:</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" 
id="edit_dialog_srv_value_port_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" 
translatable="yes">Port:</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" 
id="edit_dialog_srv_target_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" 
translatable="yes">Target:</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">3</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkSpinButton" 
id="edit_dialog_srv_priority_spinbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip_text" 
translatable="yes">Priority of the target, lower values means more 
preferred</property>
+                                    <property 
name="invisible_char">●</property>
+                                    <property name="text" 
translatable="yes">0</property>
+                                    <property 
name="primary_icon_activatable">False</property>
+                                    <property 
name="secondary_icon_activatable">False</property>
+                                    <property 
name="adjustment">srv_priority_adjustment</property>
+                                    <property name="numeric">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="top_attach">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkSpinButton" 
id="edit_dialog_srv_weight_spinbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip_text" 
translatable="yes">Relative weight for records with the same priority</property>
+                                    <property 
name="invisible_char">●</property>
+                                    <property name="text" 
translatable="yes">0</property>
+                                    <property 
name="primary_icon_activatable">False</property>
+                                    <property 
name="secondary_icon_activatable">False</property>
+                                    <property 
name="adjustment">srv_weight_adjustment</property>
+                                    <property name="numeric">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="top_attach">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkSpinButton" 
id="edit_dialog_srv_value_port_spinbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip_text" 
translatable="yes">TCP or UDP port on which the service is to be 
found</property>
+                                    <property 
name="invisible_char">●</property>
+                                    <property name="text" 
translatable="yes">0</property>
+                                    <property 
name="primary_icon_activatable">False</property>
+                                    <property 
name="secondary_icon_activatable">False</property>
+                                    <property 
name="adjustment">srv_port_adjustment</property>
+                                    <property name="numeric">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="top_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkEntry" 
id="edit_dialog_srv_target_entry">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip_text" 
translatable="yes">Canonical hostname of the machine providing the 
service</property>
+                                    <property 
name="invisible_char">●</property>
+                                    <property 
name="primary_icon_activatable">False</property>
+                                    <property 
name="secondary_icon_activatable">False</property>
+                                    <signal name="changed" 
handler="GNS_edit_dialog_srv_target_entry_changed_cb" swapped="no"/>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="top_attach">3</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
                           </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
                         </child>
-                        <child>
-                          <object class="GtkRadioButton" 
id="edit_dialog_expiration_absolute_radiobutton">
-                            <property name="label" 
translatable="yes">Absolute</property>
+                        <child type="label">
+                          <object class="GtkLabel" id="edit_dialog_srv_label">
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="tooltip_text" 
translatable="yes">Records with an absolute expiration time are valid until the 
specified date. You can change that date to an even later date, but you cannot 
set it to an earlier time (as other users may have cached the longer expiration 
time). Use absolute expiration times if you know that a particular record will 
only be valid until a particular day.</property>
-                            <property name="xalign">0.5</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property 
name="group">edit_dialog_expiration_relative_radiobutton</property>
-                            <signal name="toggled" 
handler="GNS_edit_dialog_expiration_absolute_radiobutton_toggled_cb" 
swapped="no"/>
+                            <property name="can_focus">False</property>
+                            <property name="label" 
translatable="yes">&lt;b&gt;Service record (SRV)&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
                           </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
                         </child>
-                        <child>
-                          <object class="GtkRadioButton" 
id="edit_dialog_expiration_never_radiobutton">
-                            <property name="label" 
translatable="yes">Never</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="tooltip_text" 
translatable="yes">Records can be set to be valid forever. This is great if you 
are worried about censorship or certain that the mapping will never change.  
Note that if you set a public record to never expire, you cannot later change 
it (as other users are free to cache the old value forever).</property>
-                            <property name="xalign">0.5</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property 
name="group">edit_dialog_expiration_relative_radiobutton</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
                       </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkCalendar" 
id="edit_dialog_expiration_absolute_calendar">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="tooltip_text" 
translatable="yes">Select the date on which you want this record to expire. At 
that date, you can then create a new mapping or have a shadow record go 
automatically into effect.  Note that for public records you cannot change the 
expiration time to an earlier date after the fact.</property>
-                        <property name="year">2012</property>
-                        <property name="month">9</property>
-                        <property name="day">17</property>
-                        <property name="show_week_numbers">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
+                        <property name="padding">5</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" 
id="edit_dialog_expiration_absolute_hbox">
+                      <object class="GtkFrame" id="edit_dialog_options_frame">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">none</property>
                         <child>
-                          <object class="GtkLabel" 
id="edit_dialog_expiration_absolute_hours_label">
+                          <object class="GtkAlignment" 
id="edit_dialog_options_alignment">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">Hours:</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkVBox" 
id="edit_dialog_options_vbox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkCheckButton" 
id="edit_dialog_options_public_checkbutton">
+                                    <property name="label" 
translatable="yes">Record is public (visible to other users)</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property 
name="receives_default">False</property>
+                                    <property name="tooltip_text" 
translatable="yes">Not that while it is recommended that 'private' records 
should be in the 'private zone', you are allowed to mark records in other zones 
as private as well.  Please be aware that once a record is made public, you are 
less free to change expiration times.  Most importantly, if your record is set 
to never expire, you will never be able to change the mapping in the future if 
the record is public.</property>
+                                    <property name="xalign">0</property>
+                                    <property 
name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" 
id="edit_dialog_options_shadow_checkbutton">
+                                    <property name="label" 
translatable="yes">Record is a shadow record (valid after other records 
expire)</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property 
name="receives_default">False</property>
+                                    <property name="tooltip_text" 
translatable="yes">A shadow record is a record which becomes valid in the 
future.  They are not used as long as a second non-expired record with the same 
name and type exists. This is useful if a mapping is to be changed as soon as 
an existing record expires. For example, if a users are supposed to switch at 
midnight from one IP address to another, two records would be placed into the 
system: one that is valid until midnight, and a second "shadow" record that 
becomes valid at midnight.</property>
+                                    <property name="xalign">0</property>
+                                    <property 
name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" 
id="edit_dialog_options_pending_checkbutton">
+                                    <property name="label" 
translatable="yes">Record is pending approval (not currently usable for 
anyone)</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property 
name="receives_default">False</property>
+                                    <property name="xalign">0</property>
+                                    <property 
name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
                           </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="padding">5</property>
-                            <property name="position">0</property>
-                          </packing>
                         </child>
-                        <child>
-                          <object class="GtkSpinButton" 
id="edit_dialog_expiration_absolute_hours_spinbutton">
+                        <child type="label">
+                          <object class="GtkLabel" 
id="edit_dialog_options_label">
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="tooltip_text" 
translatable="yes">Which hour of the day selected above should the record 
expire?</property>
-                            <property name="max_length">2</property>
-                            <property name="invisible_char">●</property>
-                            <property 
name="primary_icon_activatable">False</property>
-                            <property 
name="secondary_icon_activatable">False</property>
-                            <property 
name="adjustment">absolute_expiration_hours_adjustment</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" 
id="edit_dialog_expiration_absolute_minutes_label">
-                            <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">Minutes:</property>
+                            <property name="label" 
translatable="yes">&lt;b&gt;Options&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
                           </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="padding">5</property>
-                            <property name="position">2</property>
-                          </packing>
                         </child>
-                        <child>
-                          <object class="GtkSpinButton" 
id="edit_dialog_expiration_absolute_minutes_spinbutton">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="tooltip_text" 
translatable="yes">Which minute of the day selected above should the record 
expire?</property>
-                            <property name="max_length">2</property>
-                            <property name="invisible_char">●</property>
-                            <property 
name="primary_icon_activatable">False</property>
-                            <property 
name="secondary_icon_activatable">False</property>
-                            <property 
name="adjustment">absolute_expiration_minutes_adjustment</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" 
id="edit_dialog_expiration_absolute_seconds_label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">Seconds:</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="padding">5</property>
-                            <property name="position">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkSpinButton" 
id="edit_dialog_expiration_absolute_seconds_spinbutton">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="tooltip_text" 
translatable="yes">Which second of the day selected above should the record 
expire?</property>
-                            <property name="max_length">2</property>
-                            <property name="invisible_char">●</property>
-                            <property 
name="primary_icon_activatable">False</property>
-                            <property 
name="secondary_icon_activatable">False</property>
-                            <property 
name="adjustment">absolute_expiration_seconds_adjustment</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">5</property>
-                          </packing>
-                        </child>
                       </object>
                       <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkComboBox" 
id="edit_dialog_expiration_relative_combobox">
+                      <object class="GtkFrame" 
id="edit_dialog_expiration_frame">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="tooltip_text" 
translatable="yes">Relative expiration time of the record.  The syntax is a 
number followed by a space and a time unit, possibly followed by additional 
numbers and time units. For example, you can specify "1 d" or "6 h 30 m 15 s". 
Use the drop-down menu to select from a set of common defaults. (Editing is not 
possible right now as Gtk2 and Gtk3 use incompatible ways for doing this.) 
</property>
-                        <property 
name="model">edit_dialog_expiration_relative_liststore</property>
-                        <property name="entry_text_column">0</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">none</property>
                         <child>
-                          <object class="GtkCellRendererText" 
id="edit_dialog_expiration_relative_combobox_cellrenderertext"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
+                          <object class="GtkAlignment" 
id="edit_dialog_expiration_alignment">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="top_padding">5</property>
+                            <property name="bottom_padding">5</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkVBox" 
id="edit_dialog_expiration_vbox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">5</property>
+                                <child>
+                                  <object class="GtkHBox" 
id="edit_dialog_expiration_hbox">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <child>
+                                      <object class="GtkRadioButton" 
id="edit_dialog_expiration_relative_radiobutton">
+                                        <property name="label" 
translatable="yes">Relative</property>
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property 
name="receives_default">False</property>
+                                        <property name="tooltip_text" 
translatable="yes">Records with a relative expiration time (such as 1 week) are 
always valid for at least that time period into the future. In other words, the 
auto-renew their own expiration to the given time period into the future. When 
you convert a public record with a relative expiration time to one with an 
absolute expiration time, the earliest possible expiration will be the 
respective relative time in the future. Use relative expiration times for 
entries for which you do not know a specific date when they will 
expire.</property>
+                                        <property name="xalign">0</property>
+                                        <property name="active">True</property>
+                                        <property 
name="draw_indicator">True</property>
+                                        <signal name="toggled" 
handler="GNS_edit_dialog_expiration_relative_radiobutton_toggled_cb" 
swapped="no"/>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkRadioButton" 
id="edit_dialog_expiration_absolute_radiobutton">
+                                        <property name="label" 
translatable="yes">Absolute</property>
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property 
name="receives_default">False</property>
+                                        <property name="tooltip_text" 
translatable="yes">Records with an absolute expiration time are valid until the 
specified date. You can change that date to an even later date, but you cannot 
set it to an earlier time (as other users may have cached the longer expiration 
time). Use absolute expiration times if you know that a particular record will 
only be valid until a particular day.</property>
+                                        <property name="xalign">0</property>
+                                        <property 
name="draw_indicator">True</property>
+                                        <property 
name="group">edit_dialog_expiration_relative_radiobutton</property>
+                                        <signal name="toggled" 
handler="GNS_edit_dialog_expiration_absolute_radiobutton_toggled_cb" 
swapped="no"/>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkRadioButton" 
id="edit_dialog_expiration_never_radiobutton">
+                                        <property name="label" 
translatable="yes">Never</property>
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property 
name="receives_default">False</property>
+                                        <property name="tooltip_text" 
translatable="yes">Records can be set to be valid forever. This is great if you 
are worried about censorship or certain that the mapping will never change.  
Note that if you set a public record to never expire, you cannot later change 
it (as other users are free to cache the old value forever).</property>
+                                        <property name="xalign">0</property>
+                                        <property 
name="draw_indicator">True</property>
+                                        <property 
name="group">edit_dialog_expiration_relative_radiobutton</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">2</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCalendar" 
id="edit_dialog_expiration_absolute_calendar">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip_text" 
translatable="yes">Select the date on which you want this record to expire. At 
that date, you can then create a new mapping or have a shadow record go 
automatically into effect.  Note that for public records you cannot change the 
expiration time to an earlier date after the fact.</property>
+                                    <property name="year">2012</property>
+                                    <property name="month">9</property>
+                                    <property name="day">17</property>
+                                    <property 
name="show_week_numbers">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkHBox" 
id="edit_dialog_expiration_absolute_hbox">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <child>
+                                      <object class="GtkLabel" 
id="edit_dialog_expiration_absolute_hours_label">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <property name="label" 
translatable="yes">Hours:</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="padding">5</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" 
id="edit_dialog_expiration_absolute_hours_spinbutton">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property name="tooltip_text" 
translatable="yes">Which hour of the day selected above should the record 
expire?</property>
+                                        <property 
name="max_length">2</property>
+                                        <property 
name="invisible_char">●</property>
+                                        <property name="text" 
translatable="yes">0</property>
+                                        <property 
name="primary_icon_activatable">False</property>
+                                        <property 
name="secondary_icon_activatable">False</property>
+                                        <property 
name="adjustment">absolute_expiration_hours_adjustment</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" 
id="edit_dialog_expiration_absolute_minutes_label">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <property name="label" 
translatable="yes">Minutes:</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="padding">5</property>
+                                        <property name="position">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" 
id="edit_dialog_expiration_absolute_minutes_spinbutton">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property name="tooltip_text" 
translatable="yes">Which minute of the day selected above should the record 
expire?</property>
+                                        <property 
name="max_length">2</property>
+                                        <property 
name="invisible_char">●</property>
+                                        <property name="text" 
translatable="yes">0</property>
+                                        <property 
name="primary_icon_activatable">False</property>
+                                        <property 
name="secondary_icon_activatable">False</property>
+                                        <property 
name="adjustment">absolute_expiration_minutes_adjustment</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">3</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" 
id="edit_dialog_expiration_absolute_seconds_label">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <property name="label" 
translatable="yes">Seconds:</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="padding">5</property>
+                                        <property name="position">4</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" 
id="edit_dialog_expiration_absolute_seconds_spinbutton">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">True</property>
+                                        <property name="tooltip_text" 
translatable="yes">Which second of the day selected above should the record 
expire?</property>
+                                        <property 
name="max_length">2</property>
+                                        <property 
name="invisible_char">●</property>
+                                        <property name="text" 
translatable="yes">0</property>
+                                        <property 
name="primary_icon_activatable">False</property>
+                                        <property 
name="secondary_icon_activatable">False</property>
+                                        <property 
name="adjustment">absolute_expiration_seconds_adjustment</property>
+                                      </object>
+                                      <packing>
+                                        <property 
name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">5</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBox" 
id="edit_dialog_expiration_relative_combobox">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="tooltip_text" 
translatable="yes">Relative expiration time of the record.  The syntax is a 
number followed by a space and a time unit, possibly followed by additional 
numbers and time units. For example, you can specify "1 d" or "6 h 30 m 15 s". 
Use the drop-down menu to select from a set of common defaults. (Editing is not 
possible right now as Gtk2 and Gtk3 use incompatible ways for doing this.) 
</property>
+                                    <property 
name="model">edit_dialog_expiration_relative_liststore</property>
+                                    <property 
name="entry_text_column">0</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" 
id="edit_dialog_expiration_relative_combobox_cellrenderertext"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">3</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
                         </child>
+                        <child type="label">
+                          <object class="GtkLabel" 
id="edit_dialog_expiration_label">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" 
translatable="yes">&lt;b&gt;Expiration Time&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
                       </object>
                       <packing>
                         <property name="expand">True</property>
                         <property name="fill">True</property>
-                        <property name="position">3</property>
+                        <property name="position">4</property>
                       </packing>
                     </child>
                   </object>
                 </child>
               </object>
             </child>
-            <child type="label">
-              <object class="GtkLabel" id="edit_dialog_expiration_label">
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="edit_dialog_action_area">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="edit_dialog_cancel_button">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">&lt;b&gt;Expiration 
Time&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
               </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
             </child>
+            <child>
+              <object class="GtkButton" id="edit_dialog_delete_button">
+                <property name="label">gtk-delete</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="edit_dialog_save_button">
+                <property name="label">gtk-save</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="tooltip_text" translatable="yes">Store the 
updated record in the database. If the record is public, GNUnet will begin to 
publish the record to the world, limiting your ability to change it later 
(based on the selected expiration values).</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
           </object>
           <packing>
-            <property name="expand">True</property>
+            <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">4</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
           </packing>
         </child>
       </object>
@@ -803,4 +805,19 @@
       <action-widget response="-5">edit_dialog_save_button</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="srv_port_adjustment">
+    <property name="upper">65535</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="srv_priority_adjustment">
+    <property name="upper">9999999</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="srv_weight_adjustment">
+    <property name="upper">65535</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
 </interface>

Modified: gnunet-gtk/src/include/gnunet_gtk_namestore_plugin.h
===================================================================
--- gnunet-gtk/src/include/gnunet_gtk_namestore_plugin.h        2014-06-06 
13:17:21 UTC (rev 33569)
+++ gnunet-gtk/src/include/gnunet_gtk_namestore_plugin.h        2014-06-06 
13:22:11 UTC (rev 33570)
@@ -211,6 +211,16 @@
   int (*validate)(void *cls,
                   GtkBuilder *builder);
 
+  /**
+   * Record type.  Can be used by the plugin to override the
+   * record type selected by the user originally.  Plugins
+   * can leave this value at zero to preserve the record
+   * type from the original user's selection.  Note that
+   * the record type MUST be adjusted immediately when
+   * the plugin is loaded, not during the execution of the
+   * dialog.
+   */
+  uint32_t record_type;
 
 };
 

Modified: gnunet-gtk/src/namestore/Makefile.am
===================================================================
--- gnunet-gtk/src/namestore/Makefile.am        2014-06-06 13:17:21 UTC (rev 
33569)
+++ gnunet-gtk/src/namestore/Makefile.am        2014-06-06 13:22:11 UTC (rev 
33570)
@@ -40,6 +40,7 @@
 plugin_LTLIBRARIES = \
   libgnunet_plugin_gtk_namestore_a.la \
   libgnunet_plugin_gtk_namestore_aaaa.la \
+  libgnunet_plugin_gtk_namestore_box.la \
   libgnunet_plugin_gtk_namestore_cname.la \
   libgnunet_plugin_gtk_namestore_gns2dns.la \
   libgnunet_plugin_gtk_namestore_leho.la \
@@ -78,6 +79,19 @@
 libgnunet_plugin_gtk_namestore_aaaa_la_LDFLAGS = \
  $(GN_PLUGIN_LDFLAGS)
 
+libgnunet_plugin_gtk_namestore_box_la_SOURCES = \
+  plugin_gtk_namestore_box.c
+libgnunet_plugin_gtk_namestore_box_la_CFLAGS = \
+  @GTK_CFLAGS@ \
+  @GNUNET_CFLAGS@ \
+  @GLADE_CFLAGS@
+libgnunet_plugin_gtk_namestore_box_la_LIBADD = \
+  @GNUNET_LIBS@ \
+  -lgnunetdnsparser \
+  -lgnunetutil
+libgnunet_plugin_gtk_namestore_box_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
+
 libgnunet_plugin_gtk_namestore_cname_la_SOURCES = \
   plugin_gtk_namestore_cname.c
 libgnunet_plugin_gtk_namestore_cname_la_CFLAGS = \

Modified: gnunet-gtk/src/namestore/gnunet-namestore-gtk.c
===================================================================
--- gnunet-gtk/src/namestore/gnunet-namestore-gtk.c     2014-06-06 13:17:21 UTC 
(rev 33569)
+++ gnunet-gtk/src/namestore/gnunet-namestore-gtk.c     2014-06-06 13:22:11 UTC 
(rev 33570)
@@ -973,8 +973,10 @@
     free_edit_dialog_context (edc);
     return;
   }
-  if (GNUNET_OK != GNUNET_GNSRECORD_string_to_value (edc->record_type, 
edc->n_value,
-                                                    &data, &data_size))
+  if (GNUNET_OK !=
+      GNUNET_GNSRECORD_string_to_value (edc->record_type,
+                                        edc->n_value,
+                                        &data, &data_size))
   {
     GNUNET_break (0);
     free_edit_dialog_context (edc);
@@ -1600,7 +1602,6 @@
   edc->off = off;
   edc->name = GNUNET_strdup (name);
   edc->new_zone_option = g_strdup (current_zone_option);
-  edc->record_type = n_type;
   edc->zone_liststore = zone_liststore;
   edc->check_validity = &check_validity;
   GNUNET_asprintf (&edc->liblow,
@@ -1608,7 +1609,11 @@
                    GNUNET_GNSRECORD_number_to_typename (n_type));
   GNUNET_STRINGS_utf8_tolower (edc->liblow,
                                edc->liblow);
-   edc->plugin = GNUNET_PLUGIN_load (edc->liblow, edc);
+  edc->plugin = GNUNET_PLUGIN_load (edc->liblow, edc);
+  if (0 != edc->plugin->record_type)
+    edc->record_type = edc->plugin->record_type;
+  else
+    edc->record_type = n_type;
   if (NULL == edc->plugin)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,

Added: gnunet-gtk/src/namestore/plugin_gtk_namestore_box.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_box.c                         
(rev 0)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_box.c 2014-06-06 13:22:11 UTC 
(rev 33570)
@@ -0,0 +1,233 @@
+/*
+  * This file is part of GNUnet
+  * (C) 2009-2014 Christian Grothoff (and other contributing authors)
+  *
+  * GNUnet is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License as published
+  * by the Free Software Foundation; either version 3, or (at your
+  * option) any later version.
+  *
+  * GNUnet is distributed in the hope that it will be useful, but
+  * WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  * General Public License for more details.
+  *
+  * You should have received a copy of the GNU General Public License
+  * along with GNUnet; see the file COPYING.  If not, write to the
+  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+  * Boston, MA 02111-1307, USA.
+  */
+
+/**
+ * @file namestore/plugin_gtk_namestore_box.c
+ * @brief namestore plugin for editing BOXed records
+ * @author Christian Grothoff
+ */
+#include "gnunet_gtk.h"
+#include "gnunet_gtk_namestore_plugin.h"
+
+
+/* We simply include the code for boxed plugins directly here */
+#include "plugin_gtk_namestore_srv.c"
+
+/**
+ * Context for the box.
+ */
+struct BoxContext
+{
+  /**
+   * Our operating environment.
+   */
+  struct GNUNET_GTK_NAMESTORE_PluginEnvironment *env;
+
+  /**
+   * Record type in the box that we are editing.
+   */
+  unsigned int record_type;
+
+};
+
+
+/**
+ * Function that will be called to initialize the builder's
+ * widgets from the existing record (if there is one).
+ * The `n_value` is the existing value of the record as a string.
+ *
+ * @param cls the `struct BoxContext *'
+ * @param n_value the record as a string
+ * @param builder the edit dialog's builder
+ */
+static void
+box_load (void *cls,
+          gchar *n_value,
+          GtkBuilder *builder)
+{
+  struct BoxContext *bc = cls;
+  unsigned int protocol;
+  unsigned int service;
+  unsigned int record_type;
+  size_t slen = strlen (n_value) + 1;
+  char rest[slen];
+
+  if (4 != SSCANF (n_value,
+                   "%u %u %u %s",
+                   &protocol,
+                   &service,
+                   &record_type,
+                   rest))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                _("Unable to parse (boxed) BOX record `%s'\n"),
+                n_value);
+    return;
+  }
+  bc->record_type = record_type;
+  switch (record_type)
+  {
+  case GNUNET_DNSPARSER_TYPE_SRV:
+    gtk_widget_show (GTK_WIDGET (gtk_builder_get_object (builder,
+                                                         
"edit_dialog_srv_frame")));
+    srv_load (bc->env,
+              n_value,
+              builder);
+    break;
+  case GNUNET_DNSPARSER_TYPE_TLSA:
+    gtk_widget_show (GTK_WIDGET (gtk_builder_get_object (builder,
+                                                         
"edit_dialog_tlsa_frame")));
+#if 0
+    /* FIXME: not implemented */
+    tlsa_load (bc->env,
+               n_value,
+               builder);
+#endif
+    break;
+  default:
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                _("Boxed record type %u not supported\n"),
+                record_type);
+    break;
+  }
+}
+
+
+/**
+ * Function that will be called to retrieve the final value of the
+ * record (in string format) once the dialog is being closed.
+ *
+ * @param cls the `struct BoxContext *'
+ * @param builder the edit dialog's builder
+ * @return record value as a string, as specified in the dialog
+ */
+static gchar *
+box_store (void *cls,
+           GtkBuilder *builder)
+{
+  struct BoxContext *bc = cls;
+
+  switch (bc->record_type)
+  {
+  case GNUNET_DNSPARSER_TYPE_SRV:
+    return srv_store (bc->env,
+                      builder);
+  case GNUNET_DNSPARSER_TYPE_TLSA:
+#if 0
+    /* FIXME: not implemented */
+    return tlsa_store (bc->env,
+                       builder);
+#endif
+  default:
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                _("Boxed record type %u not supported\n"),
+                bc->record_type);
+    return NULL;
+  }
+}
+
+
+/**
+ * Function to call to validate the state of the dialog.  Should
+ * return #GNUNET_OK if the information in the dialog is valid, and
+ * #GNUNET_SYSERR if some fields contain invalid values.  The
+ * function should highlight fields with invalid inputs for the
+ * user.
+ *
+ * @param cls the `struct BoxContext *'
+ * @param builder the edit dialog's builder
+ * @return #GNUNET_OK if there is a valid record value in the dialog
+ */
+static int
+box_validate (void *cls,
+              GtkBuilder *builder)
+{
+  struct BoxContext *bc = cls;
+
+  switch (bc->record_type)
+  {
+  case GNUNET_DNSPARSER_TYPE_SRV:
+    return srv_validate (bc->env,
+                         builder);
+  case GNUNET_DNSPARSER_TYPE_TLSA:
+#if 0
+    /* FIXME: not implemented */
+    return tlsa_validate (bc->env,
+                          builder);
+#endif
+  default:
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                _("Boxed record type %u not supported\n"),
+                bc->record_type);
+    return GNUNET_SYSERR;
+  }
+}
+
+
+/**
+ * Entry point for the plugin.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvironment`
+ * @return NULL on error, otherwise the plugin context
+ */
+void *
+libgnunet_plugin_gtk_namestore_box_init (void *cls)
+{
+  struct GNUNET_GTK_NAMESTORE_PluginEnvironment *env = cls;
+  struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
+  static struct GNUNET_GTK_NAMESTORE_Symbol symbols[] = {
+    /* FIXME: add symbols! */
+    /* need to include symbols from all boxed types here */
+    { NULL, NULL }
+  };
+  struct BoxContext *bc;
+
+  bc = GNUNET_new (struct BoxContext);
+  bc->env = env;
+  plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
+  plugin->cls = bc;
+  plugin->dialog_glade_filename = "gnunet_namestore_edit_box.glade";
+  plugin->dialog_widget_name = "edit_box_dialog";
+  plugin->symbols = symbols;
+  plugin->load = &box_load;
+  plugin->store = &box_store;
+  plugin->validate = &box_validate;
+  return plugin;
+}
+
+
+/**
+ * Exit point from the plugin.
+ *
+ * @param cls the plugin context (as returned by "init")
+ * @return always NULL
+ */
+void *
+libgnunet_plugin_gtk_namestore_box_done (void *cls)
+{
+  struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
+  struct BoxContext *bc = plugin->cls;
+
+  GNUNET_free (bc);
+  GNUNET_free (plugin);
+  return NULL;
+}
+
+/* end of plugin_gtk_namestore_box.c */

Modified: gnunet-gtk/src/namestore/plugin_gtk_namestore_phone.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_phone.c       2014-06-06 
13:17:21 UTC (rev 33569)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_phone.c       2014-06-06 
13:22:11 UTC (rev 33570)
@@ -55,8 +55,8 @@
  */
 static void
 phone_load (void *cls,
-        gchar *n_value,
-        GtkBuilder *builder)
+            gchar *n_value,
+            GtkBuilder *builder)
 {
   const char *minus;
   unsigned int line;
@@ -93,7 +93,7 @@
  */
 static gchar *
 phone_store (void *cls,
-         GtkBuilder *builder)
+             GtkBuilder *builder)
 {
   GtkEntry *entry;
   GtkSpinButton *spin;

Modified: gnunet-gtk/src/namestore/plugin_gtk_namestore_soa.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_soa.c 2014-06-06 13:17:21 UTC 
(rev 33569)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_soa.c 2014-06-06 13:22:11 UTC 
(rev 33570)
@@ -105,21 +105,26 @@
   gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (builder,
                                                          
"edit_dialog_soa_contact_email_entry")),
                       soa_mname);
-  gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
-                                                                      
"edit_dialog_soa_serial_number_spinbutton")),
-                             soa_serial);
-  gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
-                                                                      
"edit_dialog_soa_refresh_time_spinbutton")),
-                             soa_refresh);
-  gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
-                                                                      
"edit_dialog_soa_retry_time_spinbutton")),
-                             soa_retry);
-  gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
-                                                                      
"edit_dialog_soa_expire_time_spinbutton")),
-                             soa_expire);
-  gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
-                                                                      
"edit_dialog_soa_minimum_ttl_spinbutton")),
-                             soa_min);
+  gtk_spin_button_set_value
+    (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+                                              
"edit_dialog_soa_serial_number_spinbutton")),
+     soa_serial);
+  gtk_spin_button_set_value
+    (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+                                              
"edit_dialog_soa_refresh_time_spinbutton")),
+     soa_refresh);
+  gtk_spin_button_set_value
+    (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+                                              
"edit_dialog_soa_retry_time_spinbutton")),
+     soa_retry);
+  gtk_spin_button_set_value
+    (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+                                              
"edit_dialog_soa_expire_time_spinbutton")),
+     soa_expire);
+  gtk_spin_button_set_value
+    (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+                                              
"edit_dialog_soa_minimum_ttl_spinbutton")),
+     soa_min);
 }
 
 

Modified: gnunet-gtk/src/namestore/plugin_gtk_namestore_srv.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_srv.c 2014-06-06 13:17:21 UTC 
(rev 33569)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_srv.c 2014-06-06 13:22:11 UTC 
(rev 33570)
@@ -1,6 +1,6 @@
 /*
   * This file is part of GNUnet
-  * (C) 2009-2013 Christian Grothoff (and other contributing authors)
+  * (C) 2009-2014 Christian Grothoff (and other contributing authors)
   *
   * GNUnet is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License as published
@@ -22,8 +22,6 @@
  * @file namestore/plugin_gtk_namestore_srv.c
  * @brief namestore plugin for editing SRV records
  * @author Christian Grothoff
- *
- * FIXME: implementation incomplete
  */
 #include "gnunet_gtk.h"
 #include "gnunet_gtk_namestore_plugin.h"
@@ -40,10 +38,79 @@
  */
 static void
 srv_load (void *cls,
-        gchar *n_value,
-        GtkBuilder *builder)
+          gchar *n_value,
+          GtkBuilder *builder)
 {
-  GNUNET_break (0);
+  unsigned int protocol;
+  GtkComboBox *cb;
+  GtkTreeIter iter;
+  unsigned int service;
+  guint service_at_iter;
+  unsigned int priority;
+  unsigned int weight;
+  unsigned int port;
+  unsigned int record_type;
+  char target_name[253 + 1];
+  GtkTreeModel *tm;
+
+  if (7 != SSCANF (n_value,
+                   "%u %u %u %d %d %d %253s",
+                   &protocol,
+                   &service,
+                   &record_type,
+                   &priority,
+                   &weight,
+                   &port,
+                   target_name))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                _("Unable to parse (boxed) SRV record `%s'\n"),
+                n_value);
+    return;
+  }
+
+  gtk_spin_button_set_value
+    (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+                                              
"edit_dialog_srv_port_spinbutton")),
+     protocol);
+  cb = GTK_COMBO_BOX (gtk_builder_get_object (builder,
+                                              
"edit_dialog_srv_protocol_combobox"));
+  tm = GTK_TREE_MODEL (gtk_builder_get_object (builder,
+                                               
"edit_dialog_srv_protocol_liststore"));
+  if (gtk_tree_model_get_iter_first (tm,
+                                     &iter))
+  {
+    do
+    {
+      gtk_tree_model_get (tm,
+                          &iter,
+                          1, &service_at_iter,
+                          -1);
+      if (service_at_iter == service)
+      {
+        gtk_combo_box_set_active_iter (cb,
+                                       &iter);
+        break;
+      }
+    }
+    while (gtk_tree_model_iter_next (tm,
+                                     &iter));
+  }
+  gtk_spin_button_set_value
+    (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+                                              
"edit_dialog_srv_priority_spinbutton")),
+     priority);
+  gtk_spin_button_set_value
+    (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+                                              
"edit_dialog_srv_weight_spinbutton")),
+     weight);
+  gtk_spin_button_set_value
+    (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+                                              
"edit_dialog_srv_value_port_spinbutton")),
+     port);
+  gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (builder,
+                                                         
"edit_dialog_srv_target_entry")),
+                      target_name);
 }
 
 
@@ -57,10 +124,60 @@
  */
 static gchar *
 srv_store (void *cls,
-         GtkBuilder *builder)
+           GtkBuilder *builder)
 {
-  GNUNET_break (0);
-  return NULL;
+  unsigned int protocol;
+  GtkComboBox *cb;
+  GtkTreeIter iter;
+  guint service;
+  unsigned int priority;
+  unsigned int weight;
+  unsigned int port;
+  GtkEntry *entry;
+  const gchar *target;
+  char *result;
+  GtkTreeModel *tm;
+
+  protocol = gtk_spin_button_get_value
+    (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+                                              
"edit_dialog_srv_port_spinbutton")));
+  cb = GTK_COMBO_BOX (gtk_builder_get_object (builder,
+                                              
"edit_dialog_srv_protocol_combobox"));
+  if (! gtk_combo_box_get_active_iter (cb,
+                                       &iter))
+  {
+    GNUNET_break (0);
+    return NULL;
+  }
+  tm = GTK_TREE_MODEL (gtk_builder_get_object (builder,
+                                               
"edit_dialog_srv_protocol_liststore"));
+  gtk_tree_model_get (tm,
+                      &iter,
+                      1, &service,
+                      -1);
+  priority = gtk_spin_button_get_value
+    (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+                                              
"edit_dialog_srv_priority_spinbutton")));
+  weight = gtk_spin_button_get_value
+    (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+                                              
"edit_dialog_srv_weight_spinbutton")));
+  port = gtk_spin_button_get_value
+    (GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+                                              
"edit_dialog_srv_value_port_spinbutton")));
+  entry = GTK_ENTRY (gtk_builder_get_object (builder,
+                                             "edit_dialog_srv_target_entry"));
+  target = gtk_entry_get_text (entry);
+
+  GNUNET_asprintf (&result,
+                   "%u %u %u %d %d %d %s",
+                   protocol,
+                   (unsigned int) service,
+                   GNUNET_DNSPARSER_TYPE_SRV,
+                   priority,
+                   weight,
+                   port,
+                   target);
+  return result;
 }
 
 
@@ -81,19 +198,20 @@
 {
   GtkEditable *entry;
   const gchar *preedit;
+  GtkComboBox *cb;
+  GtkTreeIter iter;
 
-  entry = GTK_EDITABLE (gtk_builder_get_object (edc->builder,
+  entry = GTK_EDITABLE (gtk_builder_get_object (builder,
                                                
"edit_dialog_srv_target_entry"));
   preedit = gtk_editable_get_chars (entry, 0, -1);
   if ( (NULL == preedit) ||
        (GNUNET_OK != GNUNET_DNSPARSER_check_name (preedit)) )
     return GNUNET_SYSERR;
-  entry = GTK_EDITABLE (gtk_builder_get_object (edc->builder,
-                                               "edit_dialog_name_entry")),
-  preedit = gtk_editable_get_chars (entry, 0, -1);
-#if 0
-  /* FIXME: check service name format! */
-#endif
+  cb = GTK_COMBO_BOX (gtk_builder_get_object (builder,
+                                              
"edit_dialog_srv_protocol_combobox"));
+  if (! gtk_combo_box_get_active_iter (cb,
+                                       &iter))
+    return GNUNET_SYSERR;
   return GNUNET_OK;
 }
 
@@ -110,6 +228,7 @@
   struct GNUNET_GTK_NAMESTORE_PluginEnvironment *env = cls;
   struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
   static struct GNUNET_GTK_NAMESTORE_Symbol symbols[] = {
+    /* FIXME: add symbols! */
     { NULL, NULL }
   };
 
@@ -121,6 +240,8 @@
   plugin->load = &srv_load;
   plugin->store = &srv_store;
   plugin->validate = &srv_validate;
+  /* we will not produce a 'native' SRV record, but one in a BOX */
+  plugin->record_type = GNUNET_GNSRECORD_TYPE_BOX;
   return plugin;
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]