On Tue, 2011-04-12 at 12:35 -0500, Gabriel Burt wrote:
> I highly recommend finding an extension that is similar to the one you
> want to make, and study it. Our best documentation is a large set of
> functional extensions that you can copy from. If you have more
> questions, do ask, here or on the #banshee IRC channel on gimpnet.
>
> Gabriel
>
The problem with studying is that not all 'magic' is explained. For
example I have following method in view:
public bool SetSource (ISource source) {
spotify = source as SpotifySource;
Hyena.Log.DebugFormat ("{0} set as source", spotify.ToString
());
if (spotify == null) {
return false;
}
return true;
}
The constructor is done as:
public SpotifySource () : base ("Spotify",
"Spotify",
sort_order,
"spotify")
{
Properties.Set<ISourceContents> ("Nereid.SourceContents",
new SpotifyView ());
// Copied from LastfmSource probably w/out understending
ServiceManager.SourceManager.AddSource (this);
Hyena.Log.Information ("Testing! Spotify source has been
instantiated!");
}
I cannot find how SetSource is called anywhere in code although I
assume it is called in Lastfm extension somehow. I may just add
SetSource manually but I have feelings of crossover between programming
by permutation[1] and reverse engineering (I'm not worried that the
code won't work - I'm worried that it'll by spaghetti code that won't
work correctly).
Regards
[1] http://en.wikipedia.org/wiki/Programming_by_permutation
Attachment:
signature.asc
Description: This is a digitally signed message part