def __init__(self, buffer_id, url): BrowserBuffer.__init__(self, buffer_id, url, False, QColor(255, 255, 255, 255)) self.buffer_widget.setUrl(QUrl(url)) self.buffer_widget.titleChanged.connect(self.change_title) self.buffer_widget.open_url_in_new_tab.connect(self.open_url)
def __init__(self, buffer_id, url, arguments): BrowserBuffer.__init__(self, buffer_id, url, arguments, False, QColor(255, 255, 255, 255)) self.buffer_widget.setUrl(QUrl(url)) self.buffer_widget.titleChanged.connect(self.change_title) self.buffer_widget.open_url_in_new_tab.connect(self.open_url) self.buffer_widget.translate_selected_text.connect(self.translate_text)
def __init__(self, buffer_id, url): BrowserBuffer.__init__(self, buffer_id, url, False, QColor(255, 255, 255, 255)) # Get free port to render markdown. self.port = self.get_free_port() self.url = url # Start markdown render process. subprocess.Popen("grip {0} {1}".format(url, self.port), shell=True) # Add timer make load markdown preview link after grip process start finish. timer = threading.Timer(2, self.load_markdown_server) timer.start()
def __init__(self, buffer_id, url, arguments): BrowserBuffer.__init__(self, buffer_id, url, arguments, False, QColor(255, 255, 255, 255)) # Get free port to render markdown. self.port = self.get_free_port() self.url = url # Start markdown render process. if arguments == "": subprocess.Popen("grip {0} {1}".format(url, self.port), shell=True) else: subprocess.Popen("grip --pass {0} {1} {2}".format(arguments, url, self.port), shell=True) # Add timer make load markdown preview link after grip process start finish. timer = threading.Timer(2, self.load_markdown_server) timer.start()
def __init__(self, buffer_id, url, arguments): BrowserBuffer.__init__(self, buffer_id, url, arguments, False, QColor(255, 255, 255, 255)) self.url = url self.load_org_html_file()
def __init__(self, buffer_id, url, arguments): BrowserBuffer.__init__(self, buffer_id, url, arguments, False, QColor(255, 255, 255, 255)) self.buffer_widget.setUrl(QUrl(url)) self.buffer_widget.titleChanged.connect(self.change_title) self.buffer_widget.open_url_in_new_tab.connect(self.open_url)