From 0a74635a7cd4edc2ae5eb4a3ffaacb0cca571ea5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 22 Feb 2016 09:50:09 +1000 Subject: [PATCH] Reduce the number of resolution spinbuttons to the hw resolutions Signed-off-by: Peter Hutterer --- piper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/piper.py b/piper.py index 400272d..0731d06 100755 --- a/piper.py +++ b/piper.py @@ -118,6 +118,7 @@ class Piper(Gtk.Window): for i in range(0, 5): sb = builder.get_object("piper-xres-spinbutton{}".format(i + 1)) if i >= nres: + sb.set_visible(False) continue xres = res[i].resolution[0] @@ -127,6 +128,7 @@ class Piper(Gtk.Window): nres_spin = builder.get_object("piper-nresolutions-spin") nres_spin.connect("value-changed", self.on_nresolutions_changed, builder) nres_spin.set_value(nres) + nres_spin.set_range(1, nres) def _init_report_rate(self, builder, profile): # Note: we simplify here, the UI only allows one report rate and it