Esempio n. 1
0
 def helpcontents(self, item, url=None):
     'User selected Help->Contents from menu bar'
     if not url:
         url = self.get_help_url()
         if not url:
             return
     if not url.startswith('http'):
         fullurl = 'http://tortoisehg.org/manual/1.1/' + url
         # Use local CHM file if it can be found
         if os.name == 'nt' and paths.bin_path:
             chm = os.path.join(paths.bin_path, 'doc', 'TortoiseHg.chm')
             if os.path.exists(chm):
                 fullurl = (r'mk:@MSITStore:%s::/' % chm) + url
     shlib.browse_url(fullurl)
Esempio n. 2
0
 def issuelink_event(self, tag, widget, event, liter):
     if event.type != gtk.gdk.BUTTON_RELEASE:
         return
     text = self.get_link_text(tag, widget, liter)
     if not text:
         return
     link = self.repo.ui.config('tortoisehg', 'issue.link')
     if link:
         groups = self.issuedict.get(text, [text])
         link, num = re.subn(r'\{(\d+)\}', lambda m:
             groups[int(m.group(1))], link)
         if not num:
             link += text
         shlib.browse_url(link)
Esempio n. 3
0
def url_handler(dialog, link, user_data):
    shlib.browse_url(link)
Esempio n. 4
0
 def urllink_event(self, tag, widget, event, liter):
     if event.type != gtk.gdk.BUTTON_RELEASE:
         return
     text = self.get_link_text(tag, widget, liter)
     shlib.browse_url(text)