def handle_link_clicks(self, url): url = to_text_string(url.toString()) if url == "spy://tutorial": self.show_tutorial() elif url.startswith('http'): programs.start_file(url) else: self.rich_text.webview.load(QUrl(url))
def create_bookmark_action(parent, url, title, icon=None, shortcut=None): """Create bookmark action""" return create_action(parent, title, shortcut=shortcut, icon=icon, triggered=lambda u=url: programs.start_file(u))
def open_outside_spyder(self, fnames): """Open file outside Spyder with the appropriate application If this does not work, opening unknown file in Spyder, as text file""" for path in sorted(fnames): path = file_uri(path) ok = programs.start_file(path) if not ok: self.parent_widget.edit.emit(path)
def open_outside_spyder(self, fnames): """Open file outside Spyder with the appropriate application If this does not work, opening unknown file in Spyder, as text file""" for path in sorted(fnames): path = file_uri(path) ok = programs.start_file(path) if not ok: self.parent_widget.emit(SIGNAL("edit(QString)"), path)
def create_bookmark_action(parent, url, title, icon=None, shortcut=None): """Create bookmark action""" return create_action( parent, title, shortcut=shortcut, icon=icon, triggered=lambda u=url: programs.start_file(u) )
def open_url(): return programs.start_file(url)
def create_bookmark_action(parent, url, title, icon=None, shortcut=None): """Create bookmark action""" if icon is None: icon = get_icon('browser.png') return create_action( parent, title, shortcut=shortcut, icon=icon, triggered=lambda u=url: programs.start_file(u) )