changelog: Describe v0.4, closes 1 bug
[dragbox/debian.git] / Dragbox / aboutdialog.py
blobbec8014c587e046af8980d730fb5a1ff8effb065
1 license_text = """
2 dragbox -- Command line drag-and-drop tool for Gnome
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
17 USA
18 """
19 authors = ["Ulrik Sverdrup <ulrik.sverdrup@gmail.com>"]
21 import version
22 from gtk import AboutDialog
24 _about_dialog = None
26 def show_about_dialog(*ignored, **kwds):
27 """
28 create an about dialog and show it
29 """
30 # Use only one instance, stored in _about_dialog
31 global _about_dialog
32 if _about_dialog:
33 ab = _about_dialog
34 else:
35 ab = AboutDialog()
36 ab.set_program_name(version.package_name)
37 ab.set_version(version.version)
38 ab.set_copyright(version.copyright_info)
39 ab.set_license(license_text)
40 ab.set_authors(authors)
41 ab.connect("response", _response_callback)
42 # do not delete window on close
43 ab.connect("delete-event", lambda *ign: True)
44 _about_dialog = ab
45 ab.present()
47 def _response_callback(dialog, response_id):
48 dialog.hide()