示例#1
0
    def __init__(self, journal):
        HtmlView.__init__(self)
        self.journal = journal
        self.update_lists()

        self.connect('context-menu', self._on_context_menu)
        self.connect('decide-policy', self.on_decide_policy)
示例#2
0
    def __init__(self, journal):
        HtmlView.__init__(self)

        self.journal = journal

        self.update_lists()

        self.webview.connect("hovering-over-link", self.on_hovering_over_link)
        self.webview.connect('populate-popup', self.on_populate_popup)
        self.webview.connect('navigation-requested', self.on_navigate)

        self.last_hovered_word = None
示例#3
0
    def __init__(self, journal):
        HtmlView.__init__(self)

        self.journal = journal

        self.update_lists()

        self.webview.connect("hovering-over-link", self.on_hovering_over_link)
        self.webview.connect("populate-popup", self.on_populate_popup)

        self.set_type(0, init=True)
        self.last_hovered_word = None
示例#4
0
    def __init__(self, journal):
        HtmlView.__init__(self)

        self.journal = journal

        self.update_lists()

        self.webview.connect("hovering-over-link", self.on_hovering_over_link)
        self.webview.connect('populate-popup', self.on_populate_popup)
        self.webview.connect('navigation-requested', self.on_navigate)

        self.last_hovered_word = None
示例#5
0
    def __init__(self, journal):
        HtmlView.__init__(self)

        self.journal = journal

        self.update_lists()

        self.webview.connect("hovering-over-link", self.on_hovering_over_link)
        self.webview.connect('populate-popup', self.on_populate_popup)

        self.set_type(0, init=True)
        self.last_hovered_word = None
示例#6
0
+ other item


"""
    #txt = '- an other'

    search_text = 'aha'

    buff = get_highlight_buffer()

    buff.set_search_text(search_text)

    win = gtk.Window(gtk.WINDOW_TOPLEVEL)
    scr = gtk.ScrolledWindow()

    html_editor = HtmlView()

    def change_text(widget):
        html = markup.convert(
            widget.get_text(widget.get_start_iter(), widget.get_end_iter()),
            'xhtml', '/tmp')

        html_editor.load_html(html)
        html_editor.highlight(search_text)

    buff.connect('changed', change_text)

    vbox = gtk.VBox()
    vbox.pack_start(scr)
    vbox.pack_start(html_editor)
    win.add(vbox)