def do_prefs(self):
        """show the prefs dialog and resync with shotgun"""
        if self.prefs.exec_() == QtGui.QDialog.Accepted:
            self.__conn = self.__connect_to_shotgun()
            self.__link_for_file('', warn=True)
        if not self.__conn:
            self.gui.buttons.button(QtGui.QDialogButtonBox.Ok).setEnabled(False)
        else:
            self.gui.buttons.button(QtGui.QDialogButtonBox.Ok).setEnabled(True)
dataset/ETHPy150Open shotgunsoftware/pyqt-uploader/uploader.py/Uploader.do_prefs/original