Skip to content

Commit e390022

Browse files
committed
About dialog: code refactoring with guidata
1 parent a310f3e commit e390022

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

plotpy/widgets/about.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,16 @@ def about(html: bool = True, copyright_only: bool = False) -> str:
4343
Returns:
4444
str: text about this package
4545
"""
46-
shortdesc = (
47-
f"PlotPy {plotpy.__version__}\n\n"
48-
f"PlotPy is a set of tools for curve and image plotting.\n"
49-
f"Created by Pierre Raybaut."
46+
info = guidata_about.AboutInfo(
47+
name="PlotPy",
48+
version=plotpy.__version__,
49+
description=_("Set of tools for curve and image plotting."),
50+
author="Pierre Raybaut",
51+
year=2016,
52+
organization="PlotPyStack",
5053
)
5154
addinfos = f"guidata {guidata.__version__}, PythonQwt {qwt.__version__}"
52-
desc = guidata_about.get_general_infos(addinfos)
53-
if not copyright_only:
54-
desc = f"{shortdesc}\n\n{desc}"
55-
if html:
56-
desc = desc.replace("\n", "<br />")
57-
return desc
55+
return info.about(html=html, copyright_only=copyright_only, addinfos=addinfos)
5856

5957

6058
def show_about_dialog() -> None:

0 commit comments

Comments
 (0)