[med-svn] [Git][med-team/openmolar][upstream] New upstream version 1.1.6-g81838c85

Andreas Tille gitlab at salsa.debian.org
Mon Oct 29 11:49:52 GMT 2018


Andreas Tille pushed to branch upstream at Debian Med / openmolar


Commits:
35083ea4 by Andreas Tille at 2018-10-29T09:00:14Z
New upstream version 1.1.6-g81838c85
- - - - -


27 changed files:

- MANIFEST
- MANIFEST.in
- PKG-INFO
- setup.py
- src/openmolar/dbtools/cashbook.py
- src/openmolar/dbtools/courseHistory.py
- src/openmolar/dbtools/daybook.py
- src/openmolar/dbtools/daybookHistory.py
- src/openmolar/dbtools/estimatesHistory.py
- src/openmolar/dbtools/treatment_course.py
- src/openmolar/ptModules/formatted_notes.py
- src/openmolar/qt-designer/main.ui
- src/openmolar/qt4gui/customwidgets/notification_widget.py
- + src/openmolar/qt4gui/customwidgets/om_webview.py
- src/openmolar/qt4gui/customwidgets/schedule_control.py
- src/openmolar/qt4gui/dialogs/advanced_names_dialog.py
- src/openmolar/qt4gui/dialogs/child_smile_dialog.py
- src/openmolar/qt4gui/dialogs/print_record_dialog.py
- src/openmolar/qt4gui/diary_widget.py
- src/openmolar/qt4gui/fees/course_module.py
- src/openmolar/qt4gui/forum_widget.py
- src/openmolar/qt4gui/maingui.py
- src/openmolar/resources/resources.qrc
- + src/openmolar/resources/win_install_banner.bmp
- + src/openmolar/resources/win_install_dialog.bmp
- src/openmolar/settings/localsettings.py
- src/openmolar/settings/version.py


Changes:

=====================================
MANIFEST
=====================================
@@ -286,6 +286,7 @@ src/openmolar/qt4gui/customwidgets/estimate_widget.py
 src/openmolar/qt4gui/customwidgets/fiveminutetimeedit.py
 src/openmolar/qt4gui/customwidgets/money_line_edit.py
 src/openmolar/qt4gui/customwidgets/notification_widget.py
+src/openmolar/qt4gui/customwidgets/om_webview.py
 src/openmolar/qt4gui/customwidgets/schedule_control.py
 src/openmolar/qt4gui/customwidgets/simple_chartwidget.py
 src/openmolar/qt4gui/customwidgets/static_control_panel.py
@@ -441,6 +442,8 @@ src/openmolar/resources/resources.qrc
 src/openmolar/resources/schema.sql
 src/openmolar/resources/style.css
 src/openmolar/resources/triggers.sql
+src/openmolar/resources/win_install_banner.bmp
+src/openmolar/resources/win_install_dialog.bmp
 src/openmolar/resources/feescales/example_feescale.xml
 src/openmolar/resources/feescales/feescale_schema.xsd
 src/openmolar/resources/gp17/back.jpg


=====================================
MANIFEST.in
=====================================
@@ -3,7 +3,7 @@ recursive-include bin openmolar.svg openmolar.desktop openmolar.1
 recursive-include src/openmolar/resources *.qrc *.xsd *.xml *.css *.sql *.svg *.png 
 recursive-include src/openmolar/locale *.po *.pot
 recursive-include src/openmolar/qt-designer *.ui
-recursive-include src/openmolar/resources *.xml *.png *.svg *.sql *.css *.qrc
+recursive-include src/openmolar/resources *.xml *.png *.svg *.sql *.css *.qrc *.bmp
 recursive-include src/openmolar/resources/icons *.png *.svg *.ico
 recursive-include src/openmolar/resources/teeth *.png
 recursive-include src/openmolar/resources/gp17 *.jpg


=====================================
PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: openmolar
-Version: 1.0.15-gd81f9e5
+Version: 1.1.6-g81838c85
 Summary: Open Source Dental Practice Management Software
 Home-page: https://www.openmolar.com
 Author: Neil Wallace


=====================================
setup.py
=====================================
@@ -117,8 +117,34 @@ class MakeUis(Command):
     user_options = []
     REMOVALS = ("        _translate = QtCore.QCoreApplication.translate\n",)
 
-    REPLACEMENTS = [("import resources_rc",
-                     "from openmolar.qt4gui import resources_rc")]
+    REPLACEMENTS = [
+        ("import resources_rc", "from openmolar.qt4gui import resources_rc"),
+        ("QtWebKitWidgets.QWebView", "OMWebView"),
+        ("from PyQt5 import QtWebKitWidgets",
+         "from openmolar.qt4gui.customwidgets.om_webview import OMWebView"),
+        ("class Ui_MainWindow(object):",
+         "from openmolar.qt4gui.customwidgets.upper_case_line_edit \\\n"
+         "    import UpperCaseLineEdit\n\n"
+         "class Ui_MainWindow(object):"),
+        ("self.titleEdit = QtWidgets.QLineEdit",
+         "self.titleEdit = UpperCaseLineEdit"),
+        ("self.fnameEdit = QtWidgets.QLineEdit",
+         "self.fnameEdit = UpperCaseLineEdit"),
+        ("self.snameEdit = QtWidgets.QLineEdit",
+         "self.snameEdit = UpperCaseLineEdit"),
+        ("self.addr1Edit = QtWidgets.QLineEdit",
+         "self.addr1Edit = UpperCaseLineEdit"),
+        ("self.addr2Edit = QtWidgets.QLineEdit",
+         "self.addr2Edit = UpperCaseLineEdit"),
+        ("self.addr3Edit = QtWidgets.QLineEdit",
+         "self.addr3Edit = UpperCaseLineEdit"),
+        ("self.townEdit = QtWidgets.QLineEdit",
+         "self.townEdit = UpperCaseLineEdit"),
+        ("self.countyEdit = QtWidgets.QLineEdit",
+         "self.countyEdit = UpperCaseLineEdit"),
+        ("self.pcdeEdit = QtWidgets.QLineEdit",
+         "self.pcdeEdit = UpperCaseLineEdit"),
+    ]
 
     SRC_FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                               "src", "openmolar", "qt-designer")
@@ -399,8 +425,12 @@ class Install(_install):
     '''
     re-implement distutils standard source code builder
     '''
+    def __init__(self, *args, **kwargs):
+        self.make_uis = MakeUis(*args, **kwargs)
+        _install.__init__(self, *args, **kwargs)
 
     def run(self, *args, **kwargs):
+        self.make_uis.run(*args, **kwargs)
         alter_version = AlterVersion()
         alter_version.change()
         win_script = WindowsScript()
@@ -450,6 +480,35 @@ class Test(Command):
         print(result)
 
 
+class Mock(Command):
+
+    description = "do nothing except printing out build environment variables"
+    user_options = []
+
+    def initialize_options(self):
+        pass
+
+    def finalize_options(self):
+        pass
+
+    def run(self, *args, **kwargs):
+        print("---- VERSION ----")
+        print(VERSION)
+        print("\n---- RESOURCE_FILE ----")
+        print(RESOURCE_FILE)
+        print("\n---- DATA_FILES ----")
+        for folder, files in DATA_FILES:
+            print(folder)
+            for file_ in files:
+                print("\t%s" % file_)
+        print("\n---- RESCOURCES_DIR ----")
+        print(RESOURCES_DIR)
+        print("\n---- il8n_DIR ----")
+        print(il8n_DIR)
+        print("\n---- SCRIPTS ----")
+        print(SCRIPTS)
+
+
 if __name__ == "__main__":
 
     # I need to import this module so the windows installer can access the
@@ -491,6 +550,7 @@ if __name__ == "__main__":
                   'install': Install,
                   'install_data': InstallData,
                   'makeuis': MakeUis,
-                  'test': Test},
+                  'test': Test,
+                  'mock': Mock},
         scripts=SCRIPTS,
     )


