Skip to content

Commit

Permalink
Read credits from outside application
Browse files Browse the repository at this point in the history
  • Loading branch information
evoggy committed Aug 20, 2015
1 parent a32c0e0 commit afb5319
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 40 deletions.
6 changes: 2 additions & 4 deletions CREDITS.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
We are very grateful for all the contributions we have received for this project
and below is a list of users that have contributed to the crazyflie-pc-client.
We are very grateful for all the contributions we have received for this project and below is a list of users that have contributed to the crazyflie-pc-client.
Thanks!

Allyn Bauer
Expand Down Expand Up @@ -33,6 +32,5 @@ Tobias Antonsson
Tyler Anderson
Wolfgang Hoenig

This list of names have been automatically generated using the following command
in the crazyflie-pc-client repository:
This list of names have been automatically generated using the following command in the crazyflie-pc-client repository:
git shortlog -sn | cut -f2 | sort -f
46 changes: 10 additions & 36 deletions lib/cfclient/ui/dialogs/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,41 +91,6 @@
<a href="http://www.python.org/">Python</a><br>
"""

# This is temporary and will be fixed during the next release. It should
# be picked up from the CREDITS.txt file
CREDITS_NAMES = U"""
We are very grateful for all the contributions we have received for this project
and below is a list of users that have contributed to the crazyflie-pc-client.
Thanks! <br><br>
Allyn Bauer <br>
Anton Krasovsky <br>
Arnaud Taffanel <br>
Chadwick McHenry <br>
Daniel Lee <br>
David Benes <br>
Gina Häußge <br>
Jannis Redmann <br>
Marcus Eliasson <br>
Marlon Petry <br>
Mike Voytovich <br>
Philipp A. Mohrenweiser <br>
Surrender <br>
Thomas DE BONA <br>
Tobias Antonsson <br>
Tyler Anderson <br>
bitcraze <br>
cstanke <br>
danmark <br>
erget <br>
omwdunkley <br>
<br>
This list of names have been automatically generated using the following command
in the crazyflie-clients-python repository:<br>
git shortlog -s | cut -c8-
"""

class AboutDialog(QtGui.QWidget, about_widget_class):

_disconnected_signal = pyqtSignal(str)
Expand Down Expand Up @@ -159,8 +124,17 @@ def __init__(self, helper, *args):
self._disconnected_signal.connect(self._disconnected)
helper.cf.disconnected.add_callback(self._disconnected_signal.emit)

# Open the Credits file and show it in the UI
credits = U""
try:
with open("CREDITS.txt", 'r') as f:
for line in f:
credits += U"{}<br>".format(line.decode("UTF-8"))
except IOError:
credits = U""

self._credits.setHtml(
CREDITS_FORMAT.format(contribs=CREDITS_NAMES)
CREDITS_FORMAT.format(contribs=credits)
)

def showEvent(self, event):
Expand Down

0 comments on commit afb5319

Please sign in to comment.