From 40cf21160d5befc946c11a38ceed2bc9f03913a6 Mon Sep 17 00:00:00 2001 From: Balazs Gyurak Date: Sun, 5 Jan 2020 22:13:19 +0000 Subject: [PATCH] Add event to disable sub option --- prefs.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/prefs.js b/prefs.js index bf60316..9df6a02 100644 --- a/prefs.js +++ b/prefs.js @@ -110,7 +110,7 @@ function buildPrefsWidget() { // Double width previews let doubleWidthLabel = new Gtk.Label({ - label: _(" Use double width previews on sides in 4 column mode"), + label: _(" Use double width previews on sides in 4 column mode"), visible: true, hexpand: true, halign: Gtk.Align.START @@ -123,6 +123,11 @@ function buildPrefsWidget() { layout.attach(doubleWidthLabel, 0, row, 1, 1); layout.attach(doubleWidthInput, 1, row++, 1, 1); + previewInput.connect('state-set', function(widget, state) { + doubleWidthLabel.set_sensitive(state); + doubleWidthInput.set_sensitive(state); + }); + // Debug setting let debugLabel = new Gtk.Label({ label: _("Turn on debugging"),