1import fsgs
2import fsui
3from fsui.extra.iconheader import IconHeader
4from fsbc.application import app
5from launcher.i18n import gettext
6from launcher.ui.skin import LauncherTheme
7from launcher.ui.widgets import CloseButton
8
9
10class AboutDialog(fsui.Window):
11    def __init__(self, parent):
12        if fsgs.product == "OpenRetro":
13            app_name = "OpenRetro Launcher"
14        else:
15            app_name = "FS-UAE Launcher"
16        title = "{} - {}".format(gettext("About"), app_name)
17        super().__init__(parent, title, minimizable=False, maximizable=False)
18        self.theme = LauncherTheme.get()
19        self.layout = fsui.VerticalLayout()
20        self.layout.set_padding(20)
21
22        self.icon_header = IconHeader(
23            self,
24            fsui.Icon("fs-uae-launcher", "pkg:launcher"),
25            "{name} {version}".format(name=app_name, version=app.version),
26            "Copyright © 2012-2017 Frode Solheim",
27        )
28        self.layout.add(self.icon_header, fill=True, margin_bottom=20)
29
30        self.text_area = fsui.TextArea(
31            self, about_message, read_only=True, font_family="monospace"
32        )
33        self.text_area.scroll_to_start()
34        self.text_area.set_min_width(760)
35        self.text_area.set_min_height(340)
36        self.layout.add(self.text_area, fill=True, expand=True)
37
38        CloseButton.add_to_layout(self, self.layout, margin_top=20)
39
40
41about_message = """\n
42This package is free software; you can redistribute it and/or modify it under
43the terms of the GNU General Public License as published by the Free Software
44Foundation; either version 2 of the License, or (at your option) any later
45version.
46
47This package is distributed in the hope that it will be useful, but WITHOUT
48ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
49FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
50
51You should have received a copy of the GNU General Public License along with
52this package; if not, write to the Free Software Foundation, Inc.,
5351 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
54
55The following people have translated FS-UAE Launcher into several languages:
56Cédric "Foul" Monféfoul (French), nexusle (German), Speedvicio (Italian),
57grimi (Polish), Milanchez (Serbian), albconde (Spanish), Treco (Portuguese),
58GoingDown (Finish), spajdr (Czech), Decypher (Turkisk).
59
60A big thanks to everyone who have tested the software and provided valuable
61feedback! Especially the encouraging members of the English Amiga Board, and
62all you who have commented on the official FS-UAE web site.
63
64FS-UAE Launcher includes icons from GNOME icon theme from the GNOME Project
65(http://www.gnome.org). The GNOME icon theme is distributed under the terms
66of either GNU LGPL v.3 or Creative Commons BY-SA 3.0 license.
67
68FS-UAE Launcher includes icons from humanity-icon-theme, licensed under the
69terms of the GNU General Public license.
70
71FS-UAE includes icons from oxygen-icon-theme, licensed under the terms of the
72GNU Lesser General Public License as published by the Free Software
73Foundation; either version 3 of the License, or (at your option) any later
74version.
75
76The Amiga Forever icon is (probably) copyright Cloanto Italia srl.
77
78FS-UAE Launcher includes the oyoyo library, Copyright (c) 2008 Duncan Fordyce,
79The license for this library is contained in the following paragraph:
80Permission is hereby granted, free of charge, to any person obtaining a copy
81of this software and associated documentation files (the "Software"), to deal
82in the Software without restriction, including without limitation the rights
83to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
84copies of the Software, and to permit persons to whom the Software is
85furnished to do so, subject to the following conditions:
86The above copyright notice and this permission notice shall be included in
87all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED
88"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
89LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
90AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
91LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
92CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
93SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
94
95FS-UAE Launcher may include lhafile, Copyright (c) 2010 Hidekazu Ohnishi.
96All rights reserved. Redistribution and use in source and binary forms,
97with or without modification, are permitted provided that the following
98conditions are met:
99* Redistributions of source code must retain the above copyright notice,
100  this list of conditions and the following disclaimer.
101* Redistributions in binary form must reproduce the above copyright notice,
102  this list of conditions and the following disclaimer in the documentation
103  and/or other materials provided with the distribution.
104* Neither the name of the author nor the names of its contributors may be
105  used to endorse or promote products derived from this software without
106  specific prior written permission.
107THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
108AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
109IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
110ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
111LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
112CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
113SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
114INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
115CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
116ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
117POSSIBILITY OF SUCH DAMAGE.
118
119FS-UAE Launcher depends on several open source third party software packages,
120including but not limited to, Python and PyQt/Pyside.
121"""
122