[gnome-keysign: 4/10] PreSignWidget: get hold of the save as, import, and help buttons



commit bbc3457eac7af0c09c62bb8ade931bcef17c526c
Author: Tobias Mueller <muelli cryptobitch de>
Date:   Fri May 10 10:47:09 2019 +0200

    PreSignWidget: get hold of the save as, import, and help buttons
    
    We store them as a property so that other callers can avail of them.
    That is not very nice. But we haven't fixed the design just yet and they
    may become an internal part of the widget and emit signals. We'll see.

 keysign/keyconfirm.py | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/keysign/keyconfirm.py b/keysign/keyconfirm.py
index a8e9761..ddb385e 100755
--- a/keysign/keyconfirm.py
+++ b/keysign/keyconfirm.py
@@ -129,6 +129,15 @@ class PreSignWidget(Gtk.VBox):
         imagebox.add(ScalingImage(pixbuf=pixbuf))
         imagebox.show_all()
 
+        # We save the reference here to expose this infobar to the caller.
+        # This is a bit ugly, because it makes this implementation detail part of the
+        # API. The infobar should probably be part of the caller's responsibility,
+        # i.e. not part of this widget.
+        self.infobar_success = builder.get_object('infobar_certifications_produced')
+        self.infobar_save_as_button = builder.get_object('btn_local_import_save_as')
+        self.infobar_import_button = builder.get_object('btn_local_import')
+        self.infobar_help_button = builder.get_object('btn_local_import_help')
+
 
     def on_confirm_button_clicked(self, buttonObject, *args):
         self.emit('sign-key-confirmed', self.key, *args)


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