Skip to content

Commit

Permalink
Merge pull request bitcraze#478 from jonasdn/jonasdn/442
Browse files Browse the repository at this point in the history
Replace CREDITS.txt with link to GitHub insights
  • Loading branch information
jonasdn authored Mar 10, 2021
2 parents ad5e47b + f400d4c commit e4202ec
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 87 deletions.
56 changes: 0 additions & 56 deletions CREDITS.txt

This file was deleted.

30 changes: 0 additions & 30 deletions src/cfclient/ui/dialogs/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
The about dialog.
"""

import os
import sys

import cfclient
Expand Down Expand Up @@ -85,20 +84,6 @@
FIRMWARE_FORMAT = "{:x}{:x} ({})"
DECK_FORMAT = "{}: rev={}, adr={}<br>"

CREDITS_FORMAT = """
<b>Contributions</b><br>
{contribs}
<br><br>
<b>Used libraries</b><br>
<a href="http://qt-project.org/">QT</a><br>
<a href="http://www.riverbankcomputing.co.uk/software/pyqt/intro">PyQT</a><br>
<a href="http://pysdl2.readthedocs.org">PySDL2</a><br>
<a href="http://www.pyqtgraph.org/">PyQtGraph</a><br>
<a href="http://marble.kde.org/">KDE Marble</a><br>
<a href="http://sourceforge.net/projects/pyusb/">PyUSB</a><br>
<a href="http://www.python.org/">Python</a><br>
"""


class AboutDialog(QtWidgets.QWidget, about_widget_class):
_disconnected_signal = pyqtSignal(str)
Expand Down Expand Up @@ -138,21 +123,6 @@ def __init__(self, helper, *args):

self._cb_deck_data_updated_signal.connect(self._deck_data_updated)

# Open the Credits file and show it in the UI
credits = ""
src = os.path.dirname(cfclient.module_path)
path = os.path.join(os.path.dirname(src), 'CREDITS.txt')
try:
with open(path, encoding='utf-8') as f:
for line in f:
credits += "{}<br>".format(line)
except IOError:
credits = ""

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

def showEvent(self, event):
"""Event when the about box is shown"""
self._interface_text = ""
Expand Down
12 changes: 11 additions & 1 deletion src/cfclient/ui/dialogs/about.ui
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,20 @@
<item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QTextEdit" name="_credits">
<widget class="QTextBrowser" name="_credits">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Contributions&lt;/span&gt;&lt;br /&gt;We are very grateful for all the contributions we have received for this project. Below is a link showing all of the users that have contributed to the Crazyflie client. &lt;br /&gt;&lt;br /&gt;Thank you! &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://github.com/bitcraze/crazyflie-clients-python/graphs/contributors&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#1b6acb;&quot;&gt;Contributor information on GitHub&lt;/span&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextEditable|Qt::TextEditorInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
Expand Down

0 comments on commit e4202ec

Please sign in to comment.