fixed ProfileSelect

This commit is contained in:
Martin Wagner 2020-09-11 00:24:22 +02:00
parent 423a123f79
commit c953bfa8b3

View File

@ -3321,6 +3321,7 @@ class ProfileSelect(Gtk.ComboBoxText):
self._settings.connect("changed::ports", self._refresh)
self._settings.connect("changed::passwords", self._refresh)
self._settings.connect("changed::paths", self._refresh)
self._settings.connect("changed::active-profile", self._on_active_profile_changed)
self._refresh()
@ -3336,6 +3337,11 @@ class ProfileSelect(Gtk.ComboBoxText):
active=self.get_active()
self._settings.set_int("active-profile", active)
def _on_active_profile_changed(self, *args):
self.handler_block(self._changed)
self.set_active(self._settings.get_int("active-profile"))
self.handler_unblock(self._changed)
class ConnectionNotify(Gtk.Revealer):
def __init__(self, client, settings):
super().__init__(valign=Gtk.Align.START, halign=Gtk.Align.CENTER)