[kupfer] audacious: use source_user_reloadable
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] audacious: use source_user_reloadable
- Date: Tue, 6 Apr 2010 18:22:49 +0000 (UTC)
commit 0ac9c4add0acce18aaaa8e7e2f3cdf24ba07b48a
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Tue Apr 6 17:16:13 2010 +0200
audacious: use source_user_reloadable
kupfer/plugin/audacious.py | 29 ++---------------------------
1 files changed, 2 insertions(+), 27 deletions(-)
---
diff --git a/kupfer/plugin/audacious.py b/kupfer/plugin/audacious.py
index 79e4c1d..c8f8542 100644
--- a/kupfer/plugin/audacious.py
+++ b/kupfer/plugin/audacious.py
@@ -1,8 +1,5 @@
__kupfer_name__ = _("Audacious")
__kupfer_sources__ = ("AudaciousSource", )
-__kupfer_actions__ = (
- "Rescan",
- )
__description__ = _("Control Audacious playback and playlist")
__version__ = "2009-12-15"
__author__ = "Horia V. Corcalciuc <h v corcalciuc gmail com>"
@@ -90,30 +87,6 @@ class JumpToSong(Action):
def get_icon_name(self):
return "media-playback-start"
-class Rescan (Action):
- """A source action: Rescan a source!
-
- A simplified version of the original core Rescan action
- """
- rank_adjust = -5
- def __init__(self):
- Action.__init__(self, _("Rescan"))
-
- def activate(self, leaf):
- if not leaf.has_content():
- raise objects.InvalidLeafError("Must have content")
- source = leaf.content_source()
- source.get_leaves(force_update=True)
-
- def get_description(self):
- return _("Force reindex of this source")
- def get_icon_name(self):
- return "gtk-refresh"
- def item_types(self):
- yield AppLeaf
- def valid_for_item(self, item):
- return item.get_id() == AUDACIOUS
-
class Play (RunnableLeaf):
def __init__(self):
RunnableLeaf.__init__(self, name=_("Play"))
@@ -208,6 +181,8 @@ class AudaciousSongsSource (Source):
class AudaciousSource (AppLeafContentMixin, Source):
appleaf_content_id = AUDACIOUS
+ source_user_reloadable = True
+
def __init__(self):
Source.__init__(self, _("Audacious"))
def get_items(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]