<p>This branch was focused on encapsulation and code cleanup on the commotion client to prepare it for easy modification by later developers. </p>

<hr>

<h4>You can merge this Pull Request by running</h4>
<pre>  git pull https://github.com/opentechinstitute/commotion-client split_single_app</pre>
<p>Or view, comment on, or merge it at:</p>
<p>  <a href='https://github.com/opentechinstitute/commotion-client/pull/16'>https://github.com/opentechinstitute/commotion-client/pull/16</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Moved ui GUI objects into ui folder within GUI directory to remove clutter.c</li>
  <li>Created a restart window object to avoid a full close of the application when a restart closes all other windows.</li>
  <li>Made GUI module imports not attempt to import classes, and instead import the module and then call the classes as needed.</li>
  <li>Added a default exit_on_close value to avoid errors where it is checked before being called.</li>
  <li>added a generic thread class and extended it to allow for the application to keep its state during a restart and therefore not shutdown when all its windows are removed.</li>
  <li>removed the graphical restart window in favor of a simple thread.</li>
  <li>seperated the system tray and the main window in the commotion client</li>
  <li>seperated the system tray from the main window</li>
  <li>Changed old signal events to new style and moved them to application control functions.</li>
  <li>see: last commit but re: main application code</li>
  <li>added exceptions to system tray start and init functions</li>
  <li>removed empty extension file from last commit</li>
  <li>got system tray connected and working correctly with the main window</li>
  <li>split out the single applicaiton classes from the main commotion_client code file</li>
  <li>implemented a close function for the system tray to ensure that it is fully cleaned up for the restart.</li>
  <li>fixing whitespace</li>
  <li>Added an exit function and replaced all existing sys.exit functions with it.</li>
  <li>Replaced sys.exit in critical error functions with QApplication.exit which will pass the error message to sys.exit after its clean up anyway.</li>
  <li>Made ending the restart thread more indirect</li>
  <li>Made main window called more indirectly and gathered main window functions together in the application.</li>
  <li>organized the code to make it more readable</li>
  <li>added a clean up function to the main window to allow proper clean up without forcing other parts of the application to know how to do it properly for this object</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-0">commotion_client/GUI/crash_report.py</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-1">commotion_client/GUI/main_window.py</a>
    (57)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-2">commotion_client/GUI/system_tray.py</a>
    (37)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-3">commotion_client/GUI/ui/crash_report_window.ui</a>
    (0)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-4">commotion_client/assets/commotion_assets.qrc</a>
    (2)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-5">commotion_client/assets/images/loading62.gif</a>
    (0)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-6">commotion_client/commotion_client.py</a>
    (360)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-7">commotion_client/data/extensions/test_ext001.conf</a>
    (8)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-8">commotion_client/tests.py</a>
    (0)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-9">commotion_client/tests/__init__.py</a>
    (0)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-10">commotion_client/tests/extensions/__init__.py</a>
    (0)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-11">commotion_client/tests/extensions/test_ext001/mainWin.ui</a>
    (35)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-12">commotion_client/tests/extensions/test_ext001/myMain.py</a>
    (32)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-13">commotion_client/tests/extensions/test_ext001/warning001.ui</a>
    (84)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-14">commotion_client/tests/test_util_config.py</a>
    (40)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-15">commotion_client/utils/single_application.py</a>
    (113)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/commotion-client/pull/16/files#diff-16">commotion_client/utils/thread.py</a>
    (30)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/opentechinstitute/commotion-client/pull/16.patch'>https://github.com/opentechinstitute/commotion-client/pull/16.patch</a></li>
  <li><a href='https://github.com/opentechinstitute/commotion-client/pull/16.diff'>https://github.com/opentechinstitute/commotion-client/pull/16.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href='https://github.com/opentechinstitute/commotion-client/pull/16'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/3074564__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMDE4MDA2NSwiZGF0YSI6eyJpZCI6Mjc0NDcwMTB9fQ==--3f18a15b4177c0e76d6b5fc48417682e5d8dc265.gif' height='1' width='1'></p>