Re: [gedit-list] sound in gedit



Gstreamer is working out. There is a great 20 minute tutorial over at http://www.jonobacon.org/?p=750.

I can't find much documentation on the sourceview widget other than the api. I am trying to underline and make clickable all instances of the text:

[ Audio Link: SomeNumber ]

I thought that I should do it like this:

        doc=window.get_active_document()

        self._tag = gtksourceview.PatternTag('audioTag', 'audioTag', r'\[ Audio Link:\d+ \]')
        self._tag.set_property('underline', pango.UNDERLINE_SINGLE)

        table=doc.get_tag_table()
        table.add_tags([self._tag])
        doc.set_highlight(True)

Then I would listen to mark-set to know when there was a click, get the cursor position and call has_tag() to see if it has the audioTag. I haven't even gotten to the click part, because the underlining isn't working. Am I getting something conceptually wrong?

Thanks,

David

On 7/27/07, Paolo Borelli < pborelli katamail com> wrote:

Il giorno gio, 26/07/2007 alle 14.33 -0800, David Greisen ha scritto:
> Hello,
>

Hi David

> I'm new to both this list and hacking gedit. I've been playing around
> with building various plugins for the last couple of days and found it
> very easy and enjoyable.
>

That's nice to hear.


> Right now, I am trying to add recording and play-back functionality in
> gedit to create notes of meetings with hyper links to the associated
> point in a recorded audio file. What is the best way to add
> record/playback functionality? I have tried the snack toolkit, but it
> is not playing files for me. I suspect tcl/tk is not initializing
> properly from within the plugin framework. Is there any way around
> this? If not, is there an equivalent gtk library that I have been
> unable to find?
>

The usual choice for audio in the gtk world is gstreamer.
Hope that helps, yours sounds like an interesting project.

ciao
        Paolo

> Thanks for you assistance,
>
> David
> _______________________________________________
> gedit-list mailing list
> gedit-list gnome org
> http://mail.gnome.org/mailman/listinfo/gedit-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]