]> sigrok.org Git - sigrok-meter.git/commitdiff
Initial libsigrok Python bindings integration.
authorUwe Hermann <redacted>
Tue, 16 Apr 2013 18:33:25 +0000 (20:33 +0200)
committerUwe Hermann <redacted>
Tue, 16 Apr 2013 18:33:25 +0000 (20:33 +0200)
sigrok-meter

index 08441ac07c8cdae70388865cfd43ed82c2c44736..6ef32835896ac2cda587e9d4538caffcc1a95475 100755 (executable)
@@ -20,6 +20,7 @@
 ##
 
 from gi.repository import Gtk
+import libsigrok
 
 class SigrokMeter:
     def __init__(self):
@@ -34,10 +35,14 @@ class SigrokMeter:
 
     def on_about(self, action):
         about = self.builder.get_object("aboutdialog")
+        sr_pkg = libsigrok.sr_package_version_string_get()
+        sr_lib = libsigrok.sr_lib_version_string_get()
+        s = "Using libsigrok %s (lib version %s)." % (sr_pkg, sr_lib)
+        about.set_comments(s)
         about.run()
         about.hide()
 
 if __name__ == '__main__':
-       SigrokMeter()
-       Gtk.main()
+        SigrokMeter()
+        Gtk.main()