[kupfer] gwibber: Add Source.provides for all sources
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] gwibber: Add Source.provides for all sources
- Date: Mon, 14 Mar 2011 01:40:07 +0000 (UTC)
commit 24897c7cbf69e2b2256ecee8466307dcf0d2cb2d
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Mon Mar 14 02:31:56 2011 +0100
gwibber: Add Source.provides for all sources
This annotation is important so that other actions need to
load these sources just to find indirect objects.
kupfer/plugin/gwibber.py | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/kupfer/plugin/gwibber.py b/kupfer/plugin/gwibber.py
index b255906..079d1c1 100644
--- a/kupfer/plugin/gwibber.py
+++ b/kupfer/plugin/gwibber.py
@@ -443,6 +443,9 @@ class AccountsSource(Source):
def get_description(self):
return _("Accounts configured in Gwibber")
+ def provides(self):
+ yield Account
+
class SendToAccountSource(Source):
def __init__(self, required_feature=None, name=_("Gwibber Accounts")):
@@ -465,6 +468,9 @@ class SendToAccountSource(Source):
self._required_feature in service['features']:
yield Account(account, service['name'], False)
+ def provides(self):
+ yield Account
+
class HomeMessagesSource(Source):
# we don't connect to "gwibber" app as long we only need "gwibber-service".
@@ -495,6 +501,9 @@ class HomeMessagesSource(Source):
def get_description(self):
return _("Recent messages received by Gwibber")
+ def provides(self):
+ yield Message
+
class MessagesSource(Source):
def __init__(self, account, service):
@@ -508,6 +517,9 @@ class MessagesSource(Source):
def get_icon_name(self):
return 'gwibber'
+ def provides(self):
+ yield Message
+
class StreamsSource(Source):
source_user_reloadable = True
@@ -537,6 +549,8 @@ class StreamsSource(Source):
def get_description(self):
return _("Streams configured in Gwibber")
+ def provides(self):
+ yield Stream
class StreamMessagesSource(Source):
def __init__(self, stream):
@@ -553,6 +567,10 @@ class StreamMessagesSource(Source):
def get_icon_name(self):
return 'gwibber'
+ def provides(self):
+ yield Message
+
+
class StatusTextSource (TextSource):
def get_rank(self):
return 100
@@ -566,3 +584,7 @@ class StatusTextSource (TextSource):
def get_items(self, text):
return self.get_text_items(text)
+ def provides(self):
+ yield TextLeaf
+
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]