Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing mscolab Url must be blocked on connect #637 #661

Merged
merged 2 commits into from
Feb 3, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mslib/msui/mscolab.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ def disconnect_handler(self):
self.loginButton.setEnabled(False)
self.addUser.setEnabled(False)
self.connectMscolab.setEnabled(True)
self.url.setEnabled(True)
self.url.setEditable(True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure but do we need to use setEditable as well? Won't just using setEnabled(False) be enough as it completely disabled the input?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you're right. I did not think of that. Wouldn't need line 167 as well if setEnabled is True!

# set mscolab_server_url to None
self.mscolab_server_url = None

Expand All @@ -186,6 +188,8 @@ def connect_handler(self):
# enable and disable right buttons
self.loginButton.setEnabled(True)
self.addUser.setEnabled(True)
self.url.setEditable(False)
self.url.setEnabled(False)
self.disconnectMscolab.setEnabled(True)
self.connectMscolab.setEnabled(False)
if self.mscolab_server_url not in self.settings["server_settings"].keys():
Expand Down