[seahorse] ssh/key-properties: Redesign according to mockup



commit 860b8ae1e0914470c2f11ee38d29293c10b419e5
Author: Elias Entrup <elias-git flump de>
Date:   Mon Sep 24 14:53:39 2018 +0200

    ssh/key-properties: Redesign according to mockup
    
    This commits removes the GtkNotebook and adds
    a delete button.
    
    https://gitlab.gnome.org/GNOME/seahorse/issues/203

 ssh/key-properties.vala            |  57 ++--
 ssh/key.vala                       |   2 +
 ssh/seahorse-ssh-key-properties.ui | 590 ++++++++++++++++---------------------
 3 files changed, 289 insertions(+), 360 deletions(-)
---
diff --git a/ssh/key-properties.vala b/ssh/key-properties.vala
index 33070872..61f0d773 100644
--- a/ssh/key-properties.vala
+++ b/ssh/key-properties.vala
@@ -27,22 +27,14 @@ public class Seahorse.Ssh.KeyProperties : Gtk.Dialog {
     // Used to make sure we don't start calling command unnecessarily
     private bool updating_ui = false;
 
-    [GtkChild]
-    private Gtk.Image key_image;
     [GtkChild]
     private Gtk.Entry comment_entry;
     [GtkChild]
-    private Gtk.Label id_label;
-    [GtkChild]
-    private Gtk.Label trust_message;
-    [GtkChild]
-    private Gtk.ToggleButton trust_check;
-
+    private Gtk.Switch trust_check;
     [GtkChild]
     private Gtk.Button passphrase_button;
     [GtkChild]
     private Gtk.Button export_button;
-
     [GtkChild]
     private Gtk.Label fingerprint_label;
     [GtkChild]
@@ -53,7 +45,10 @@ public class Seahorse.Ssh.KeyProperties : Gtk.Dialog {
     private Gtk.Label key_length_label;
 
     public KeyProperties(Key key, Gtk.Window parent) {
-        this.transient_for = parent;
+        GLib.Object(
+            use_header_bar: 1,
+            transient_for: parent
+        );
         this.key = key;
 
         update_ui();
@@ -70,17 +65,8 @@ public class Seahorse.Ssh.KeyProperties : Gtk.Dialog {
     private void update_ui() {
         this.updating_ui = true;
 
-        // Image
-        if (this.key.icon != null)
-            this.key_image.set_from_gicon(this.key.icon, Gtk.IconSize.DIALOG);
         // Name and title
         this.comment_entry.text = this.key.label;
-        this.title = this.key.label;
-        // Key id
-        this.id_label.label = this.key.identifier;
-        // Put in message
-        string template = this.trust_message.label;
-        this.trust_message.set_markup(template.printf(Environment.get_user_name()));
 
         // Setup the check
         this.trust_check.active = (this.key.trust >= Seahorse.Validity.FULL);
@@ -125,21 +111,21 @@ public class Seahorse.Ssh.KeyProperties : Gtk.Dialog {
     }
 
     [GtkCallback]
-    private void on_ssh_trust_toggled(Gtk.ToggleButton button) {
+    private void on_ssh_trust_changed(GLib.Object button, GLib.ParamSpec p) {
         if (updating_ui)
             return;
 
-        button.sensitive = false;
+        this.trust_check.sensitive = false;
 
         Source source = (Source) key.place;
-        source.authorize_async.begin(key, button.active, (obj, res) => {
+        source.authorize_async.begin(key, trust_check.active, (obj, res) => {
             try {
                 source.authorize_async.end(res);
             } catch (GLib.Error e) {
                 Seahorse.Util.show_error(this, _("Couldn’t change authorization for key."), e.message);
             }
 
-            button.sensitive = true;
+            trust_check.sensitive = true;
         });
     }
 
@@ -159,6 +145,30 @@ public class Seahorse.Ssh.KeyProperties : Gtk.Dialog {
         });
     }
 
+    [GtkCallback]
+    private void on_delete_clicked(Gtk.Button button) {
+        var deleter = this.key.create_deleter();
+        var ret = deleter.prompt(this);
+
+        if (!ret)
+            return;
+
+        deleter.delete.begin(null, (obj, res) => {
+            try {
+                deleter.delete.end(res);
+                this.destroy();
+            } catch (GLib.Error e) {
+                var dialog = new Gtk.MessageDialog(this,
+                    Gtk.DialogFlags.MODAL,
+                    Gtk.MessageType.ERROR,
+                    Gtk.ButtonsType.OK,
+                    _("Error deleting the SSH key."));
+                dialog.run();
+                dialog.destroy();
+            }
+        });
+    }
+
     [GtkCallback]
     private void on_ssh_export_button_clicked (Gtk.Widget widget) {
         List<Exporter> exporters = new List<Exporter>();
@@ -177,4 +187,5 @@ public class Seahorse.Ssh.KeyProperties : Gtk.Dialog {
             });
         }
     }
+
 }
diff --git a/ssh/key.vala b/ssh/key.vala
index d61ec847..3ee6c761 100644
--- a/ssh/key.vala
+++ b/ssh/key.vala
@@ -61,6 +61,8 @@ public class Seahorse.Ssh.Key : Seahorse.Object, Seahorse.Exportable, Seahorse.D
      */
     public Seahorse.Validity trust {
         get {
+            if (this.key_data == null)
+                warning("key_data is null");
             if (this.key_data != null && this.key_data.authorized)
                 return Seahorse.Validity.FULL;
             return 0;
diff --git a/ssh/seahorse-ssh-key-properties.ui b/ssh/seahorse-ssh-key-properties.ui
index bcf9d81d..4eb8fd6d 100644
--- a/ssh/seahorse-ssh-key-properties.ui
+++ b/ssh/seahorse-ssh-key-properties.ui
@@ -1,424 +1,340 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="3.22"/>
   <object class="GtkImage" id="passphrase-image">
+    <property name="can_focus">False</property>
     <property name="stock">gtk-edit</property>
   </object>
-  <object class="GtkImage" id="export-image">
-    <property name="stock">gtk-save-as</property>
-  </object>
-
   <template class="SeahorseSshKeyProperties" parent="GtkDialog">
+    <property name="can_focus">False</property>
     <property name="resizable">False</property>
+    <property name="type_hint">normal</property>
+    <child type="titlebar">
+      <object class="GtkHeaderBar">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="title" translatable="yes">SSH Key Properties</property>
+        <property name="has_subtitle">False</property>
+        <property name="show_close_button">True</property>
+      </object>
+    </child>
     <child internal-child="vbox">
       <object class="GtkBox">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
-        <property name="border_width">5</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox">
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
         <child>
-          <object class="GtkNotebook" id="notebook">
+          <object class="GtkBox" id="vbox7">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="border_width">5</property>
+            <property name="can_focus">False</property>
+            <property name="border_width">12</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">20</property>
             <child>
-              <object class="GtkBox" id="vbox7">
+              <object class="GtkGrid">
                 <property name="visible">True</property>
-                <property name="orientation">vertical</property>
-                <property name="border_width">12</property>
-                <property name="spacing">12</property>
+                <property name="can_focus">False</property>
+                <property name="row_spacing">12</property>
+                <property name="column_spacing">12</property>
                 <child>
-                  <object class="GtkHBox" id="hbox61">
+                  <object class="GtkLabel">
                     <property name="visible">True</property>
-                    <child>
-                      <object class="GtkImage" id="key_image">
-                        <property name="visible">True</property>
-                        <property name="yalign">0</property>
-                        <property name="stock">gtk-missing-image</property>
-                        <property name="icon-size">6</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkGrid">
-                        <property name="visible">True</property>
-                        <property name="column_spacing">12</property>
-                        <property name="row_spacing">3</property>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="xalign">1</property>
-                            <property name="label" translatable="yes" context="name-of-ssh-key" 
comments="Name of key, often a persons name">Name:</property>
-                            <attributes>
-                             <attribute name="weight" value="bold"/>
-                            </attributes>
-                          </object>
-                          <packing>
-                            <property name="top_attach">0</property>
-                            <property name="left_attach">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkEntry" id="comment_entry">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="activates_default">True</property>
-                            <signal name="activate" handler="on_ssh_comment_activate"/>
-                            <signal name="focus_out_event" handler="on_ssh_comment_focus_out"/>
-                          </object>
-                          <packing>
-                            <property name="top_attach">0</property>
-                            <property name="left_attach">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="xalign">1</property>
-                            <property name="label" translatable="yes">Type:</property>
-                            <attributes>
-                             <attribute name="weight" value="bold"/>
-                            </attributes>
-                          </object>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="left_attach">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="type_label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Secure Shell Key</property>
-                            <property name="selectable">True</property>
-                          </object>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="left_attach">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="halign">start</property>
-                            <property name="label" translatable="yes">Identifier:</property>
-                            <attributes>
-                             <attribute name="weight" value="bold"/>
-                            </attributes>
-                          </object>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="left_attach">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="id_label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label"></property>
-                            <property name="selectable">True</property>
-                          </object>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="left_attach">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes" context="name-of-ssh-key" comments="Name of 
key, often a persons name">Name</property>
+                    <property name="xalign">1</property>
+                    <attributes>
+                      <attribute name="weight" value="normal"/>
+                    </attributes>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
                   </object>
                   <packing>
-                    <property name="expand">False</property>
-                    <property name="position">0</property>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="passphrase_button">
-                    <property name="label" translatable="yes">Change _Passphrase</property>
+                  <object class="GtkEntry" id="comment_entry">
                     <property name="visible">True</property>
-                    <property name="halign">end</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="image">passphrase-image</property>
-                    <property name="use_underline">True</property>
-                    <signal name="clicked" handler="on_ssh_passphrase_button_clicked"/>
+                    <property name="hexpand">True</property>
+                    <property name="activates_default">True</property>
+                    <signal name="activate" handler="on_ssh_comment_activate" swapped="no"/>
+                    <signal name="focus-out-event" handler="on_ssh_comment_focus_out" swapped="no"/>
                   </object>
                   <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes">Algorithm</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="algo_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="selectable">True</property>
+                    <property name="xalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes">Key Length</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="key_length_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="selectable">True</property>
+                    <property name="xalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes">Location</property>
+                    <property name="selectable">True</property>
+                    <property name="xalign">0</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="location_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_markup">True</property>
+                    <property name="selectable">True</property>
+                    <property name="ellipsize">start</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes">Fingerprint</property>
+                    <property name="selectable">True</property>
+                    <property name="xalign">0</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkBox" id="vbox28">
+                  <object class="GtkLabel" id="fingerprint_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="selectable">True</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">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="GtkBox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">20</property>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="orientation">vertical</property>
-                    <property name="spacing">6</property>
                     <child>
-                      <object class="GtkLabel" id="label22226">
+                      <object class="GtkLabel">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Remote Access</property>
                         <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Trust</property>
-                        <attributes>
-                         <attribute name="weight" value="bold"/>
-                        </attributes>
                       </object>
                       <packing>
                         <property name="expand">False</property>
-                        <property name="fill">False</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkBox" id="vbox29">
+                      <object class="GtkLabel">
                         <property name="visible">True</property>
-                        <property name="orientation">vertical</property>
-                        <property name="spacing">6</property>
-                        <property name="margin_start">12</property>
-                        <child>
-                          <object class="GtkCheckButton" id="trust_check">
-                            <property name="label" translatable="yes">The owner of this key is _authorized 
to connect to this computer</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="draw_indicator">True</property>
-                            <signal name="toggled" handler="on_ssh_trust_toggled"/>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="trust_message">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">This only applies to the 
&lt;i&gt;%s&lt;/i&gt; account.</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>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Allows accessing this computer 
remotely</property>
+                        <property name="xalign">0</property>
+                        <style>
+                          <class name="dim-label"/>
+                        </style>
                       </object>
                       <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                   </object>
                   <packing>
-                    <property name="position">2</property>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSwitch" id="trust_check">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="valign">center</property>
+                    <signal name="notify::active" handler="on_ssh_trust_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
               </object>
               <packing>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel">
-                <property name="visible">True</property>
-                <property name="xpad">3</property>
-                <property name="label" translatable="yes">Key</property>
-              </object>
-              <packing>
-                <property name="tab_fill">False</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
               </packing>
             </child>
             <child>
               <object class="GtkBox">
                 <property name="visible">True</property>
-                <property name="border_width">12</property>
-                <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="halign">end</property>
                 <property name="spacing">12</property>
                 <child>
-                  <object class="GtkFrame">
+                  <object class="GtkButton" id="export_button">
+                    <property name="label" translatable="yes">Export</property>
                     <property name="visible">True</property>
-                    <property name="label_xalign">0</property>
-                    <property name="shadow_type">none</property>
-                    <child>
-                      <object class="GtkGrid">
-                        <property name="visible">True</property>
-                        <property name="column_spacing">12</property>
-                        <property name="row_spacing">6</property>
-                        <property name="margin_top">6</property>
-                        <property name="margin_start">12</property>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="yalign">0</property>
-                            <property name="label" translatable="yes">Algorithm:</property>
-                            <attributes>
-                             <attribute name="weight" value="bold"/>
-                            </attributes>
-                          </object>
-                          <packing>
-                            <property name="top_attach">0</property>
-                            <property name="left_attach">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="algo_label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label"></property>
-                            <property name="selectable">True</property>
-                          </object>
-                          <packing>
-                            <property name="top_attach">0</property>
-                            <property name="left_attach">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="yalign">0</property>
-                            <property name="label" translatable="yes">Key length:</property>
-                            <attributes>
-                             <attribute name="weight" value="bold"/>
-                            </attributes>
-                          </object>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="left_attach">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="key_length_label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label"></property>
-                            <property name="selectable">True</property>
-                          </object>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="left_attach">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label113">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Location:</property>
-                            <attributes>
-                             <attribute name="weight" value="bold"/>
-                            </attributes>
-                          </object>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="left_attach">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="location_label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="xalign">0</property>
-                            <property name="yalign">0</property>
-                            <property name="label"></property>
-                            <property name="use_markup">True</property>
-                            <property name="selectable">True</property>
-                            <property name="ellipsize">start</property>
-                          </object>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="left_attach">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label22231">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Fingerprint:</property>
-                            <attributes>
-                             <attribute name="weight" value="bold"/>
-                            </attributes>
-                          </object>
-                          <packing>
-                            <property name="top_attach">3</property>
-                            <property name="left_attach">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="fingerprint_label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="xalign">0</property>
-                            <property name="yalign">0</property>
-                            <property name="label"></property>
-                            <property name="selectable">True</property>
-                          </object>
-                          <packing>
-                            <property name="top_attach">3</property>
-                            <property name="left_attach">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                    </child>
-                    <child type="label">
-                      <object class="GtkLabel" id="label108">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Technical Details:</property>
-                        <attributes>
-                         <attribute name="weight" value="bold"/>
-                        </attributes>
-                      </object>
-                    </child>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <signal name="clicked" handler="on_ssh_export_button_clicked" swapped="no"/>
                   </object>
                   <packing>
                     <property name="expand">False</property>
-                    <property name="fill">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="export_button">
-                    <property name="label" translatable="yes">E_xport Complete Key</property>
+                  <object class="GtkButton" id="passphrase_button">
+                    <property name="label" translatable="yes">Change _Passphrase</property>
                     <property name="visible">True</property>
-                    <property name="halign">end</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
-                    <property name="image">export-image</property>
+                    <property name="halign">end</property>
+                    <property name="image">passphrase-image</property>
                     <property name="use_underline">True</property>
-                    <signal name="clicked" handler="on_ssh_export_button_clicked"/>
+                    <signal name="clicked" handler="on_ssh_passphrase_button_clicked" swapped="no"/>
                   </object>
                   <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
+                <child>
+                  <object class="GtkButton">
+                    <property name="label" translatable="yes">Delete SSH Key</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="halign">end</property>
+                    <signal name="clicked" handler="on_delete_clicked" swapped="no"/>
+                    <style>
+                      <class name="destructive-action"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
               </object>
               <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label22222">
-                <property name="visible">True</property>
-                <property name="xpad">3</property>
-                <property name="label" translatable="yes">Details</property>
-              </object>
-              <packing>
-                <property name="position">1</property>
-                <property name="tab_fill">False</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
               </packing>
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>



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