summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManish Sinha <manishsinha@ubuntu.com>2012-04-02 02:16:47 +0530
committerManish Sinha <manishsinha@ubuntu.com>2012-04-02 02:16:47 +0530
commitc1fcc692aba1cd788e7e8cb4efc1ce79248a20c7 (patch)
treeca07a93a26b6a03b1187dc10270b2fcfdf6aac40
parentc2f2f8b73a9626ea6f49aab0316c7a5aa14bb902 (diff)
Removed rhythmbox datasource as it has been upstreamed
-rw-r--r--NEWS1
-rw-r--r--configure.ac28
-rw-r--r--rhythmbox/Makefile.am19
-rw-r--r--rhythmbox/README14
-rw-r--r--rhythmbox/__init__.py146
-rw-r--r--rhythmbox/zeitgeist.rb-plugin9
6 files changed, 2 insertions, 215 deletions
diff --git a/NEWS b/NEWS
index e1bdd92..cf6ca88 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@
* Removed gedit Datasource as it uses GtkRecentManager
* Removed eog (Eye of GNOME) Datasource as it uses GtkRecentManager
* Removed Totem datasource as it is now upstream
+* Removed Rhythmbox datasource as it is now upstream
* Stop XChat from logging messages to avoid polluting database
* Set telepathy subject uri's to telepathy://account_path/target_id
* Fix actor for chrome
diff --git a/configure.ac b/configure.ac
index a57d0f6..4c533c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,7 +63,7 @@ AC_ARG_ENABLE([all-plugins],
AC_MSG_NOTICE([Requested to enable all plugins: ${all_plugins}])
# The full list of plugins
-allowed_plugins="bzr chrome geany vim emacs tomboy telepathy xchat rhythmbox firefox firefox-36-libzg monodevelop thunderbird"
+allowed_plugins="bzr chrome geany vim emacs tomboy telepathy xchat firefox firefox-36-libzg monodevelop thunderbird"
# currently disabled = "epiphany"
# npapi-plugin has a template Makefile.am, but don't use it directly
@@ -101,28 +101,6 @@ for plugin in ${used_plugins}; do
continue
fi
;;
- rhythmbox)
- ;;
- rhythmbox-popular)
- if test "${with_vala}" != "yes" ; then
- plugin_error_or_ignore "you need vala installed to use the ${plugin} plugin"
- continue
- fi
- if test "${HAVE_LIBZG}" != "yes" ; then
- plugin_error_or_ignore "libzeitgeist not found"
- continue
- fi
- if test "${HAVE_GTK}" != "yes" ; then
- plugin_error_or_ignore "gtk+-2.0 not found"
- continue
- fi
- PKG_CHECK_MODULES([LIBXML], [libxml-2.0],
- [HAVE_LIBXML=yes], [HAVE_LIBXML=no])
- if test "${HAVE_LIBXML}" != "yes" ; then
- plugin_error_or_ignore "libxml package not found"
- continue
- fi
- ;;
epiphany)
# not supported atm
continue
@@ -307,10 +285,6 @@ if test "x${PLUGINS}" != "x" ; then
AC_CONFIG_FILES([tomboy/Makefile])
continue 2
;;
- rhythmbox)
- AC_CONFIG_FILES([rhythmbox/Makefile])
- continue 2
- ;;
thunderbird)
AC_CONFIG_FILES([
thunderbird/Makefile
diff --git a/rhythmbox/Makefile.am b/rhythmbox/Makefile.am
deleted file mode 100644
index 6c2ecc7..0000000
--- a/rhythmbox/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-PLUGIN_FILES = zeitgeist.rb-plugin __init__.py
-
-rhythmboxplugindir = $(libdir)/rhythmbox/plugins/zeitgeist-plugin
-dist_rhythmboxplugin_DATA = $(PLUGIN_FILES)
-
-# we want to allow also local install
-RHYTHMBOX_PLUGIN_HOME_DIR = ~/.local/share/rhythmbox/plugins/zeitgeist-plugin
-
-local-install:
- mkdir -p $(RHYTHMBOX_PLUGIN_HOME_DIR)
- cp $(PLUGIN_FILES) $(RHYTHMBOX_PLUGIN_HOME_DIR)
-
-local-uninstall:
- for f in $(PLUGIN_FILES); \
- do \
- echo remove $$f; \
- rm -f $(RHYTHMBOX_PLUGIN_HOME_DIR)/$$f; \
- done
-
diff --git a/rhythmbox/README b/rhythmbox/README
deleted file mode 100644
index 8838f9a..0000000
--- a/rhythmbox/README
+++ /dev/null
@@ -1,14 +0,0 @@
-Zeitgeist plugin for Rhythmbox
-******************************
-
-To use this plugin:
-
-* Install Zeitgeist 0.3 (or greater) so that the python library is available system-wide.
-* Run the install.sh script which will copy the plugin to '~/.local/share/rhythmbox/plugins'.
-* Launch Rhythmbox, choose Edit -> Plugins, and select the Zeitgeist plugin.
-
-To update plugin changes:
-* Run the install.sh script to recopy the plugin files.
-
-To get the debug output of this plugin, start rhythmbox with:
- $ rhythmbox -D Zeitgeist
diff --git a/rhythmbox/__init__.py b/rhythmbox/__init__.py
deleted file mode 100644
index 8d9bedf..0000000
--- a/rhythmbox/__init__.py
+++ /dev/null
@@ -1,146 +0,0 @@
-# -.- coding: utf-8 -.-
-
-# Copyright © 2009 Markus Korn <thekorn@gmx.de>
-# Copyright © 2010 Laszlo Pandy <laszlok2@gmail.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# The Rhythmbox authors hereby grant permission for non-GPL compatible
-# GStreamer plugins to be used and distributed together with GStreamer
-# and Rhythmbox. This permission is above and beyond the permissions granted
-# by the GPL license by which Rhythmbox is covered. If you modify this code
-# you may extend this exception to your version of the code, but you are not
-# obligated to do so. If you do not wish to do so, delete this exception
-# statement from your version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-import rb
-import rhythmdb
-import gobject
-import time
-
-from zeitgeist.client import ZeitgeistClient
-from zeitgeist.datamodel import Event, Subject, Interpretation, Manifestation
-
-try:
- IFACE = ZeitgeistClient()
-except RuntimeError, e:
- print "Unable to connect to Zeitgeist, won't send events. Reason: '%s'" %e
- IFACE = None
-
-class ZeitgeistPlugin(rb.Plugin):
-
- def __init__(self):
- rb.Plugin.__init__(self)
-
- def activate(self, shell):
- print "LOADING Zeitgeist plugin..."
- if IFACE is not None:
- shell_player = shell.get_player()
- shell_player.connect("playing-song-changed", self.playing_song_changed)
-
- backend_player = shell_player.get_property("player")
- backend_player.connect("eos", self.on_backend_eos)
-
- self.__manual_switch = True
- self.__current_song = None
- self._shell = shell
-
- # TODO: i18n for the name and description
- if IFACE.get_version() >= [0, 3, 2, 999]:
- IFACE.register_data_source(
- "com.zeitgeist-project,rhythmbox",
- "Rhythmbox",
- "Logs music-playback related events from Rhythmbox",
- [Event.new_for_values(actor="application://rhythmbox.desktop")]
- )
- else:
- print "Load failed..."
-
- @staticmethod
- def get_song_info(db, entry):
- song = {
- "album": db.entry_get(entry, rhythmdb.PROP_ALBUM),
- "artist": db.entry_get(entry, rhythmdb.PROP_ARTIST),
- "title": db.entry_get(entry, rhythmdb.PROP_TITLE),
- "location": db.entry_get(entry, rhythmdb.PROP_LOCATION),
- "mimetype": db.entry_get(entry, rhythmdb.PROP_MIMETYPE),
- }
- return song
-
-
- def on_backend_eos(self, backend_player, stream_data, eos_early):
- #print "got eos signal"
- # EOS signal means that the song changed because the song is over.
- # ie. the user did not explicitly change the song.
- self.__manual_switch = False
-
- def playing_song_changed(self, shell, entry):
- if self.__current_song is not None:
- self.send_to_zeitgeist_async(self.__current_song, Interpretation.LEAVE_EVENT)
-
- if entry is not None:
- self.send_to_zeitgeist_async(entry, Interpretation.ACCESS_EVENT)
-
- self.__current_song = entry
- gobject.idle_add(self.reset_manual_switch)
-
- def reset_manual_switch(self):
- """
- After the eos signal has fired, and after the zeitgeist events have
- been sent asynchronously, reset the manual_switch variable.
- """
- self.__manual_switch = True
-
- def send_to_zeitgeist_async(self, entry, event_type):
- """
- We do async here because the "eos" signal is fired
- *after* the "playing-song-changed" signal.
- We don't know if the song change was manual or automatic
- until we get get the eos signal. If the mainloop goes to
- idle, it means there are no more signals scheduled, so we
- will have already received the eos if it was coming.
- """
- gobject.idle_add(self.send_to_zeitgeist, entry, event_type)
-
- def send_to_zeitgeist(self, entry, event_type):
- db = self._shell.get_property("db")
- song = self.get_song_info(db, entry)
-
- if self.__manual_switch:
- manifest = Manifestation.USER_ACTIVITY
- else:
- manifest = Manifestation.SCHEDULED_ACTIVITY
- # TODO: Maybe a Manifestation representing "random song" would be useful?
-
- subject = Subject.new_for_values(
- uri=song["location"],
- interpretation=unicode(Interpretation.AUDIO),
- manifestation=unicode(Manifestation.FILE_DATA_OBJECT),
- #~ origin="", #TBD
- mimetype=song["mimetype"],
- text=" - ".join([song["title"], song["artist"], song["album"]])
- )
- event = Event.new_for_values(
- timestamp=int(time.time()*1000),
- interpretation=unicode(event_type),
- manifestation=unicode(manifest),
- actor="application://rhythmbox.desktop",
- subjects=[subject,]
- )
-
- IFACE.insert_event(event)
-
- def deactivate(self, shell):
- print "UNLOADING Zeitgeist plugin..."
diff --git a/rhythmbox/zeitgeist.rb-plugin b/rhythmbox/zeitgeist.rb-plugin
deleted file mode 100644
index 4827dcc..0000000
--- a/rhythmbox/zeitgeist.rb-plugin
+++ /dev/null
@@ -1,9 +0,0 @@
-[RB Plugin]
-Loader=python
-Module=zeitgeist-plugin
-IAge=1
-Name=Zeitgeist
-Description=Inform Zeitgeist about your activity
-Authors=Markus Korn <thekorn@gmx.de>
-Copyright=Copyright © 2009 Markus Korn
-Website=http://www.zeitgeist-project.com