Connect replicaOf combo

This commit is contained in:
Roberto Alsina 2020-02-01 13:00:11 -03:00
parent 03cfa7e136
commit f3b9be0d9c

View File

@ -88,6 +88,7 @@ class Window(QObject):
ui.show()
self.ui.setWindowTitle("Display Configuration")
self.ui.screenCombo.currentTextChanged.connect(self.monitor_selected)
self.ui.replicaOf.currentTextChanged.connect(self.replica_changed)
self.ui.orientationCombo.currentIndexChanged.connect(self.orientation_changed)
self.xrandr_info = {}
self.get_xrandr_info()
@ -101,6 +102,12 @@ class Window(QObject):
self.ui.resetButton.clicked.connect(self.do_reset)
self.ui.cancelButton.clicked.connect(self.ui.reject)
def replica_changed(self):
mon = self.ui.screenCombo.currentText()
replicate = self.ui.replicaOf.currentText()
print(f'Making {mon} a replica of {replicate}')
def do_reset(self):
for n in self.xrandr_info:
self.xrandr_info[n].update(self.orig_xrandr_info[n])