Skip to content

Commit 3623bed

Browse files
committed
MAINT: simplify copyright label in aboutdialog
1 parent 658aebe commit 3623bed

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

src/diffpy/pdfgui/gui/aboutdialog.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
computer programs for studying nanostructure in crystals,
4040
J. Phys.: Condens. Matter 19, 335219 (2007).'''
4141

42+
_copyright = "(c) 2005-{year},".format(year= __date__[:4])
43+
4244
_homepage = "http://www.diffpy.org"
4345

4446
# authors list is shuffled randomly every time
@@ -77,7 +79,7 @@ def __init__(self, *args, **kwds):
7779
self.label_version = wx.StaticText(self, wx.ID_ANY, "")
7880
self.label_build = wx.StaticText(self, wx.ID_ANY, "Build:")
7981
self.label_svnrevision = wx.StaticText(self, wx.ID_ANY, "")
80-
self.label_copyright = wx.StaticText(self, wx.ID_ANY, "(c) 2005-YYYY,")
82+
self.label_copyright = wx.StaticText(self, wx.ID_ANY, "")
8183
self.label_author = wx.StaticText(self, wx.ID_ANY, "author")
8284
self.hyperlink = wx.lib.agw.hyperlink.HyperLinkCtrl(self, wx.ID_ANY, _homepage, URL=_homepage)
8385
self.hyperlink_license = wx.lib.agw.hyperlink.HyperLinkCtrl(self, wx.ID_ANY, _license, URL=_license)
@@ -105,12 +107,9 @@ def __init__(self, *args, **kwds):
105107
random.shuffle(_authors)
106108
strLabel = ", ".join(_authors)
107109
self.label_author.SetLabel(strLabel)
108-
# setup acknowledgement text
110+
# setup acknowledgement and copyright text labels
109111
self.label_acknowledgement.SetLabel(_acknowledgement)
110-
# set copyright year to that of the current release
111-
syear = __date__[:4]
112-
scprt = self.label_copyright.GetLabel().replace('YYYY', syear)
113-
self.label_copyright.SetLabel(scprt)
112+
self.label_copyright.SetLabel(_copyright)
114113
# display version and svn revison numbers
115114
verwords = __version__.split('.post', 1)
116115
version = verwords[0]

src/diffpy/pdfgui/gui/design/aboutdialog.wxg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<!-- generated by wxGlade 0.8.3 on Fri Oct 12 15:28:28 2018 -->
2+
<!-- generated by wxGlade 0.8.3 on Fri Oct 12 15:54:43 2018 -->
33

44
<application encoding="UTF-8" for_version="2.8" header_extension=".h" indent_amount="4" indent_symbol="space" is_template="0" language="python" option="0" overwrite="0" path="../aboutdialog.py" source_extension=".cpp" top_window="dialogAbout" use_gettext="0" use_new_namespace="1">
55
<object class="DialogAbout" name="dialogAbout" base="EditDialog">
@@ -112,7 +112,6 @@
112112
<border>10</border>
113113
<flag>wxLEFT|wxRIGHT|wxTOP</flag>
114114
<object class="wxStaticText" name="label_copyright" base="EditStaticText">
115-
<label>(c) 2005-YYYY,</label>
116115
<attribute>1</attribute>
117116
</object>
118117
</object>

0 commit comments

Comments
 (0)