Get the data from the "Add ID dialog" and put it on the "IdCardWidget"
authorJavier Jardón <javier.jardon@codethink.co.uk>
Fri, 15 Apr 2011 15:27:04 +0000 (16:27 +0100)
committerJavier Jardón <javier.jardon@codethink.co.uk>
Fri, 15 Apr 2011 15:27:04 +0000 (16:27 +0100)
src/moonshot-idcard-widget.vala
src/moonshot-window.vala

index 955d802..df80dfb 100644 (file)
@@ -2,6 +2,8 @@ using Gtk;
 
 class IdCardWidget : Box
 {
+    public IdCard id_card { get; set; default = null; }
+
     private VBox main_vbox;
     private Table table;
     public Button delete_button { get; private set; default = null; }
index 2be528a..9f5dc8f 100644 (file)
@@ -71,6 +71,13 @@ class MainWindow : Window
     private void add_identity (AddIdentityDialog dialog)
     {
         var id_card_widget = new IdCardWidget ();
+        var id_card = new IdCard ();
+
+        id_card.issuer = dialog.issuer;
+        id_card.username = dialog.username;
+        id_card.password = dialog.password;
+
+        id_card_widget.id_card = id_card;
 
         this.custom_vbox.pack_start (id_card_widget, false, false);