Re: [Rhythmbox-devel] plugin development



Ok, I have MySource class:

class MySource(rb.BrowserSource):
    def __init__(self):
        rb.BrowserSource.__init__(self)
        self.activated = False

    def do_impl_search(self, search):
        print 'SEARCH!!! %s' % search
        return
#        return rb.BrowserSource.do_impl_search(self, search)

    def do_impl_activate(self):
        print 'DO IMPL'
        if not self.activated:
            shell = self.get_property('shell')
            db = shell.get_property('db')
            entry_type = self.get_property('entry-type')
            # ... populate default track list ... skipped, isn't
important for issue
            db.commit()
            self.activated = True

        rb.BrowserSource.do_impl_activate(self)

gobject.type_register(MySource)

it populate track list from external storage and it works - I can see
and play tracks. Now, I'd like to make this list dynamic - so, when
user types something - I need to get this information (important -
default list doesn't contain all tracks, so, I don't filter default
data, let's say default data is last listened tracks - so, I need to
do new request to get new data that matched search filter).
Actually, as soon as I added this function
def do_impl_search(self, search):
I immidiately got Segmentation fault and I have no idea what I did wrong.

Thanks in advance.

On Wed, Mar 24, 2010 at 5:53 PM, Ron Croonenberg <ronc depauw edu> wrote:
> What is it you are trying to do?  a segmentation fault can be caused by a
> bunch of things (typically you're using something that is not defined and
> pointing 'nowhere')
>
> On 3/24/2010 10:45 AM, Alexey Grunichev wrote:
>>
>> I want to develop something similar to:
>> http://mail.gnome.org/archives/rhythmbox-devel/2008-August/msg00018.html
>> so, I need to get data from remote service by user submitted filter.
>>
>> I tried to do described in topic and added:
>>
>> def do_impl_search(self, query):
>>     print 'it works'
>>     return
>>     # return rb.BrowserSource.do_impl_search(self, query)
>>
>> But by activation I get "Segmentation fault" error. I tried *args and
>> **kwargs (thaught problem in arguments), but it didn't help. May be
>> something has been changed since 2008.
>>
>> Another question (less important) - can I disable a couple of buttons
>> (there is artist/title etc search by default - but I have only one
>> filter for remote data)?
>> _______________________________________________
>> rhythmbox-devel mailing list
>> rhythmbox-devel gnome org
>> http://mail.gnome.org/mailman/listinfo/rhythmbox-devel
>
> --
> ==================================================================
> main(p){printf(p,34,p="main(p){printf(p,34,p=%c%s%c,34); }",34); }
> ==================================================================
> Ron Croonenberg                   |
>                                  | Phone: 1 765 658 4761
> Lab Instructor &                  | Fax:   1 765 658 4732
>        Technology Coordinator    |
>                                  |
> Department of Computer Science    | e-mail: ronc DePauw edu
> DePauw University                 |
> 275 Julian Science & Math Center  |
> 602 South College Ave.            |
> Greencastle, IN  46135            |
> ==================================================================
>
> _______________________________________________
> rhythmbox-devel mailing list
> rhythmbox-devel gnome org
> http://mail.gnome.org/mailman/listinfo/rhythmbox-devel
>


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