Browse Source

Don't show the dialog with no capabilities

Clara Hobbs 7 years ago
parent
commit
83493dce78
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      pd-buddy-gtk.py

+ 4
- 0
pd-buddy-gtk.py View File

434
         with pdbuddy.Sink(self.serial_port) as pdbs:
434
         with pdbuddy.Sink(self.serial_port) as pdbs:
435
             caps = pdbs.get_source_cap()
435
             caps = pdbs.get_source_cap()
436
 
436
 
437
+        if not caps:
438
+            # If there are no capabilities, don't show a dialog
439
+            return
440
+
437
         # Create the dialog
441
         # Create the dialog
438
         window = self.builder.get_object("pdb-window")
442
         window = self.builder.get_object("pdb-window")
439
         dialog_builder = Gtk.Builder.new_from_file("data/src-cap-dialog.ui")
443
         dialog_builder = Gtk.Builder.new_from_file("data/src-cap-dialog.ui")

Loading…
Cancel
Save