From c95e822614cc03386ed8afe58f49a7df29ac4d7b Mon Sep 17 00:00:00 2001 From: kozec Date: Tue, 5 Jun 2018 17:26:44 +0200 Subject: [PATCH] Hide 'change syncthing binary' option from UI settings when setup without finddaemondialog. Fixes #427 --- glade/ui-settings.glade | 47 ++++++++++++------------------- syncthing_gtk/uisettingsdialog.py | 5 ++-- 2 files changed, 21 insertions(+), 31 deletions(-) diff --git a/glade/ui-settings.glade b/glade/ui-settings.glade index 40e400df..43be2fff 100644 --- a/glade/ui-settings.glade +++ b/glade/ui-settings.glade @@ -1,5 +1,5 @@ - + @@ -755,7 +755,7 @@ Install blahblahblah to enable Caja support 0 - 9 + 6 2 @@ -772,7 +772,7 @@ Install blahblahblah to enable Caja support 0 - 10 + 7 2 @@ -789,7 +789,7 @@ Install blahblahblah to enable Caja support 0 - 3 + 0 2 @@ -807,7 +807,7 @@ Install blahblahblah to enable Caja support 0 - 4 + 1 2 @@ -823,7 +823,7 @@ Install blahblahblah to enable Caja support 0 - 5 + 2 2 @@ -840,7 +840,7 @@ Install blahblahblah to enable Caja support 0 - 6 + 3 2 @@ -856,7 +856,7 @@ Install blahblahblah to enable Caja support 0 - 8 + 5 2 @@ -872,28 +872,10 @@ Install blahblahblah to enable Caja support 0 - 7 + 4 2 - - - - - - - - - - - - - - - - - - 2 @@ -923,9 +905,10 @@ Install blahblahblah to enable Caja support 5 5 - + True False + True 10 This binary will be started when syncthing daemon is not running and "<i>start daemon in background</i>" option is checked on "<i>Interface</i>" page. True @@ -944,6 +927,7 @@ Install blahblahblah to enable Caja support True True True + True True 0.51999998092651367 @@ -954,9 +938,10 @@ Install blahblahblah to enable Caja support - + True False + True Syncthing binary location True 0 @@ -974,6 +959,7 @@ Install blahblahblah to enable Caja support True True + True True @@ -1092,5 +1078,8 @@ Example: + + + diff --git a/syncthing_gtk/uisettingsdialog.py b/syncthing_gtk/uisettingsdialog.py index 742e62b3..0c6b296b 100644 --- a/syncthing_gtk/uisettingsdialog.py +++ b/syncthing_gtk/uisettingsdialog.py @@ -125,8 +125,9 @@ def load_data(self): log.warning("Cannot find %s.py required to support %s", plugin, name) self["fmLblIntegrationStatus"].set_text("\n".join(status)) if StDownloader is None: - self["vst_autoupdate"].set_visible(False) - self["lblAutoupdate"].set_visible(False) + for name in ("vst_autoupdate", "lblAutoupdate", "lblsyncthing_binary", + "lblsyncthing_binary2", "vsyncthing_binary", "btBrowse"): + self[name].set_visible(False) self.cb_data_loaded(copy) self.cb_check_value()