Skip to content

Commit

Permalink
Merge pull request #95 from tsalemink/pmr
Browse files Browse the repository at this point in the history
Update PMR workflow import and update actions
  • Loading branch information
hsorby authored Oct 3, 2023
2 parents 0ce648f + d68558a commit aa85555
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/mapclient/tools/pmr/settings/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

from PySide6 import QtCore

from mapclient.tools.pmr.core import DEFAULT_SITE_URL, TEACHING_SITE_URL

# Credentials follows:
#
# Key OP8AKmDIlH7OkHaPWNbnb-zf
Expand All @@ -38,7 +40,6 @@

class PMR(object):

DEFAULT_PMR_IPADDRESS = 'http://teaching.physiomeproject.org'
DEFAULT_CONSUMER_PUBLIC_TOKEN = 'OP8AKmDIlH7OkHaPWNbnb-zf'
DEFAULT_CONSUMER_SECRET_TOKEN = 'QQcKMnyCjjb7JNDHA-Lwdu7p'

Expand All @@ -50,10 +51,10 @@ def readSettings(self):
settings = QtCore.QSettings()
settings.beginGroup('PMR')
# pmr_host? this is a domain name...
self._active_host = settings.value('active-pmr-website', self.DEFAULT_PMR_IPADDRESS)
self._active_host = settings.value('active-pmr-website', TEACHING_SITE_URL)
self._consumer_public_token = settings.value('consumer-public-token', self.DEFAULT_CONSUMER_PUBLIC_TOKEN)
self._consumer_secret_token = settings.value('consumer-secret-token', self.DEFAULT_CONSUMER_SECRET_TOKEN)

size = settings.beginReadArray('instances')
for i in range(size):
settings.setArrayIndex(i)
Expand All @@ -64,6 +65,8 @@ def readSettings(self):
settings.endArray()

settings.endGroup()
if size == 0:
self.addHost(DEFAULT_SITE_URL)
self.addHost(self._active_host)

def writeSettings(self):
Expand Down
1 change: 0 additions & 1 deletion src/mapclient/tools/pmr/widgets/workspacewidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def _setup_ui(self):
import_layout.addStretch(1)

self._update_button = QtWidgets.QPushButton("Update")
self._update_button.setEnabled(False)
update_layout = QtWidgets.QHBoxLayout()
update_layout.addWidget(self._update_button)
update_layout.addStretch(1)
Expand Down

0 comments on commit aa85555

Please sign in to comment.