=====================================
src/openmolar/dbtools/cashbook.py
=====================================
@@ -209,7 +209,7 @@ def details(dent, startdate, enddate,
         if len(headers) == 11:
             if full_edit or row[6] == localsettings.currentDay():
                 retarg += '''<td align="center">
-                <a href="edit_%s">edit</a></td>''' % row[7]
+                <a href="om://edit_%s">edit</a></td>''' % row[7]
             else:
                 retarg += '<td align="center">n/a</a>'
         retarg += '</tr>\n'


=====================================
src/openmolar/dbtools/courseHistory.py
=====================================
@@ -142,7 +142,7 @@ def details(sno, current_csno, include_estimates=False, include_daybook=False):
 
                     gap = cmpd - daybook_entry.date
                     if daybook.ALLOW_TX_EDITS:
-                        id_col = '<a href="daybook_id_edit?%s">%s</a>' % (
+                        id_col = '<a href="om://daybook_id_edit?%s">%s</a>' % (
                             daybook_entry.id, _("Edit Tx"))
                     else:
                         id_col = str(daybook_entry.id)
@@ -190,14 +190,15 @@ def details(sno, current_csno, include_estimates=False, include_daybook=False):
                     course_checker_errors += 1
                     course_html += course_check.results
                     course_html += '''<br />
-                        <a href="consistent_courseno?%s">%s</a>''' % (
+                        <a href="om://consistent_courseno?%s">%s</a>''' % (
                         course.courseno, _("Examine these Issues."))
 
         days_elapsed = ""
         try:
             prev_course = courses[i + 1]
             if ALLOW_EDIT:
-                merge_link = '<br /><a href="merge_courses?%s+%s">%s?</a>' % (
+                merge_link = \
+                    '<br /><a href="om://merge_courses?%s+%s">%s?</a>' % (
                     course.courseno, prev_course.courseno,
                     _("Merge with previous course")
                 )


=====================================
src/openmolar/dbtools/daybook.py
=====================================
@@ -201,12 +201,12 @@ def details(regdent, trtdent, startdate, enddate, filters=""):
             txs.append(row[15].decode("utf8").strip(" %s" % chr(0)))
 
             if ALLOW_TX_EDITS:
-                extra_link = ' / <a href="daybook_id_edit?%s">%s</a>' % (
+                extra_link = ' / <a href="om://daybook_id_edit?%s">%s</a>' % (
                     row[19], _("Edit Tx"))
             else:
                 extra_link = ""
             retarg += '''<td>%s</td>
-            <td><a href="daybook_id?%sfeesa=%sfeesb=%s">%s</a>%s</td>
+            <td><a href="om://daybook_id?%sfeesa=%sfeesb=%s">%s</a>%s</td>
             <td align="right">%s</td>
             <td align="right">%s</td></tr>''' % (
                 " ".join(txs),


=====================================
src/openmolar/dbtools/daybookHistory.py
=====================================
@@ -66,7 +66,7 @@ def details(sno):
         retarg += '    <tr>' if i % 2 else '    <tr bgcolor="#eeeeee">'
 
         if ALLOW_TX_EDITS:
-            extra_link = ' / <a href="daybook_id_edit?%s">%s</a>' % (
+            extra_link = ' / <a href="om://daybook_id_edit?%s">%s</a>' % (
                 id_, _("Edit Tx"))
         else:
             extra_link = ""
@@ -78,7 +78,7 @@ def details(sno):
         <td>%s</td>
         <td>%s</td>
         <td align="center">
-        <a href="daybook_id?%sfeesa=%sfeesb=%s">%s</a>%s
+        <a href="om://daybook_id?%sfeesa=%sfeesb=%s">%s</a>%s
         </td>
         <td align="right">%s</td><td align="right">%s</td>\n</tr>\n''' % (
             date_, cset,


=====================================
src/openmolar/dbtools/estimatesHistory.py
=====================================
@@ -37,7 +37,8 @@ COURSE_QUERY = QUERY.replace(
 
 ALLOW_EDIT = False
 
-EDIT_STRING = '<a href="edit_estimate?%%s">%s</a>' % _("Edit this Estimate")
+EDIT_STRING = '<a href="om://edit_estimate?%%s">%s</a>' % _(
+    "Edit this Estimate")
 
 
 def getEsts(sno, courseno=None):


=====================================
src/openmolar/dbtools/treatment_course.py
=====================================
@@ -442,8 +442,8 @@ class TreatmentCourse(object):
             return " ".join(sorted([item for item in items if item != ""]))
 
         if allow_edit:
-            edit_str = '''<a href="edit_courseno?%s">%s</a><br />
-            <a href="edit_tx_courseno?%s">%s</a>
+            edit_str = '''<a href="om://edit_courseno?%s">%s</a><br />
+            <a href="om://edit_tx_courseno?%s">%s</a>
             <!--merge-->''' % (
                 self.courseno, _("Edit Course Dates"),
                 self.courseno, _("Edit Treatments"))


=====================================
src/openmolar/ptModules/formatted_notes.py
=====================================
@@ -239,8 +239,9 @@ def notes(notes_dict, full_notes=True):
         subline = '<td class="ops">%s' % op
 
         if (date == localsettings.currentDay() and
-           op == localsettings.operator):
-            subline += '<br /><a href="edit_notes?__SNO__">%s</a>' % _("Edit")
+                op == localsettings.operator):
+            subline += \
+                '<br /><a href="om://edit_notes?__SNO__">%s</a>' % _("Edit")
 
         newline += '''
         %s</td>
@@ -261,7 +262,7 @@ def todays_notes(serialno):
     html = notes(get_notes_dict(serialno, True))
     if not _("Today") in html:
         html = HEADER
-        html += "%s <a href='edit_notes?%s'>%s</a></body></html>" % (
+        html += "%s <a href='om://edit_notes?%s'>%s</a></body></html>" % (
             _("No notes found"), serialno, _("Add a note"))
 
     return html.replace("__SNO__", str(serialno))


=====================================
src/openmolar/qt-designer/main.ui
=====================================
@@ -46,7 +46,16 @@
     <property name="spacing">
      <number>0</number>
     </property>
-    <property name="margin">
+    <property name="leftMargin">
+     <number>0</number>
+    </property>
+    <property name="topMargin">
+     <number>0</number>
+    </property>
+    <property name="rightMargin">
+     <number>0</number>
+    </property>
+    <property name="bottomMargin">
      <number>0</number>
     </property>
     <item>
@@ -63,14 +72,23 @@
          <x>0</x>
          <y>0</y>
          <width>991</width>
-         <height>608</height>
+         <height>611</height>
         </rect>
        </property>
        <layout class="QHBoxLayout" name="horizontalLayout_7">
         <property name="spacing">
          <number>0</number>
         </property>
-        <property name="margin">
+        <property name="leftMargin">
+         <number>0</number>
+        </property>
+        <property name="topMargin">
+         <number>0</number>
+        </property>
+        <property name="rightMargin">
+         <number>0</number>
+        </property>
+        <property name="bottomMargin">
          <number>0</number>
         </property>
         <item>
@@ -96,7 +114,16 @@
             <string>Patient Database</string>
            </attribute>
            <layout class="QHBoxLayout" name="horizontalLayout_24">
-            <property name="margin">
+            <property name="leftMargin">
+             <number>6</number>
+            </property>
+            <property name="topMargin">
+             <number>6</number>
+            </property>
+            <property name="rightMargin">
+             <number>6</number>
+            </property>
+            <property name="bottomMargin">
              <number>6</number>
             </property>
             <item>
@@ -129,7 +156,16 @@
                <property name="spacing">
                 <number>0</number>
                </property>
-               <property name="margin">
+               <property name="leftMargin">
+                <number>0</number>
+               </property>
+               <property name="topMargin">
+                <number>0</number>
+               </property>
+               <property name="rightMargin">
+                <number>0</number>
+               </property>
+               <property name="bottomMargin">
                 <number>0</number>
                </property>
                <item>
@@ -144,7 +180,16 @@
                   <property name="spacing">
                    <number>3</number>
                   </property>
-                  <property name="margin">
+                  <property name="leftMargin">
+                   <number>0</number>
+                  </property>
+                  <property name="topMargin">
+                   <number>0</number>
+                  </property>
+                  <property name="rightMargin">
+                   <number>0</number>
+                  </property>
+                  <property name="bottomMargin">
                    <number>0</number>
                   </property>
                   <item>
@@ -276,7 +321,16 @@
                   <property name="spacing">
                    <number>2</number>
                   </property>
-                  <property name="margin">
+                  <property name="leftMargin">
+                   <number>0</number>
+                  </property>
+                  <property name="topMargin">
+                   <number>0</number>
+                  </property>
+                  <property name="rightMargin">
+                   <number>0</number>
+                  </property>
+                  <property name="bottomMargin">
                    <number>0</number>
                   </property>
                   <item>
@@ -450,7 +504,16 @@
                  <property name="spacing">
                   <number>0</number>
                  </property>
-                 <property name="margin">
+                 <property name="leftMargin">
+                  <number>0</number>
+                 </property>
+                 <property name="topMargin">
+                  <number>0</number>
+                 </property>
+                 <property name="rightMargin">
+                  <number>0</number>
+                 </property>
+                 <property name="bottomMargin">
                   <number>0</number>
                  </property>
                  <item>
@@ -463,8 +526,8 @@
                      <rect>
                       <x>0</x>
                       <y>0</y>
-                      <width>770</width>
-                      <height>646</height>
+                      <width>546</width>
+                      <height>613</height>
                      </rect>
                     </property>
                     <layout class="QVBoxLayout" name="verticalLayout_6">
@@ -480,12 +543,21 @@
                         <string>Details</string>
                        </property>
                        <layout class="QGridLayout" name="gridLayout_2">
-                        <property name="verticalSpacing">
-                         <number>3</number>
+                        <property name="leftMargin">
+                         <number>6</number>
+                        </property>
+                        <property name="topMargin">
+                         <number>6</number>
+                        </property>
+                        <property name="rightMargin">
+                         <number>6</number>
                         </property>
-                        <property name="margin">
+                        <property name="bottomMargin">
                          <number>6</number>
                         </property>
+                        <property name="verticalSpacing">
+                         <number>3</number>
+                        </property>
                         <item row="3" column="0">
                          <widget class="QLabel" name="label_18">
                           <property name="text">
@@ -1252,8 +1324,7 @@
                           </property>
                           <property name="icon">
                            <iconset theme="window-close">
-                            <normaloff/>
-                           </iconset>
+                            <normaloff>.</normaloff>.</iconset>
                           </property>
                          </widget>
                         </item>
@@ -1340,7 +1411,16 @@
                         <string>Family Groups</string>
                        </property>
                        <layout class="QGridLayout" name="gridLayout_11">
-                        <property name="margin">
+                        <property name="leftMargin">
+                         <number>6</number>
+                        </property>
+                        <property name="topMargin">
+                         <number>6</number>
+                        </property>
+                        <property name="rightMargin">
+                         <number>6</number>
+                        </property>
+                        <property name="bottomMargin">
                          <number>6</number>
                         </property>
                         <property name="spacing">
@@ -1621,7 +1701,7 @@
                         <string/>
                        </property>
                        <property name="pixmap">
-                        <pixmap resource="../resources/resources.qrc">:/hdp.png</pixmap>
+                        <pixmap>:/hdp.png</pixmap>
                        </property>
                       </widget>
                      </item>
@@ -1818,8 +1898,8 @@
                      <rect>
                       <x>0</x>
                       <y>0</y>
-                      <width>752</width>
-                      <height>423</height>
+                      <width>465</width>
+                      <height>399</height>
                      </rect>
                     </property>
                     <layout class="QGridLayout" name="gridLayout">
@@ -2095,7 +2175,16 @@
                  <property name="spacing">
                   <number>3</number>
                  </property>
-                 <property name="margin">
+                 <property name="leftMargin">
+                  <number>3</number>
+                 </property>
+                 <property name="topMargin">
+                  <number>3</number>
+                 </property>
+                 <property name="rightMargin">
+                  <number>3</number>
+                 </property>
+                 <property name="bottomMargin">
                   <number>3</number>
                  </property>
                  <item>
@@ -2111,15 +2200,24 @@
                      <rect>
                       <x>0</x>
                       <y>0</y>
-                      <width>766</width>
-                      <height>471</height>
+                      <width>487</width>
+                      <height>429</height>
                      </rect>
                     </property>
                     <layout class="QHBoxLayout" name="horizontalLayout_26">
                      <property name="spacing">
                       <number>3</number>
                      </property>
-                     <property name="margin">
+                     <property name="leftMargin">
+                      <number>0</number>
+                     </property>
+                     <property name="topMargin">
+                      <number>0</number>
+                     </property>
+                     <property name="rightMargin">
+                      <number>0</number>
+                     </property>
+                     <property name="bottomMargin">
                       <number>0</number>
                      </property>
                      <item>
@@ -2154,7 +2252,16 @@
                           <property name="spacing">
                            <number>0</number>
                           </property>
-                          <property name="margin">
+                          <property name="leftMargin">
+                           <number>0</number>
+                          </property>
+                          <property name="topMargin">
+                           <number>0</number>
+                          </property>
+                          <property name="rightMargin">
+                           <number>0</number>
+                          </property>
+                          <property name="bottomMargin">
                            <number>0</number>
                           </property>
                          </layout>
@@ -2166,7 +2273,16 @@
                           <property name="spacing">
                            <number>3</number>
                           </property>
-                          <property name="margin">
+                          <property name="leftMargin">
+                           <number>3</number>
+                          </property>
+                          <property name="topMargin">
+                           <number>3</number>
+                          </property>
+                          <property name="rightMargin">
+                           <number>3</number>
+                          </property>
+                          <property name="bottomMargin">
                            <number>3</number>
                           </property>
                           <item>
@@ -2174,7 +2290,7 @@
                             <property name="orientation">
                              <enum>Qt::Horizontal</enum>
                             </property>
-                            <widget class="QWebView" name="reception_webview" native="true">
+                            <widget class="QWebView" name="reception_webview">
                              <property name="sizePolicy">
                               <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
                                <horstretch>0</horstretch>
@@ -2193,13 +2309,13 @@
                                <height>16777215</height>
                               </size>
                              </property>
-                             <property name="url" stdset="0">
+                             <property name="url">
                               <url>
                                <string>about:blank</string>
                               </url>
                              </property>
                             </widget>
-                            <widget class="QWebView" name="reception_webview2" native="true">
+                            <widget class="QWebView" name="reception_webview2">
                              <property name="sizePolicy">
                               <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
                                <horstretch>0</horstretch>
@@ -2218,7 +2334,7 @@
                                <height>16777215</height>
                               </size>
                              </property>
-                             <property name="url" stdset="0">
+                             <property name="url">
                               <url>
                                <string>about:blank</string>
                               </url>
@@ -2266,7 +2382,16 @@
                              <string>MED Questionaire</string>
                             </property>
                             <layout class="QGridLayout" name="gridLayout_15">
-                             <property name="margin">
+                             <property name="leftMargin">
+                              <number>2</number>
+                             </property>
+                             <property name="topMargin">
+                              <number>2</number>
+                             </property>
+                             <property name="rightMargin">
+                              <number>2</number>
+                             </property>
+                             <property name="bottomMargin">
                               <number>2</number>
                              </property>
                              <property name="spacing">
@@ -2351,7 +2476,16 @@
                              <property name="spacing">
                               <number>3</number>
                              </property>
-                             <property name="margin">
+                             <property name="leftMargin">
+                              <number>2</number>
+                             </property>
+                             <property name="topMargin">
+                              <number>2</number>
+                             </property>
+                             <property name="rightMargin">
+                              <number>2</number>
+                             </property>
+                             <property name="bottomMargin">
                               <number>2</number>
                              </property>
                              <item>
@@ -2402,7 +2536,16 @@
                              <property name="spacing">
                               <number>3</number>
                              </property>
-                             <property name="margin">
+                             <property name="leftMargin">
+                              <number>2</number>
+                             </property>
+                             <property name="topMargin">
+                              <number>2</number>
+                             </property>
+                             <property name="rightMargin">
+                              <number>2</number>
+                             </property>
+                             <property name="bottomMargin">
                               <number>2</number>
                              </property>
                              <item>
@@ -2478,7 +2621,16 @@
                  <property name="spacing">
                   <number>3</number>
                  </property>
-                 <property name="margin">
+                 <property name="leftMargin">
+                  <number>3</number>
+                 </property>
+                 <property name="topMargin">
+                  <number>3</number>
+                 </property>
+                 <property name="rightMargin">
+                  <number>3</number>
+                 </property>
+                 <property name="bottomMargin">
                   <number>3</number>
                  </property>
                  <item>
@@ -2494,12 +2646,21 @@
                      <rect>
                       <x>0</x>
                       <y>0</y>
-                      <width>766</width>
-                      <height>468</height>
+                      <width>765</width>
+                      <height>458</height>
                      </rect>
                     </property>
                     <layout class="QGridLayout" name="gridLayout_4">
-                     <property name="margin">
+                     <property name="leftMargin">
+                      <number>0</number>
+                     </property>
+                     <property name="topMargin">
+                      <number>0</number>
+                     </property>
+                     <property name="rightMargin">
+                      <number>0</number>
+                     </property>
+                     <property name="bottomMargin">
                       <number>0</number>
                      </property>
                      <property name="spacing">
@@ -2557,8 +2718,8 @@
                       </widget>
                      </item>
                      <item row="2" column="0" rowspan="2">
-                      <widget class="QWebView" name="notesSummary_webView" native="true">
-                       <property name="url" stdset="0">
+                      <widget class="QWebView" name="notesSummary_webView">
+                       <property name="url">
                         <url>
                          <string>about:blank</string>
                         </url>
@@ -2673,7 +2834,16 @@
                         <enum>QFrame::Raised</enum>
                        </property>
                        <layout class="QHBoxLayout" name="horizontalLayout_6">
-                        <property name="margin">
+                        <property name="leftMargin">
+                         <number>2</number>
+                        </property>
+                        <property name="topMargin">
+                         <number>2</number>
+                        </property>
+                        <property name="rightMargin">
+                         <number>2</number>
+                        </property>
+                        <property name="bottomMargin">
                          <number>2</number>
                         </property>
                         <item>
@@ -2789,8 +2959,8 @@
                 </attribute>
                 <layout class="QGridLayout" name="gridLayout_6">
                  <item row="0" column="0" colspan="3">
-                  <widget class="QWebView" name="notes_webView" native="true">
-                   <property name="url" stdset="0">
+                  <widget class="QWebView" name="notes_webView">
+                   <property name="url">
                     <url>
                      <string>about:blank</string>
                     </url>
@@ -2899,7 +3069,16 @@
                    </widget>
                    <widget class="QWidget" name="charts">
                     <layout class="QGridLayout" name="gridLayout_14">
-                     <property name="margin">
+                     <property name="leftMargin">
+                      <number>3</number>
+                     </property>
+                     <property name="topMargin">
+                      <number>3</number>
+                     </property>
+                     <property name="rightMargin">
+                      <number>3</number>
+                     </property>
+                     <property name="bottomMargin">
                       <number>3</number>
                      </property>
                      <item row="3" column="1">
@@ -3029,7 +3208,16 @@
                     <property name="spacing">
                      <number>0</number>
                     </property>
-                    <property name="margin">
+                    <property name="leftMargin">
+                     <number>0</number>
+                    </property>
+                    <property name="topMargin">
+                     <number>0</number>
+                    </property>
+                    <property name="rightMargin">
+                     <number>0</number>
+                    </property>
+                    <property name="bottomMargin">
                      <number>0</number>
                     </property>
                     <item>
@@ -3039,7 +3227,16 @@
                       </property>
                       <widget class="QWidget" name="plan_buttons_page1">
                        <layout class="QHBoxLayout" name="horizontalLayout_9">
-                        <property name="margin">
+                        <property name="leftMargin">
+                         <number>0</number>
+                        </property>
+                        <property name="topMargin">
+                         <number>0</number>
+                        </property>
+                        <property name="rightMargin">
+                         <number>0</number>
+                        </property>
+                        <property name="bottomMargin">
                          <number>0</number>
                         </property>
                         <item>
@@ -3127,7 +3324,16 @@
                         <property name="spacing">
                          <number>12</number>
                         </property>
-                        <property name="margin">
+                        <property name="leftMargin">
+                         <number>0</number>
+                        </property>
+                        <property name="topMargin">
+                         <number>0</number>
+                        </property>
+                        <property name="rightMargin">
+                         <number>0</number>
+                        </property>
+                        <property name="bottomMargin">
                          <number>0</number>
                         </property>
                         <item>
@@ -3167,8 +3373,8 @@
                      <rect>
                       <x>0</x>
                       <y>0</y>
-                      <width>559</width>
-                      <height>377</height>
+                      <width>98</width>
+                      <height>200</height>
                      </rect>
                     </property>
                     <layout class="QHBoxLayout" name="horizontalLayout_19"/>
@@ -3197,8 +3403,8 @@
                      <rect>
                       <x>0</x>
                       <y>0</y>
-                      <width>198</width>
-                      <height>377</height>
+                      <width>161</width>
+                      <height>192</height>
                      </rect>
                     </property>
                     <layout class="QVBoxLayout" name="verticalLayout_9">
@@ -3304,7 +3510,16 @@ Note - this will not remove items which are currently there. </string>
                  <property name="spacing">
                   <number>0</number>
                  </property>
-                 <property name="margin">
+                 <property name="leftMargin">
+                  <number>0</number>
+                 </property>
+                 <property name="topMargin">
+                  <number>0</number>
+                 </property>
+                 <property name="rightMargin">
+                  <number>0</number>
+                 </property>
+                 <property name="bottomMargin">
                   <number>0</number>
                  </property>
                  <item>
@@ -3317,8 +3532,8 @@ Note - this will not remove items which are currently there. </string>
                      <rect>
                       <x>0</x>
                       <y>0</y>
-                      <width>783</width>
-                      <height>395</height>
+                      <width>98</width>
+                      <height>28</height>
                      </rect>
                     </property>
                    </widget>
@@ -3334,7 +3549,16 @@ Note - this will not remove items which are currently there. </string>
                  <property name="spacing">
                   <number>3</number>
                  </property>
-                 <property name="margin">
+                 <property name="leftMargin">
+                  <number>3</number>
+                 </property>
+                 <property name="topMargin">
+                  <number>3</number>
+                 </property>
+                 <property name="rightMargin">
+                  <number>3</number>
+                 </property>
+                 <property name="bottomMargin">
                   <number>3</number>
                  </property>
                  <item>
@@ -3358,7 +3582,16 @@ Note - this will not remove items which are currently there. </string>
                     <property name="spacing">
                      <number>3</number>
                     </property>
-                    <property name="margin">
+                    <property name="leftMargin">
+                     <number>3</number>
+                    </property>
+                    <property name="topMargin">
+                     <number>3</number>
+                    </property>
+                    <property name="rightMargin">
+                     <number>3</number>
+                    </property>
+                    <property name="bottomMargin">
                      <number>3</number>
                     </property>
                     <item>
@@ -3549,7 +3782,16 @@ If the "changes only" checkbox is checked, only data which has been ch
                 <enum>QFrame::Raised</enum>
                </property>
                <layout class="QGridLayout" name="gridLayout_7">
-                <property name="margin">
+                <property name="leftMargin">
+                 <number>0</number>
+                </property>
+                <property name="topMargin">
+                 <number>0</number>
+                </property>
+                <property name="rightMargin">
+                 <number>0</number>
+                </property>
+                <property name="bottomMargin">
                  <number>0</number>
                 </property>
                 <property name="spacing">
@@ -3594,14 +3836,23 @@ If the "changes only" checkbox is checked, only data which has been ch
                      <x>0</x>
                      <y>0</y>
                      <width>118</width>
-                     <height>130</height>
+                     <height>123</height>
                     </rect>
                    </property>
                    <layout class="QVBoxLayout" name="verticalLayout_20">
                     <property name="spacing">
                      <number>0</number>
                     </property>
-                    <property name="margin">
+                    <property name="leftMargin">
+                     <number>0</number>
+                    </property>
+                    <property name="topMargin">
+                     <number>0</number>
+                    </property>
+                    <property name="rightMargin">
+                     <number>0</number>
+                    </property>
+                    <property name="bottomMargin">
                      <number>0</number>
                     </property>
                     <item>
@@ -3786,7 +4037,16 @@ If the "changes only" checkbox is checked, only data which has been ch
             <property name="spacing">
              <number>0</number>
             </property>
-            <property name="margin">
+            <property name="leftMargin">
+             <number>0</number>
+            </property>
+            <property name="topMargin">
+             <number>0</number>
+            </property>
+            <property name="rightMargin">
+             <number>0</number>
+            </property>
+            <property name="bottomMargin">
              <number>0</number>
             </property>
            </layout>
@@ -3975,7 +4235,16 @@ If the "changes only" checkbox is checked, only data which has been ch
             <string>Daybook</string>
            </attribute>
            <layout class="QVBoxLayout" name="verticalLayout_5">
-            <property name="margin">
+            <property name="leftMargin">
+             <number>3</number>
+            </property>
+            <property name="topMargin">
+             <number>3</number>
+            </property>
+            <property name="rightMargin">
+             <number>3</number>
+            </property>
+            <property name="bottomMargin">
              <number>3</number>
             </property>
             <item>
@@ -4145,7 +4414,16 @@ If the "changes only" checkbox is checked, only data which has been ch
                  <enum>QFrame::Raised</enum>
                 </property>
                 <layout class="QGridLayout" name="gridLayout_18">
-                 <property name="margin">
+                 <property name="leftMargin">
+                  <number>0</number>
+                 </property>
+                 <property name="topMargin">
+                  <number>0</number>
+                 </property>
+                 <property name="rightMargin">
+                  <number>0</number>
+                 </property>
+                 <property name="bottomMargin">
                   <number>0</number>
                  </property>
                  <property name="spacing">
@@ -4171,8 +4449,7 @@ If the "changes only" checkbox is checked, only data which has been ch
                    </property>
                    <property name="icon">
                     <iconset theme="help">
-                     <normaloff/>
-                    </iconset>
+                     <normaloff>.</normaloff>.</iconset>
                    </property>
                   </widget>
                  </item>
@@ -4400,7 +4677,16 @@ If the "changes only" checkbox is checked, only data which has been ch
             <string>Feescales</string>
            </attribute>
            <layout class="QHBoxLayout" name="horizontalLayout_16">
-            <property name="margin">
+            <property name="leftMargin">
+             <number>3</number>
+            </property>
+            <property name="topMargin">
+             <number>3</number>
+            </property>
+            <property name="rightMargin">
+             <number>3</number>
+            </property>
+            <property name="bottomMargin">
              <number>3</number>
             </property>
             <item>
@@ -4445,7 +4731,16 @@ If the "changes only" checkbox is checked, only data which has been ch
                <property name="spacing">
                 <number>3</number>
                </property>
-               <property name="margin">
+               <property name="leftMargin">
+                <number>3</number>
+               </property>
+               <property name="topMargin">
+                <number>3</number>
+               </property>
+               <property name="rightMargin">
+                <number>3</number>
+               </property>
+               <property name="bottomMargin">
                 <number>3</number>
                </property>
                <item>
@@ -4650,7 +4945,16 @@ If the "changes only" checkbox is checked, only data which has been ch
                   <property name="spacing">
                    <number>3</number>
                   </property>
-                  <property name="margin">
+                  <property name="leftMargin">
+                   <number>3</number>
+                  </property>
+                  <property name="topMargin">
+                   <number>3</number>
+                  </property>
+                  <property name="rightMargin">
+                   <number>3</number>
+                  </property>
+                  <property name="bottomMargin">
                    <number>3</number>
                   </property>
                   <item>
@@ -4701,7 +5005,16 @@ If the "changes only" checkbox is checked, only data which has been ch
                   <bool>false</bool>
                  </property>
                  <layout class="QVBoxLayout" name="verticalLayout_14">
-                  <property name="margin">
+                  <property name="leftMargin">
+                   <number>3</number>
+                  </property>
+                  <property name="topMargin">
+                   <number>3</number>
+                  </property>
+                  <property name="rightMargin">
+                   <number>3</number>
+                  </property>
+                  <property name="bottomMargin">
                    <number>3</number>
                   </property>
                   <item>
@@ -4731,7 +5044,16 @@ If the "changes only" checkbox is checked, only data which has been ch
             <string>FORUM</string>
            </attribute>
            <layout class="QHBoxLayout" name="horizontalLayout_20">
-            <property name="margin">
+            <property name="leftMargin">
+             <number>3</number>
+            </property>
+            <property name="topMargin">
+             <number>3</number>
+            </property>
+            <property name="rightMargin">
+             <number>3</number>
+            </property>
+            <property name="bottomMargin">
              <number>3</number>
             </property>
             <item>
@@ -4757,12 +5079,21 @@ If the "changes only" checkbox is checked, only data which has been ch
             <string>Wiki</string>
            </attribute>
            <layout class="QHBoxLayout" name="horizontalLayout_33">
-            <property name="margin">
+            <property name="leftMargin">
+             <number>3</number>
+            </property>
+            <property name="topMargin">
+             <number>3</number>
+            </property>
+            <property name="rightMargin">
+             <number>3</number>
+            </property>
+            <property name="bottomMargin">
              <number>3</number>
             </property>
             <item>
-             <widget class="QWebView" name="wiki_webView" native="true">
-              <property name="url" stdset="0">
+             <widget class="QWebView" name="wiki_webView">
+              <property name="url">
                <url>
                 <string>about:blank</string>
                </url>
@@ -4785,7 +5116,7 @@ If the "changes only" checkbox is checked, only data which has been ch
      <x>0</x>
      <y>0</y>
      <width>991</width>
-     <height>21</height>
+     <height>18</height>
     </rect>
    </property>
    <widget class="QMenu" name="menuMenu">
@@ -4873,6 +5204,13 @@ If the "changes only" checkbox is checked, only data which has been ch
      <addaction name="actionEdit_Estimates"/>
      <addaction name="actionAllow_Edit_Treatment"/>
     </widget>
+    <widget class="QMenu" name="menuPrompting_Preferences">
+     <property name="title">
+      <string>Prompting Preferences</string>
+     </property>
+     <addaction name="actionCheck_Recall_Date_on_Exit_Record"/>
+     <addaction name="actionWatch_for_external_record_prompt"/>
+    </widget>
     <addaction name="actionChange_Language"/>
     <addaction name="separator"/>
     <addaction name="menuView"/>
@@ -4883,6 +5221,7 @@ If the "changes only" checkbox is checked, only data which has been ch
     <addaction name="menuDaybook"/>
     <addaction name="menu_History"/>
     <addaction name="menuPrinting"/>
+    <addaction name="menuPrompting_Preferences"/>
     <addaction name="separator"/>
     <addaction name="menuMode"/>
    </widget>
@@ -5181,12 +5520,34 @@ If the "changes only" checkbox is checked, only data which has been ch
     <string>Clear All Patient Locations</string>
    </property>
   </action>
+  <action name="actionCheck_Recall_Date_on_Exit_Record">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Check Recall Date on Exit Record</string>
+   </property>
+  </action>
+  <action name="actionWatch_for_external_record_prompt">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Watch for external record prompt</string>
+   </property>
+  </action>
  </widget>
  <customwidgets>
   <customwidget>
    <class>QWebView</class>
    <extends>QWidget</extends>
-   <header>QtWebKit/QWebView</header>
+   <header>QtWebKitWidgets/QWebView</header>
   </customwidget>
  </customwidgets>
  <tabstops>


=====================================
src/openmolar/qt4gui/customwidgets/notification_widget.py
=====================================
@@ -21,9 +21,14 @@
 # #                                                                         # #
 # ########################################################################### #
 
+import logging
+import re
+
 from PyQt5 import QtCore
 from PyQt5 import QtWidgets
 
+LOGGER = logging.getLogger("openmolar")
+
 STYLE = 'color:red; background:yellow; font-weight:bold;'
 
 class NotificationLabel(QtWidgets.QWidget):
@@ -60,16 +65,38 @@ class NotificationWidget(QtWidgets.QTabWidget):
         self.tabBar().tabBarClicked.connect(self.removeMessage)
         self.hide()
 
+    def remove_forum_messages(self, user):
+        LOGGER.debug("remove_forum_messages %s", user)
+        n_tabs = self.count()
+        try:
+            for i in range(n_tabs):
+                widg = self.widget(i)
+                if re.match("%s %s" % (user, _("has unread posts")),
+                            widg.message):
+                    self.removeTab(i)
+                    widg.deleteLater()
+        except AttributeError:  # currentWidget may be None
+            LOGGER.info("ignoring remove message")
+        if self.count() == 0:
+            self.hide()
+
     def addMessage(self, message):
         '''
         pass a message
         '''
+        LOGGER.debug("addMessage %s", message)
+        m = re.match("(.*) %s" % _("has unread posts"), message)
+        if m:
+            self.remove_forum_messages(m.groups()[0])
 
         n_tabs = self.count()-1
         for i in range(n_tabs):
-            if message == self.widget(i).message:
-                self.tabBar().moveTab(i, n_tabs)
-                break
+            try:
+                if message == self.widget(i).message:
+                    self.tabBar().moveTab(i, n_tabs)
+                    break
+            except AttributeError:  # currentWidget may be None
+                pass
         self.enable_buts()
         try:
             if message == self.currentWidget().message:
@@ -103,6 +130,8 @@ class NotificationWidget(QtWidgets.QTabWidget):
 
 if __name__ == "__main__":
     from functools import partial
+    from gettext import gettext as _
+    LOGGER.setLevel(logging.DEBUG)
 
     app = QtWidgets.QApplication([])
     form = QtWidgets.QMainWindow()
@@ -110,10 +139,10 @@ if __name__ == "__main__":
 
     nw = NotificationWidget(form)
 
-    for i, n in enumerate([1,2,3,3,3,1,1,5]):
+    for i, n in enumerate([1, 2, 3, 3, 3, 1, 1, 5]):
         QtCore.QTimer.singleShot(
-            i * 1500,
-            partial(nw.addMessage, "This is test message %d" % n))
+            i * 2500,
+            partial(nw.addMessage, "NW has unread posts (%d)" % n))
 
     form.setCentralWidget(nw)
     form.show()


=====================================
src/openmolar/qt4gui/customwidgets/om_webview.py
=====================================
@@ -0,0 +1,113 @@
+#! /usr/bin/python
+
+# ########################################################################### #
+# #                                                                         # #
+# # Copyright (c) 2009-2016 Neil Wallace <neil at openmolar.com>               # #
+# #                                                                         # #
+# # This file is part of OpenMolar.                                         # #
+# #                                                                         # #
+# # OpenMolar is free software: you can redistribute it and/or modify       # #
+# # it under the terms of the GNU General Public License as published by    # #
+# # the Free Software Foundation, either version 3 of the License, or       # #
+# # (at your option) any later version.                                     # #
+# #                                                                         # #
+# # OpenMolar is distributed in the hope that it will be useful,            # #
+# # but WITHOUT ANY WARRANTY; without even the implied warranty of          # #
+# # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           # #
+# # GNU General Public License for more details.                            # #
+# #                                                                         # #
+# # You should have received a copy of the GNU General Public License       # #
+# # along with OpenMolar.  If not, see <http://www.gnu.org/licenses/>.      # #
+# #                                                                         # #
+# ########################################################################### #
+
+
+import logging
+
+from PyQt5 import QtCore
+
+LOGGER = logging.getLogger("openmolar")
+
+
+try:
+    from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEnginePage
+    LOGGER.info("Using QtWebEngineWidgets.QWebEngineView for QWebView")
+
+    class OMWebPage(QWebEnginePage):
+        delegate_links = False
+
+        def __init__(self, parent=None):
+            print("initiated OMWebPage")
+            super().__init__(parent)
+
+        def acceptNavigationRequest(self, url, type_, bool_):
+            if self.delegate_links and \
+                    type_ == self.NavigationTypeLinkClicked and \
+                    url.url().startswith("om://"):
+                LOGGER.debug("acceptNavigationRequest %s", url)
+                self.parent().linkClicked.emit(url)
+                return False
+            return QWebEnginePage.acceptNavigationRequest(
+                self, url, type_, bool_)
+
+    class OMWebView(QWebEngineView):
+        '''
+        A wrapper for QtWebEngineWidgets.QWebEngineView
+        to emulate functions of QtWebKitWidgets.QWebView
+        '''
+        linkClicked = QtCore.pyqtSignal(object)
+        def __init__(self, parent=None):
+            super().__init__(parent)
+            self.om_web_page = OMWebPage(self)
+            self.setPage(self.om_web_page)
+
+        def scroll_to_bottom(self):
+            '''
+            Scroll the page contents down to the bottom.
+            if this is called before the page is loaded, it won't work.
+            '''
+            self.om_web_page.loadFinished.connect(self._scroll)
+
+        def _scroll(self):
+            LOGGER.debug("scrolling webpage")
+            self.om_web_page.runJavaScript(
+                    "window.scrollTo(0,document.body.scrollHeight);")
+
+        def delegate_links(self):
+            self.om_web_page.delegate_links=True
+
+
+except ImportError:
+    # QtWebKitWidgets is deprecated in Qt5.6
+    LOGGER.info("Using QtWebKitWidgets for QWebView")
+    from PyQt5.QtWebKitWidgets import QWebView
+
+    class OMWebView(QWebView):
+        def __init__(self, parent=None):
+            super().__init__(parent)
+
+        def scroll_to_bottom(self):
+            wf = self.page().mainFrame()
+            orientation = QtCore.Qt.Vertical
+            wf.setScrollBarValue(orientation,
+                                 wf.scrollBarMaximum(orientation))
+
+        def delegate_links(self):
+            page = self.page()
+            page.setLinkDelegationPolicy(page.DelegateAllLinks)
+
+
+if __name__ == "__main__":
+    LOGGER.setLevel(logging.DEBUG)
+    from PyQt5 import QtWidgets
+    app = QtWidgets.QApplication([])
+    wv = OMWebView()
+    wv.show()
+    html = ("<html><body>%s<hr />"
+            "<a href='om://clickhere'>click here</a></body></html>" %
+            "<br />".join(["line %d" % i for i in range(200)]))
+    wv.setHtml(html)
+    wv.scroll_to_bottom()
+    wv.delegate_links()
+    wv.linkClicked.connect(print)
+    app.exec_()


=====================================
src/openmolar/qt4gui/customwidgets/schedule_control.py
=====================================
@@ -30,8 +30,8 @@ import logging
 
 from PyQt5 import QtCore
 from PyQt5 import QtGui
-from PyQt5 import QtWebKitWidgets
 from PyQt5 import QtWidgets
+from openmolar.qt4gui.customwidgets.om_webview import OMWebView
 
 from openmolar.settings import localsettings
 from openmolar.dbtools.brief_patient import BriefPatient
@@ -176,7 +176,7 @@ class DiaryScheduleController(QtWidgets.QStackedWidget):
             QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                               QtWidgets.QSizePolicy.Minimum))
 
-        self.search_criteria_webview = QtWebKitWidgets.QWebView(self)
+        self.search_criteria_webview = OMWebView(self)
         self.search_criteria_webview.setMinimumHeight(100)
         self.search_criteria_webview.setHtml(
             _("No appointment selected for scheduling"))
@@ -184,7 +184,7 @@ class DiaryScheduleController(QtWidgets.QStackedWidget):
         # now arrange the stacked widget
 
         # page 0 - Browsing mode
-        self.browsing_webview = QtWebKitWidgets.QWebView(self)
+        self.browsing_webview = OMWebView(self)
         self.reset_browsing_webview()
         self.addWidget(self.browsing_webview)
 


=====================================
src/openmolar/qt4gui/dialogs/advanced_names_dialog.py
=====================================
@@ -23,19 +23,19 @@
 
 import logging
 import re
+LOGGER = logging.getLogger("openmolar")
 
 from PyQt5 import QtCore
 from PyQt5 import QtWidgets
-from PyQt5 import QtWebKitWidgets
 
 from openmolar.connect import connect
 
+from openmolar.qt4gui.customwidgets.om_webview import OMWebView
 from openmolar.qt4gui.customwidgets.warning_label import WarningLabel
 from openmolar.qt4gui.customwidgets.upper_case_line_edit \
     import UpperCaseLineEdit
 from openmolar.qt4gui.dialogs.base_dialogs import BaseDialog
 
-LOGGER = logging.getLogger("openmolar")
 
 PSEUDONYMS_QUERY = '''SELECT ix, alt_fname, alt_sname, comment, search_include
 FROM pseudonyms WHERE serialno=%s'''
@@ -65,7 +65,7 @@ HTML = '''
 
 LINK = '''
 %s %s
-<a href='edit_name_%s'>
+<a href='om://edit_name_%s'>
 <img src='qrc:/icons/pencil.png' height='25' width='25'/>
 </a>
 %s%s'''
@@ -125,7 +125,7 @@ class AdvancedNamesDialog(BaseDialog):
         label = WarningLabel(_("Previous Surnames, Nicknames, and alternate "
             "spelling can help when searching for patients"))
 
-        self.browser = QtWebKitWidgets.QWebView(self)
+        self.browser = OMWebView(self)
         self.browser.linkClicked.connect(self.link_clicked)
 
         self.insertWidget(label)
@@ -136,12 +136,12 @@ class AdvancedNamesDialog(BaseDialog):
 
     def link_clicked(self, url):
         url_text = url.toString()
-        if url_text == "add_psn":
+        if url_text == "om://add_psn":
             self.add_previous_surname()
-        elif url_text == "add_alt":
+        elif url_text == "om://add_alt":
             self.add_alt_name()
         else:
-            m = re.match(r"edit_name_(\d+)", url_text)
+            m = re.match(r"om://edit_name_(\d+)", url_text)
             if m:
                 ix = int(m.groups()[0])
                 self.edit_name(ix)
@@ -209,7 +209,7 @@ class AdvancedNamesDialog(BaseDialog):
             if sname == "" and fname =="":
                 cursor.execute(DELETE_QUERY, (ix,))
             else:
-                cursor.execute(UPDATE_QUERY, (None if not fname else fname,
+                cursor.execute(UPDATE_ALT_QUERY, (None if not fname else fname,
                                               None if not sname else sname,
                                               comment, ix))
             cursor.close()
@@ -231,13 +231,12 @@ class AdvancedNamesDialog(BaseDialog):
 
         previous = '</li><li>'.join(
             [p.html() for p in alts if p.comment=="previous surname"] +
-            ['<a href="add_psn">%s</a>' % _("Add New")])
+            ['<a href="om://add_psn">%s</a>' % _("Add New")])
         alts = '</li><li>'.join(
             [p.html() for p in alts if p.comment!="previous surname"] +
-            ['<a href="add_alt">%s</a>' % _("Add New")])
+            ['<a href="om://add_alt">%s</a>' % _("Add New")])
         self.browser.setHtml(HTML % (self.fname, self.sname, previous, alts))
-        page = self.browser.page()
-        page.setLinkDelegationPolicy(page.DelegateAllLinks)
+        self.browser.delegate_links()
 
     @property
     def sname(self):


=====================================
src/openmolar/qt4gui/dialogs/child_smile_dialog.py
=====================================
@@ -119,7 +119,7 @@ class ChildSmileDialog(BaseDialog):
 
     @property
     def valid_postcode(self):
-        return bool(re.match("[A-Z][A-Z](\d+) (\d+)[A-Z][A-Z]", self.pcde))
+        return bool(re.match(r"[A-Z][A-Z]?(\d+) (\d+)[A-Z][A-Z]", self.pcde))
 
     def postcode_warning(self):
         if not self.valid_postcode:


=====================================
src/openmolar/qt4gui/dialogs/print_record_dialog.py
=====================================
@@ -23,10 +23,10 @@
 
 
 from PyQt5 import QtCore
-from PyQt5 import QtPrintSupport
-from PyQt5 import QtWebKitWidgets
 from PyQt5 import QtWidgets
+from PyQt5 import QtPrintSupport
 
+from openmolar.qt4gui.customwidgets.om_webview import OMWebView
 from openmolar.ptModules import formatted_notes
 from openmolar.ptModules import patientDetails
 from openmolar.qt4gui.dialogs.base_dialogs import BaseDialog
@@ -44,7 +44,7 @@ class PrintRecordDialog(BaseDialog):
 
         patient_label.setAlignment(QtCore.Qt.AlignCenter)
 
-        self.web_view = QtWebKitWidgets.QWebView(self)
+        self.web_view = OMWebView(self)
         self.web_view.loadStarted.connect(self.print_start)
         self.web_view.loadFinished.connect(self.print_load_result)
 


=====================================
src/openmolar/qt4gui/diary_widget.py
=====================================
@@ -26,6 +26,7 @@ diary_widget.py provides the DiaryWidget class for openmolar.
 '''
 
 import datetime
+import gettext
 import logging
 import time
 
@@ -42,7 +43,6 @@ from openmolar.ptModules import formatted_notes
 
 from openmolar.qt4gui.dialogs import alterAday
 from openmolar.qt4gui.dialogs import finalise_appt_time
-from openmolar.qt4gui.dialogs import permissions
 from openmolar.qt4gui.dialogs.choose_clinicians import ChooseCliniciansDialog
 from openmolar.qt4gui.dialogs.find_patient_dialog import FinalChoiceDialog
 from openmolar.qt4gui.dialogs.appointments_insert_blocks_dialog \
@@ -97,6 +97,7 @@ class DiaryWidget(Advisor):
 
     message_alert = None
     laid_out = False
+    current_weekViewClinicians = set()
 
     def __init__(self, parent=None):
         Advisor.__init__(self, parent)
@@ -144,8 +145,7 @@ class DiaryWidget(Advisor):
                      self.ui.day4_frame,
                      self.ui.day5_frame,
                      self.ui.day6_frame,
-                     self.ui.day7_frame
-                     ):
+                     self.ui.day7_frame):
             hlayout = QtWidgets.QHBoxLayout(widg)
             hlayout.setContentsMargins(0, 0, 0, 0)
             control = aptOVcontrol.control()
@@ -342,8 +342,8 @@ class DiaryWidget(Advisor):
         '''
         radiobutton toggling who's book to show on the appointment
         '''
-        self.dl = ChooseCliniciansDialog(self.monthClinicianSelector, self)
-        self.dl.exec_()
+        dl = ChooseCliniciansDialog(self.monthClinicianSelector, self)
+        dl.exec_()
         val = self.monthClinicianSelector.allChecked()
         self.ui.monthClinicians_checkBox.setChecked(val)
         self.ui.yearClinicians_checkBox.setChecked(val)
@@ -497,14 +497,14 @@ class DiaryWidget(Advisor):
 
             # - make appointment
             if appointments.make_appt(
-                slot.date(), selectedDent, selectedtime, endtime,
-                appt.name[:30], appt.serialno, appt.trt1,
+                    slot.date(), selectedDent, selectedtime, endtime,
+                    appt.name[:30], appt.serialno, appt.trt1,
                     appt.trt2, appt.trt3, appt.memo, appt.flag, cst, 0, 0):
                 LOGGER.info("Appointment made in aslot")
 
                 if appt.serialno != 0:
                     if not appointments.pt_appt_made(
-                        appt.serialno, appt.aprix, slot.date(),
+                            appt.serialno, appt.aprix, slot.date(),
                             selectedtime, selectedDent):
                         self.advise(
                             _("Error putting appointment back "
@@ -1072,7 +1072,7 @@ class DiaryWidget(Advisor):
         if triggered and chosen_slot:
             sync_date = QtCore.QDate(chosen_slot.date())
 
-            LOGGER.debug("chosen_slot changed %s" % chosen_slot)
+            LOGGER.debug("chosen_slot changed %s", chosen_slot)
             self.signals_calendar(False)
             self.ui.weekCalendar.setSelectedDate(sync_date)
             self.set_date(sync_date)
@@ -1272,7 +1272,7 @@ class DiaryWidget(Advisor):
             self.selected_date().toPyDate(),
             droptime)
 
-        LOGGER.debug("appt dropped %s %s %s" % (date_time, dent, appt.length))
+        LOGGER.debug("appt dropped %s %s %s", date_time, dent, appt.length)
         slot = appointments.FreeSlot(date_time, dent, appt.length)
         self.makeAppt(appt, slot)
 
@@ -1288,7 +1288,7 @@ class DiaryWidget(Advisor):
         self.begin_makeAppt(custom)
 
     def find_appt(self, appt):
-        LOGGER.debug("DiaryWidgetfind_appt %s" % appt)
+        LOGGER.debug("DiaryWidgetfind_appt %s", appt)
         pt = BriefPatient(appt.serialno)
         self.load_patient(pt)
         self.set_appt_mode(self.VIEW_MODE)
@@ -1451,8 +1451,7 @@ class DiaryWidget(Advisor):
     def show_todays_notes(self, serialno):
         html = formatted_notes.todays_notes(serialno)
         self.ui.appt_notes_webView.setHtml(html)
-        page = self.ui.appt_notes_webView.page()
-        page.setLinkDelegationPolicy(page.DelegateAllLinks)
+        self.ui.appt_notes_webView.delegate_links()
 
     def connect_tabwidget(self, connect=True):
         if connect:
@@ -1591,13 +1590,12 @@ class _testDiary(QtWidgets.QMainWindow):
 
 if __name__ == "__main__":
     LOGGER.setLevel(logging.DEBUG)
-    import gettext
     gettext.install("openmolar")
 
     localsettings.initiate()
 
-    app = QtWidgets.QApplication([])
+    q_app = QtWidgets.QApplication([])
     mw = _testDiary()
     mw.show()
 
-    app.exec_()
+    q_app.exec_()


=====================================
src/openmolar/qt4gui/fees/course_module.py
=====================================
@@ -168,17 +168,21 @@ def recall_check(om_gui):
     if (om_gui.pt.appt_prefs.recdent_period and
             om_gui.pt.recd > localsettings.currentDay()):
         return True
-    dl = RecallPromptDialog(om_gui.pt, om_gui)
-    if dl.exec_():
-        if dl.result == dl.IGNORE:
-            return True
-        else:
-            dl2 = ApptPrefsDialog(om_gui.pt, om_gui)
-            if dl2.exec_():
-                om_gui.pt.appt_prefs.commit_changes()
-                om_gui.updateDetails()
-                om_gui.advise(_("Appointment Preferences Applied"))
+    if not om_gui.ui.actionCheck_Recall_Date_on_Exit_Record.isChecked():
+        om_gui.advise(_("ignoring recall date as per preferences"))
+        return True
+    else:
+        dl = RecallPromptDialog(om_gui.pt, om_gui)
+        if dl.exec_():
+            if dl.result == dl.IGNORE:
                 return True
+            else:
+                dl2 = ApptPrefsDialog(om_gui.pt, om_gui)
+                if dl2.exec_():
+                    om_gui.pt.appt_prefs.commit_changes()
+                    om_gui.updateDetails()
+                    om_gui.advise(_("Appointment Preferences Applied"))
+                    return True
     return False
 
 


=====================================
src/openmolar/qt4gui/forum_widget.py
=====================================
@@ -335,6 +335,8 @@ class ForumWidget(QtWidgets.QWidget):
             if n:
                 self.unread_posts_signal.emit(
                     "%s %s (%s)" % (user, _("has unread posts"), n))
+            else:
+                self.unread_posts_signal.emit("CLEAR USER %s" % user)
         if total_unread:
             self.new_posts_signal.emit()
 


=====================================
src/openmolar/qt4gui/maingui.py
=====================================
@@ -229,6 +229,8 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
         self.ui.bulk_mailings_treeView.setModel(self.letters.bulk_model)
         self.ui.actionSurgery_Mode.setChecked(
             localsettings.station == "surgery")
+        self.record_prompt_file_watcher = QtCore.QFileSystemWatcher([
+            localsettings.RECORD_PROMPT_FILE])
         self.setupSignals()
         self.feestableLoaded = False
         self.ui.new_patient_frame.hide()
@@ -280,7 +282,8 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
         self.load_pt_statuses()
         self.loadDentistComboboxes()
         self.ui.notesSummary_webView.setHtml(localsettings.message)
-
+        self.ui.actionCheck_Recall_Date_on_Exit_Record.setChecked(
+            localsettings.CHECK_RECALL_ON_EXIT_RECORD)
         QtCore.QTimer.singleShot(500, self.load_todays_patients_combobox)
         QtCore.QTimer.singleShot(1000, self.load_fee_tables)
         self.records_in_use_timer.start(5000)  # fire every 5 seconds
@@ -289,6 +292,8 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
         self.diary_widget.initiate()
         QtCore.QTimer.singleShot(12000, self.check_version)
         self.forum_widget.log_in_successful()
+        self.record_prompt_file_watcher.fileChanged.connect(
+            self.check_for_external_record_prompt)
 
     def check_first_run(self):
         '''
@@ -460,8 +465,12 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
         '''
         pop up a notification
         '''
-        self.advise(message)
-        self.ui.notificationWidget.addMessage(message)
+        m = re.match("CLEAR USER (.*)", message)
+        if m:
+            self.ui.notificationWidget.remove_forum_messages(m.groups()[0])
+        else:
+            self.advise(message)
+            self.ui.notificationWidget.addMessage(message)
 
     def quit(self):
         '''
@@ -777,6 +786,8 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
             if self.pt.serialno != 0:
                 self.ui.chooseFeescale_comboBox.setCurrentIndex(
                     self.pt.fee_table.index)
+        if ci == 0:
+            self.forum_widget.check_for_new_posts()
         if ci == 8:
             # - wiki
             if not self.wikiloaded:
@@ -926,9 +937,7 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
         scroll to the bottom
         '''
         wv = self.sender()
-        wf = wv.page().mainFrame()
-        orientation = QtCore.Qt.Vertical
-        wf.setScrollBarValue(orientation, wf.scrollBarMaximum(orientation))
+        wv.scroll_to_bottom()
 
     def load_newEstPage(self):
         '''
@@ -1292,7 +1301,8 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
     def getrecord(self,
                   serialno,
                   addToRecentSnos=True,
-                  newPatientReload=False):
+                  newPatientReload=False,
+                  autoload=False):
         '''
         a record has been called by one of several means
         '''
@@ -1340,8 +1350,14 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
 
         except localsettings.PatientNotFoundError:
             LOGGER.exception("Patient Not Found - %s", serialno)
-            self.advise(_("error getting serialno") + " %d - " % serialno +
-                        _("please check this number is correct?"), 1)
+            message = "%s %d <hr />%s" % (
+                _("error getting serialno"),
+                serialno, _("please check this number is correct?"))
+            if autoload:
+                self.home()
+                self.advise(message)
+            else:
+                self.advise(message, 1)
         except Exception as exc:
             LOGGER.exception("Unknown ERROR loading patient - serialno %s",
                              serialno)
@@ -1397,9 +1413,7 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
         self.set_note_preferences()
         note_html = formatted_notes.notes(self.pt.notes_dict)
         self.ui.notes_webView.setHtml(note_html)
-
-        page = self.ui.notes_webView.page()
-        page.setLinkDelegationPolicy(page.DelegateAllLinks)
+        self.ui.notes_webView.delegate_links()
         self.notes_loaded = True
 
     def load_receptionSummaryPage(self):
@@ -1481,8 +1495,7 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
             self.set_note_preferences()
             note_html = formatted_notes.summary_notes(self.pt.notes_dict)
             self.ui.notesSummary_webView.setHtml(note_html)
-            page = self.ui.notesSummary_webView.page()
-            page.setLinkDelegationPolicy(page.DelegateAllLinks)
+            self.ui.notesSummary_webView.delegate_links()
             self.summary_notes_loaded = True
 
     def loadpatient(self, newPatientReload=False):
@@ -2772,7 +2785,7 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
     def notes_link_clicked(self, url):
         LOGGER.debug("notes link clicked '%s'", url)
         url_text = url.toString()
-        m = re.match(r"edit_notes\?(\d+|__SNO__)", url_text)
+        m = re.match(r"om://edit_notes\?(\d+|__SNO__)", url_text)
         if m:
             if m.groups()[0] == "__SNO__":
                 serialno = self.pt.serialno
@@ -2987,6 +3000,8 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
         self.ui.actionEdit_Account_Letter_Settings.triggered.connect(
             self.edit_account_letter_settings)
         self.ui.actionClear_Locations.triggered.connect(self.clear_locations)
+        self.ui.actionCheck_Recall_Date_on_Exit_Record.triggered.connect(
+            self.save_prompting_prefs)
 
     def signals_estimates(self):
         # Estimates and Course Management
@@ -3474,7 +3489,7 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
         if dialog.exec_():
             localsettings.surgeryno = dl.comboBox.currentIndex()
             localsettings.updateLocalSettings(
-                "surgeryno", str(localsettings.surgeryno))
+                "surgeryno", localsettings.surgeryno)
             return True
         return False
 
@@ -3541,13 +3556,13 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
         this will catch "edit links"
         '''
         url = str(url.toString())
-        m1 = re.match(r"daybook_id\?(\d+)feesa=(\d+)feesb=(\d+)", url)
-        m2 = re.match(r"daybook_id_edit\?(\d+)", url)
-        m3 = re.match(r"edit_courseno\?(\d+)", url)
-        m4 = re.match(r"edit_estimate\?(\d+)", url)
-        m5 = re.match(r"merge_courses\?(\d+)\+(\d+)", url)
-        m6 = re.match(r"consistent_courseno\?(\d+)", url)
-        m7 = re.match(r"edit_tx_courseno\?(\d+)", url)
+        m1 = re.match(r"om://daybook_id\?(\d+)feesa=(\d+)feesb=(\d+)", url)
+        m2 = re.match(r"om://daybook_id_edit\?(\d+)", url)
+        m3 = re.match(r"om://edit_courseno\?(\d+)", url)
+        m4 = re.match(r"om://edit_estimate\?(\d+)", url)
+        m5 = re.match(r"om://merge_courses\?(\d+)\+(\d+)", url)
+        m6 = re.match(r"om://consistent_courseno\?(\d+)", url)
+        m7 = re.match(r"om://edit_tx_courseno\?(\d+)", url)
 
         if m1:
             id_ = int(m1.groups()[0])
@@ -3735,12 +3750,39 @@ class OpenmolarGui(QtWidgets.QMainWindow, Advisor):
             self.ui.set_location_button.setStyleSheet("")
         self.ui.statusbar.showMessage(message)
 
+    def check_for_external_record_prompt(self):
+        if self.ui.actionWatch_for_external_record_prompt.isChecked():
+            try:
+                with open(localsettings.RECORD_PROMPT_FILE, "r") as f:
+                    data = f.read()
+                    serialno = int(data)
+                    if serialno == -1:
+                        self.home()
+                    else:
+                        self.getrecord(serialno, autoload=True)
+            except:
+                LOGGER.exception(
+                    "unable to read %s", localsettings.RECORD_PROMPT_FILE)
+        else:
+            LOGGER.info("%s has changed, but user settings prevent record load",
+                localsettings.RECORD_PROMPT_FILE)
+
     def clear_locations(self):
         dl = ClearLocationsDialog(self)
         if dl.exec_():
             self.advise(_("All Patient Locations have been cleared"))
             self.diary_widget.layout_diary()
 
+    def save_prompting_prefs(self):
+        '''
+        write changes to localsettings.conf
+        '''
+        for key, value in (
+            ("recall_check_on_exit_record",
+             self.ui.actionCheck_Recall_Date_on_Exit_Record.isChecked()),
+        ):
+            localsettings.updateLocalSettings(key, value)
+
     def excepthook(self, exc_type, exc_val, tracebackobj):
         '''
         PyQt5 prints unhandled exceptions to stdout and carries on regardless


=====================================
src/openmolar/resources/resources.qrc
=====================================
@@ -1,5 +1,6 @@
 <RCC>
   <qresource>
+    <file>style.css</file>
     <file>icons/mail_new.png</file>
     <file>icons/schedule_active.png</file>
     <file>icons/pencil.png</file>
@@ -8,9 +9,6 @@
     <file>icons/wikipedia.png</file>
     <file>icons/action.png</file>
     <file>icons/memos.png</file>
-    <file alias="lower_implant.svg">icons/lower_implant.svg</file>
-    <file alias="upper_implant.svg">icons/upper_implant.svg</file>
-    <file alias="database.png">icons/database.png</file>
     <file>openmolar.svg</file>
     <file>appt_ov.png</file>
     <file>newlogo_launchpadSize.png</file>
@@ -19,6 +17,10 @@
     <file>icons/chain.png</file>
     <file>private.png</file>
     <file>nhs_scot.png</file>
+    <file alias="lower_implant.svg">icons/lower_implant.svg</file>
+    <file alias="upper_implant.svg">icons/upper_implant.svg</file>
+    <file alias="database.png">icons/database.png</file>
+    <file alias="med.png">icons/med.png</file>
     <file alias="first.png">icons/number1.png</file>
     <file alias="speaker.svg">icons/Speaker_Icon.svg</file>
     <file alias="logo.png">icons/logo.png</file>


=====================================
src/openmolar/resources/win_install_banner.bmp
=====================================
Binary files /dev/null and b/src/openmolar/resources/win_install_banner.bmp differ


=====================================
src/openmolar/resources/win_install_dialog.bmp
=====================================
Binary files /dev/null and b/src/openmolar/resources/win_install_dialog.bmp differ


=====================================
src/openmolar/settings/localsettings.py
=====================================
@@ -166,6 +166,7 @@ if not os.path.isdir(RESOURCE_DIR):
 LOGIN_CONF = os.path.join(LOCALFILEDIRECTORY, "autologin.conf")
 TEMP_PDF = os.path.join(LOCALFILEDIRECTORY, "temp.pdf")
 DOCS_DIRECTORY = os.path.join(LOCALFILEDIRECTORY, "documents")
+RECORD_PROMPT_FILE = os.path.join(LOCALFILEDIRECTORY, "autoload.txt")
 
 if not os.path.exists(DOCS_DIRECTORY):
     os.makedirs(DOCS_DIRECTORY)
@@ -179,11 +180,19 @@ if not os.path.isfile(appt_shortcut_file):
     except FileNotFoundError:
         LOGGER.exception("Your Resource files are incomplete!")
 
-stylesheet = "file://%s" % os.path.join(RESOURCE_DIR, "style.css")
-printer_png = "file://%s" % os.path.join(RESOURCE_DIR, "icons", "ps.png")
-medical_png = "file://%s" % os.path.join(RESOURCE_DIR, "icons", "med.png")
-money_png = "file://%s" % os.path.join(RESOURCE_DIR, "icons", "vcard.png")
-LOGOPATH = "file://%s" % os.path.join(RESOURCE_DIR, "newlogo.png")
+if not os.path.exists(RECORD_PROMPT_FILE):
+    try:
+        with open(RECORD_PROMPT_FILE, "w") as f:
+            f.write("0")
+    except:
+        LOGGER.exception("couldn't write %s", RECORD_PROMPT_FILE)
+
+stylesheet = "qrc:/style.css"
+printer_png = "qrc:/ps.png"
+medical_png = "qrc:/med.png"
+money_png = "qrc:/vcard.png"
+LOGOPATH = "qrc:/newlogo.png"
+
 resources_path = "file://%s" % RESOURCE_DIR
 
 
@@ -195,10 +204,6 @@ def win_url(url):
 
 if WINDOWS:
     resources_path = win_url(resources_path)
-    stylesheet = win_url(stylesheet)
-    printer_png = win_url(printer_png)
-    money_png = win_url(money_png)
-    LOGOPATH = win_url(LOGOPATH)
 
 # this is updated if correct password is given
 successful_login = False
@@ -380,6 +385,8 @@ defaultPrinterforGP17 = False
 # - users who shouldn't post to the forum
 disallowed_forum_posters = []
 
+CHECK_RECALL_ON_EXIT_RECORD = True
+
 class PatientNotFoundError(Exception):
     '''
     my own class of exception, for when a serialno is called
@@ -400,7 +407,7 @@ def pencify(input_):
     safely convert "0.29" to 29, or "1.50" to 150 etc..
     in python int(0.29 * 100) is 28!
     '''
-    m = re.match(" *(\d+)?\.?(\d)?(\d)?", input_)
+    m = re.match(r" *(\d+)?\.?(\d)?(\d)?", input_)
     if not m:
         return 0
     return int("%s%s%s" % (
@@ -806,7 +813,7 @@ def getLocalSettings():
     and "knows" it's surgery number etc...
     if one doesn't exist... knock one up.
     '''
-    global surgeryno, last_forumCheck
+    global surgeryno, CHECK_RECALL_ON_EXIT_RECORD
     if not os.path.exists(LOCALFILEDIRECTORY):
         os.mkdir(LOCALFILEDIRECTORY)
 
@@ -819,13 +826,11 @@ def getLocalSettings():
             LOGGER.debug("setting as surgery number %s" % surgeryno)
         else:
             LOGGER.debug("unknown surgery number")
+        node = dom.getElementsByTagName("recall_check_on_exit_record")
+        if node and node[0].hasChildNodes():
+            CHECK_RECALL_ON_EXIT_RECORD = \
+                node[0].firstChild.data.strip(" \n") == "True"
         dom.unlink()
-    else:
-        # - no file found..
-        # -so create a settings file.
-        f = open(localSets, "w")
-        f.write(LOCALSETTINGS_TEMPLATE)
-        f.close()
 
 
 def updateLocalSettings(setting, value):
@@ -834,19 +839,25 @@ def updateLocalSettings(setting, value):
     '''
     localSets = os.path.join(LOCALFILEDIRECTORY, "localsettings.conf")
     LOGGER.debug("updating local settings... %s = %s" % (setting, value))
-    dom = minidom.parse(localSets)
+    try:
+        dom = minidom.parse(localSets)
+    except FileNotFoundError:
+        dom = minidom.parseString(LOCALSETTINGS_TEMPLATE)
+
     nodes = dom.getElementsByTagName(setting)
     if len(nodes) == 0:
         new_node = dom.createElement(setting)
         dom.firstChild.appendChild(new_node)
-        text_node = dom.createTextNode(value)
+        text_node = dom.createTextNode(str(value))
         new_node.appendChild(text_node)
         dom.firstChild.appendChild(new_node)
     else:
-        nodes[0].firstChild.replaceWholeText(value)
-    f = open(localSets, "w")
-    f.write(dom.toxml())
-    f.close()
+        nodes[0].firstChild.replaceWholeText(str(value))
+    with open(localSets, "w") as f:
+        xml = dom.toprettyxml()
+        while re.search(r"\n(\s*)?\n", xml):
+            xml = re.sub(r"\n(\s*)?\n", "\n", xml)
+        f.write(xml)
     dom.unlink()
     return True
 


=====================================
src/openmolar/settings/version.py
=====================================
@@ -27,7 +27,7 @@ Do not edit this file manually, as it should be updated by make version
 when git tag is updated.
 '''
 
-VERSION = "1.0.15-gd81f9e5"
+VERSION = "1.1.6-g81838c85"
 
 
 if __name__ == '__main__':



View it on GitLab: https://salsa.debian.org/med-team/openmolar/commit/35083ea485d52b901472eed61a14f58acb8338ff

-- 
View it on GitLab: https://salsa.debian.org/med-team/openmolar/commit/35083ea485d52b901472eed61a14f58acb8338ff
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20181029/2cc74687/attachment-0001.html>


More information about the debian-med-commit mailing list