plugins: All plugins have a __NAME__ value

This commit is contained in:
Bryan Schumaker 2011-01-30 21:34:27 -05:00
parent d28ca013f3
commit c78f806244
6 changed files with 15 additions and 4 deletions

View File

@ -24,10 +24,12 @@ class PluginView(gtk.TreeView):
self.col = PluginColumn()
self.append_column(self.col)
keys = plugin.loaded.keys()
keys.sort()
for key in keys:
self.list.append([key])
names = []
for mod in plugin.loaded.values():
names.append(mod.__NAME__)
names.sort()
for name in names:
self.list.append([name])
self.set_model(self.list)
self.show_all()

View File

@ -11,6 +11,7 @@ from libsaria import web
from libsaria import xm
from libsaria import cache
__NAME__ = "Lyrics"
gtk = ocarina.gtk
lyrics = gtk.ScrolledWindow()

View File

@ -6,6 +6,8 @@ libsaria = ocarina.libsaria
get_attrs = libsaria.sources.get_attrs
image = ocarina.components.image.Image()
__NAME__ = "Notify"
def notify(*args):
title, artist, art = get_attrs("title", "artist", "art")

View File

@ -4,6 +4,8 @@ import ocarina
import webkit
from ocarina import body
__NAME__ = "Web Radio"
libsaria = ocarina.libsaria
path = libsaria.path
audio = libsaria.audio

View File

@ -6,6 +6,8 @@ from libsaria.sources import library
from libsaria import threads
from libsaria import lastfm
__NAME__ = "Web Server"
path = libsaria.path
exists = path.exists
join = path.join

View File

@ -7,6 +7,8 @@ libsaria = ocarina.libsaria
get_attrs = libsaria.sources.get_attrs
invite = libsaria.event.invite
__NAME__ = "Window Manager Tweaks"
def tweak_icon(file):
if file == None: