<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'># HG changeset patch<br># User K. Arvanitis <<a href="mailto:kosta@alumni.uvic.ca">kosta@alumni.uvic.ca</a>><br># Date 1421989539 28800<br># Thu Jan 22 21:05:39 2015 -0800<br># Node ID a4b1dd7418de3105ea43e521a1b50dc4d6b05fe7<br># Parent b25606106a9c0cd78f3cc5f602475da64cde081d<br>[PATCH] Fix Link in About Dialog<BR>The URL link in the about dialog is now functional. Tested in both<br>Ubuntu and Windows 8.1, verified working.<BR>Replaced the MessageBox dialog for the 'Documentation' help menu item<br>with a hotlink to the website. The URL link in the MessageBox was non-<br>functional on Windows and overall it did not provide much information<br>outside of the link anyhow.<BR>Bug #330<BR>diff -r b25606106a9c -r a4b1dd7418de chirpui/mainapp.py<br>--- a/chirpui/mainapp.py Wed Jan 21 23:30:19 2015 -0800<br>+++ b/chirpui/mainapp.py Thu Jan 22 21:05:39 2015 -0800<br>@@ -17,6 +17,7 @@<br> import os<br> import tempfile<br> import urllib<br>+import webbrowser<br> from glob import glob<br> import shutil<br> import time<br>@@ -1177,9 +1178,12 @@<br> ".".join([str(x) for x in gtk.pygtk_version]),<br> sys.version.split()[0])<br> <br>+ # Set url hook to handle user activating a URL link in the about dialog<br>+ gtk.about_dialog_set_url_hook(lambda dlg, url: webbrowser.open(url))<br>+<br> d.set_name("CHIRP")<br> d.set_version(CHIRP_VERSION)<br>- d.set_copyright("Copyright 2013 Dan Smith (KK7DS)")<br>+ d.set_copyright("Copyright 2015 Dan Smith (KK7DS)")<br> d.set_website("<a href="http://chirp.danplanet.com">http://chirp.danplanet.com</a>")<br> d.set_authors(("Dan Smith KK7DS <<a href="mailto:dsmith@danplanet.com">dsmith@danplanet.com</a>>",<br> _("With significant contributions from:"),<br>@@ -1205,20 +1209,8 @@<br> d.run()<br> d.destroy()<br> <br>- def do_documentation(self):<br>- d = gtk.MessageDialog(buttons=gtk.BUTTONS_OK, parent=self,<br>- type=gtk.MESSAGE_INFO)<br>-<br>- d.set_markup("<b><big>" + _("CHIRP Documentation") + "</big></b>\r\n")<br>- msg = _("Documentation for CHIRP, including FAQs, and help for common "<br>- "problems is available on the CHIRP web site, please go to\n\n"<br>- "<a href=\"<a href="http://chirp.danplanet.com/projects/chirp/wiki/">http://chirp.danplanet.com/projects/chirp/wiki/</a>"<br>- "Documentation\">"<br>- "<a href="http://chirp.danplanet.com/projects/chirp/wiki/">http://chirp.danplanet.com/projects/chirp/wiki/</a>"<br>- "Documentation</a>\n")<br>- d.format_secondary_markup(msg.replace("\n","\r\n"))<br>- d.run()<br>- d.destroy()<br>+ def do_gethelp(self):<br>+ webbrowser.open("<a href="http://chirp.danplanet.com">http://chirp.danplanet.com</a>")<br> <br> def do_columns(self):<br> eset = self.get_current_editorset()<br>@@ -1407,8 +1399,8 @@<br> self.do_przemienniki(action[0] == "i")<br> elif action == "about":<br> self.do_about()<br>- elif action == "documentation":<br>- self.do_documentation()<br>+ elif action == "gethelp":<br>+ self.do_gethelp()<br> elif action == "columns":<br> self.do_columns()<br> elif action == "hide_unused":<br>@@ -1502,10 +1494,12 @@<br> <menuitem action="cancelq"/><br> </menu><br> <menu action="help"><br>- <menuitem action="about"/><br>- <menuitem action="documentation"/><br>+ <menuitem action="gethelp"/><br>+ <separator/><br> <menuitem action="report"/><br> <menuitem action="developer"/><br>+ <separator/><br>+ <menuitem action="about"/><br> </menu><br> </menubar><br> </ui><br>@@ -1558,7 +1552,7 @@<br> ('cancelq', gtk.STOCK_STOP, None, "Escape", None, self.mh),<br> ('help', None, _('Help'), None, None, self.mh),<br> ('about', gtk.STOCK_ABOUT, None, None, None, self.mh),<br>- ('documentation', None, _("Documentation"), None, None, self.mh),<br>+ ('gethelp', None, _("Get Help Online..."), None, None, self.mh),<br> ]<br> <br> conf = config.get()<br> <BR>                                            </div></body>
</html>