diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | gedit/Makefile.am | 19 | ||||
-rw-r--r-- | gedit/README | 12 | ||||
-rw-r--r-- | gedit/zeitgeist.gedit-plugin | 10 | ||||
-rw-r--r-- | gedit/zeitgeist_plugin.py | 115 |
6 files changed, 3 insertions, 164 deletions
@@ -1,11 +1,12 @@ 2012-03-31: zeitgeist-datasources 0.8.1 +* New Firefox datasource using js-ctypes which replaces old native addon * New Thunderbird datasource * New Monodeveloper datasources +* Removed gedit datasource * Stop XChat from logging messages to avoid polluting database * Set telepathy subject uri's to telepathy://account_path/target_id * Fix actor for chrome -* New Firefox datasource using js-ctypes which replaces old datasource * Lazily loads Bazaar datasource * Fix an issue in which event was logged only for one chrome window * Log Firefox downloads diff --git a/configure.ac b/configure.ac index ed39916..288c007 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 eog geany gedit vim emacs tomboy telepathy xchat rhythmbox firefox totem-libzg firefox-36-libzg monodevelop thunderbird" +allowed_plugins="bzr chrome eog geany vim emacs tomboy telepathy xchat rhythmbox firefox totem-libzg firefox-36-libzg monodevelop thunderbird" # currently disabled = "epiphany" # npapi-plugin has a template Makefile.am, but don't use it directly @@ -103,8 +103,6 @@ for plugin in ${used_plugins}; do ;; eog) ;; - gedit) - ;; rhythmbox) ;; rhythmbox-popular) @@ -331,10 +329,6 @@ if test "x${PLUGINS}" != "x" ; then AC_CONFIG_FILES([geany/Makefile]) continue 2 ;; - gedit) - AC_CONFIG_FILES([gedit/Makefile]) - continue 2 - ;; tomboy) AC_CONFIG_FILES([tomboy/Makefile]) continue 2 diff --git a/gedit/Makefile.am b/gedit/Makefile.am deleted file mode 100644 index 707884b..0000000 --- a/gedit/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -PLUGIN_FILES = zeitgeist.gedit-plugin zeitgeist_plugin.py - -geditplugindir = $(libdir)/gedit-2/plugins -dist_geditplugin_DATA = $(PLUGIN_FILES) - -# we want to allow also local install -GEDIT_PLUGIN_HOME_DIR = ~/.gnome2/gedit/plugins - -local-install: - mkdir -p $(GEDIT_PLUGIN_HOME_DIR) - cp $(PLUGIN_FILES) $(GEDIT_PLUGIN_HOME_DIR) - -local-uninstall: - for f in $(PLUGIN_FILES); \ - do \ - echo remove $$f; \ - rm -f $(GEDIT_PLUGIN_HOME_DIR)/$$f; \ - done - diff --git a/gedit/README b/gedit/README deleted file mode 100644 index b4fe70c..0000000 --- a/gedit/README +++ /dev/null @@ -1,12 +0,0 @@ -Zeitgeist plugin to gedit -************************* - -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 '~/.gnome2/gedit/plugins'. -* Launch gedit, choose Edit -> Preferences, and select the Zeitgeist plugin on the Plugin tab. - -To update plugin changes: -* Run the install.sh script to recopy the plugin files. - diff --git a/gedit/zeitgeist.gedit-plugin b/gedit/zeitgeist.gedit-plugin deleted file mode 100644 index f1ffca4..0000000 --- a/gedit/zeitgeist.gedit-plugin +++ /dev/null @@ -1,10 +0,0 @@ -[Gedit Plugin] -Loader=python -Module=zeitgeist_plugin -IAge=2 -Name=Zeitgeist -Description=Inform Zeitgeist about your activity -Authors=Seif Lotfy <seif@lotfy.com> -Copyright=Copyright © 2009 Seif Lotfy <seif@lotfy.com> -Website=http://www.geekyogre.com - diff --git a/gedit/zeitgeist_plugin.py b/gedit/zeitgeist_plugin.py deleted file mode 100644 index f112b65..0000000 --- a/gedit/zeitgeist_plugin.py +++ /dev/null @@ -1,115 +0,0 @@ -# -.- coding: utf-8 -.- - -# Zeitgeist -# -# Copyright © 2009 Seif Lotfy <seif@lotfy.com> -# 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 Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later 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 Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -import gedit -import sys -import time - -from zeitgeist.client import ZeitgeistClient -from zeitgeist.datamodel import Event, Subject, Interpretation, Manifestation - -try: - CLIENT = ZeitgeistClient() -except RuntimeError, e: - print "Unable to connect to Zeitgeist, won't send events. Reason: '%s'" %e - CLIENT = None - -class ZeitgeistLogic: - def __init__(self, plugin, window): - self._window = window - self._plugin = plugin - self.current_uri = None - self._window.connect("tab-added", self.TabAddedHandler) - self._window.connect("tab-removed", self.TabRemovedHandler) - - def deactivate(self): - self._window.disconnect_by_func(self.TabAddedHandler) - self._window.disconnect_by_func(self.TabRemovedHandler) - self._window = None - self._plugin = None - - def TabAddedHandler(self, window, tab): - doc = tab.get_document() - print "Zeitgeist: loaded new tab ", doc.get_uri() - self.current_uri = doc.get_uri() - - """ - We don't send an OPEN_EVENT here because that will - be done after the document's 'loaded' signal is emitted. - - We do this because when if there are any empty tabs when - the user opens a file, the new file will replace the empty - tab, and the document's 'loaded' signal will fire, but no - tab is added and therefore no 'tab-added' is fired. - """ - - doc.connect("saved", self.SaveDocHandler) - doc.connect("loaded", self.TabLoadedHandler) - - def TabRemovedHandler(self, window, tab): - doc = tab.get_document() - print "Zeitgeist: tab removed", doc.get_uri() - doc.disconnect_by_func(self.SaveDocHandler) - doc.disconnect_by_func(self.TabLoadedHandler) - self.SendToZeitgeist(doc, Interpretation.LEAVE_EVENT) - - def TabLoadedHandler(self, doc, data): - if not self.current_uri == doc.get_uri(): - self.current_uri = doc.get_uri() - print "Zeitgeist: tab loaded document", doc.get_uri() - self.SendToZeitgeist(doc, Interpretation.ACCESS_EVENT) - - def SaveDocHandler(self, doc, data): - print "Zeitgeist: saved document", doc.get_uri() - self.SendToZeitgeist(doc, Interpretation.MODIFY_EVENT) - - def SendToZeitgeist(self, doc, event): - if doc.get_uri(): - subject = Subject.new_for_values( - uri=doc.get_uri(), - text=doc.get_short_name_for_display (), - interpretation=unicode(Interpretation.DOCUMENT), - manifestation=unicode(Manifestation.FILE_DATA_OBJECT), - origin=doc.get_uri().rpartition("/")[0], - mimetype=doc.get_mime_type(), #TBD - ) - event = Event.new_for_values( - timestamp=int(time.time()*1000), - interpretation=unicode(event), - manifestation=unicode(Manifestation.USER_ACTIVITY), - actor="application://gedit.desktop", - subjects=[subject,] - ) - CLIENT.insert_event(event) - - -class ZeitgeistPlugin(gedit.Plugin): - def __init__(self): - gedit.Plugin.__init__(self) - self._instances = {} - - def activate(self, window): - self._instances[window] = ZeitgeistLogic(self, window) - - def deactivate(self, window): - self._instances[window].deactivate() - del self._instances[window] - - |