Revision f8fdad84 py/scenic/gui.py
| b/py/scenic/gui.py | ||
|---|---|---|
| 131 | 131 |
""" |
| 132 | 132 |
return "<b>%s</b>\n IP: %s\n Port: %s" % (contact["name"], contact["address"], contact["port"]) |
| 133 | 133 |
|
| 134 |
# Unused when about tab is hidden |
|
| 134 | 135 |
ABOUT_LABEL = """<b><big>Scenic</big></b> |
| 135 | 136 |
Version: %s |
| 136 | 137 |
Copyright: SAT |
| 137 | 138 |
Authors: Etienne Desautels, Alexandre Quessy, Tristan Matthews, Simon Piette |
| 138 | 139 |
Web site: http://svn.sat.qc.ca/trac/scenic""" % (__version__) |
| 139 | 140 |
|
| 140 |
ABOUT_TEXT_VIEW = """ |
|
| 141 |
Scenic is the advanced user graphical interface for the Milhouse audio/video streamer for GNU/Linux.
|
|
| 141 |
ABOUT_TEXT_VIEW = """Scenic is a high-quality audio/video streamer for GNU/Linux."""
|
|
| 142 |
#Each peer decides what to receive from the other peer. Next, one peer can invite an other one to stream high-quality audio and video.
|
|
| 142 | 143 |
|
| 143 |
Each peer decides what to receive from the other peer. Next, one peer can invite an other one to stream high-quality audio and video. |
|
| 144 |
""" |
|
| 144 |
__license__ = """Scenic |
|
| 145 |
Copyright (C) 2009 Society for Arts and Technology (SAT) |
|
| 146 |
http://www.sat.qc.ca |
|
| 147 |
All rights reserved. |
|
| 148 |
|
|
| 149 |
This file is free software: you can redistribute it and/or modify |
|
| 150 |
it under the terms of the GNU General Public License as published by |
|
| 151 |
the Free Software Foundation, either version 2 of the License, or |
|
| 152 |
(at your option) any later version. |
|
| 153 |
|
|
| 154 |
Scenic is distributed in the hope that it will be useful, |
|
| 155 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 156 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 157 |
GNU General Public License for more details. |
|
| 158 |
|
|
| 159 |
You should have received a copy of the GNU General Public License |
|
| 160 |
along with Scenic. If not, see <http://www.gnu.org/licenses/>.""" |
|
| 145 | 161 |
|
| 146 | 162 |
class Gui(object): |
| 147 | 163 |
""" |
| ... | ... | |
| 859 | 875 |
|
| 860 | 876 |
# -------------------------- menu items ----------------- |
| 861 | 877 |
|
| 878 |
def on_about_menu_item_activate(self, menu_item): |
|
| 879 |
About.create() # TODO: set parent window ? |
|
| 880 |
|
|
| 862 | 881 |
def on_quit_menu_item_activated(self, menu_item): |
| 863 | 882 |
""" |
| 864 | 883 |
Quits the application. |
| ... | ... | |
| 991 | 1010 |
self.audio_jack_state_widget.set_markup("<b>Stopped</b>")
|
| 992 | 1011 |
self.audio_jack_icon_widget.set_from_stock(gtk.STOCK_NO, 4) |
| 993 | 1012 |
|
| 1013 |
class About(object): |
|
| 1014 |
""" |
|
| 1015 |
About dialog |
|
| 1016 |
""" |
|
| 1017 |
def __init__(self): |
|
| 1018 |
# TODO: set parent window ? |
|
| 1019 |
self.icon_file = configure.ICON_FILE |
|
| 1020 |
self.about_dialog = gtk.AboutDialog() |
|
| 1021 |
|
|
| 1022 |
def show_about_dialog(self): |
|
| 1023 |
self.about_dialog.set_name(configure.APPNAME) |
|
| 1024 |
self.about_dialog.set_role('about')
|
|
| 1025 |
self.about_dialog.set_version(__version__) |
|
| 1026 |
commentlabel = ABOUT_TEXT_VIEW |
|
| 1027 |
self.about_dialog.set_comments(commentlabel) |
|
| 1028 |
self.about_dialog.set_copyright("Copyright 2009-2010 Society for Arts and Technology")
|
|
| 1029 |
self.about_dialog.set_license(__license__) |
|
| 1030 |
self.about_dialog.set_authors([ |
|
| 1031 |
'Etienne Desautels', |
|
| 1032 |
'Alexandre Quessy <alexandre@quessy.net>', |
|
| 1033 |
'Tristan Matthews <tristan@sat.qc.ca>', |
|
| 1034 |
'Simon Piette <simonp@sat.qc.ca>' |
|
| 1035 |
]) |
|
| 1036 |
self.about_dialog.set_artists(['Public domain']) |
|
| 1037 |
gtk.about_dialog_set_url_hook(self.show_website) |
|
| 1038 |
self.about_dialog.set_website("http://svn.sat.qc.ca/trac/scenic")
|
|
| 1039 |
if not os.path.exists(self.icon_file): |
|
| 1040 |
print("Could not find icon file %s." % (self.icon_file))
|
|
| 1041 |
else: |
|
| 1042 |
large_icon = gtk.gdk.pixbuf_new_from_file(self.icon_file) |
|
| 1043 |
self.about_dialog.set_logo(large_icon) |
|
| 1044 |
# Connect to callbacks |
|
| 1045 |
self.about_dialog.connect('response', self.destroy_about)
|
|
| 1046 |
self.about_dialog.connect('delete_event', self.destroy_about)
|
|
| 1047 |
self.about_dialog.connect("delete-event", self.destroy_about)
|
|
| 1048 |
self.about_dialog.show_all() |
|
| 1049 |
|
|
| 1050 |
@staticmethod |
|
| 1051 |
def create(): |
|
| 1052 |
""" |
|
| 1053 |
@rettype: None |
|
| 1054 |
""" |
|
| 1055 |
dialog = About() |
|
| 1056 |
return dialog.show_about_dialog() |
|
| 1057 |
|
|
| 1058 |
def show_website(self, widget, data): |
|
| 1059 |
webbrowser.open(data) |
|
| 1060 |
|
|
| 1061 |
def destroy_about(self, *args): |
|
| 1062 |
self.about_dialog.destroy() |
|
Also available in: Unified diff