So I am trying to do some custom conversions of some pango formatting
in my application when I copy text from it to the clipboard, and
created a signal which is called when something is copied from it. It
seems that it doesn't do what I want, however, and the default copy
function stays in place (the text turns out plain when I paste it in
another non-formatted textbox). Would there be any way to set the
clipboard and then keep the text from being copied as per the default
and instead using the converted text which I already have?

The snippet of code pertaining to what I want to do is attached, note
that self.ipb is the buffer for my textView.

Thanks,
Smartboy
def textConvertFrom(self, widget, data=None):
        outputStart, outputEnd = self.ipb.get_bounds()
        tmpText = self.ipb.get_text(outputStart, outputEnd, True)
        tmpText = self.convertFunc(tmpText, 'bold')
        tmpText = self.convertFunc(tmpText, 'ital')
        tmpText = self.convertFunc(tmpText, 'undr')
        print tmpText
        self.clipboard.set_text(tmpText)
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to