From: <jb...@us...> - 2009-11-19 06:04:09
|
Revision: 391 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=391&view=rev Author: jblance Date: 2009-11-19 06:04:01 +0000 (Thu, 19 Nov 2009) Log Message: ----------- Fix for bug 2811470 - clickable link for further details on MET (links to wikipedia) Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/windowmain.py Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-11-19 05:32:10 UTC (rev 390) +++ pytrainer/trunk/glade/pytrainer.glade 2009-11-19 06:04:01 UTC (rev 391) @@ -10527,25 +10527,16 @@ <property name="y_options"></property> </packing> </child> - - <child> - <widget class="GtkLabel" id="label157"> - <property name="visible">True</property> - <property name="label" translatable="yes"><small><b>Note:</b> You can get your M.E.T. sport Coefficient here: http://pytrainer.e-oss.net/met.pdf</small></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> + <child> + <widget class="GtkLinkButton" id="metlinkbutton"> + <property name="label" translatable="yes">More information on determining yor M.E.T sport coefficient on Wikipedia</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="has_tooltip">True</property> + <property name="relief">none</property> + <property name="uri">http://en.wikipedia.org/wiki/Metabolic_equivalent</property> + </widget> <packing> <property name="left_attach">0</property> <property name="right_attach">3</property> @@ -11135,31 +11126,23 @@ </child> <child> - <widget class="GtkLabel" id="label-2147483647"> - <property name="visible">True</property> - <property name="label" translatable="yes"><small><b>Note:</b> You can get your M.E.T. sport Coefficient here: http://pytrainer.e-oss.net/met.pdf</small></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> + <widget class="GtkLinkButton" id="linkbutton1"> + <property name="label" translatable="yes">More information on determining yor M.E.T sport coefficient on Wikipedia</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="has_tooltip">True</property> + <property name="relief">none</property> + <property name="uri">http://en.wikipedia.org/wiki/Metabolic_equivalent</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> </child> </widget> <packing> Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-11-19 05:32:10 UTC (rev 390) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-11-19 06:04:01 UTC (rev 391) @@ -31,6 +31,10 @@ class Main(SimpleGladeApp): def __init__(self, data_path = None, parent = None, version = None): + def url_hook(dialog, url): + pytrainer.lib.webUtils.open_url_in_browser(url) + # Available in PyGTK 2.6 and above + gtk.about_dialog_set_url_hook(url_hook) self.version = version self.parent = parent self.data_path = data_path This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |