[Zeitgeist] [Merge] lp:~mhr3/zeitgeist-extensions/scheme-detection into lp:zeitgeist-extensions

2011-09-29 Thread Michal Hruby
Michal Hruby has proposed merging 
lp:~mhr3/zeitgeist-extensions/scheme-detection into lp:zeitgeist-extensions.

Requested reviews:
  Zeitgeist Extensions (zeitgeist-extensions)

For more details, see:
https://code.launchpad.net/~mhr3/zeitgeist-extensions/scheme-detection/+merge/77481


-- 
https://code.launchpad.net/~mhr3/zeitgeist-extensions/scheme-detection/+merge/77481
Your team Zeitgeist Extensions is requested to review the proposed merge of 
lp:~mhr3/zeitgeist-extensions/scheme-detection into lp:zeitgeist-extensions.
=== modified file 'fts/fts.py'
--- fts/fts.py	2011-09-07 08:42:40 +
+++ fts/fts.py	2011-09-29 08:47:25 +
@@ -62,6 +62,7 @@
 log = logging.getLogger(zeitgeist.fts)
 
 INDEX_FILE = os.path.join(constants.DATA_PATH, fts.index)
+INDEX_VERSION = 1
 INDEX_LOCK = threading.Lock()
 FTS_DBUS_OBJECT_PATH = /org/gnome/zeitgeist/index/activity
 FTS_DBUS_INTERFACE = org.gnome.zeitgeist.Index
@@ -320,6 +321,9 @@
 			# force of a reindex
 			log.info(Index built without CJK support. Upgrading index)
 			self._queue.put(Reindex(self._engine))
+		elif self._index.get_metadata(fts_index_version) != INDEX_VERSION:
+			log.info(Index must be upgraded. Doing full rebuild)
+			self._queue.put(Reindex(self._engine))
 		elif self._index.get_doccount() == 0:
 			# If the index is empty we trigger a rebuild
 			# We must delay reindexing until after the engine is done setting up
@@ -472,7 +476,8 @@
 		self._index = xapian.WritableDatabase(INDEX_FILE, xapian.DB_CREATE_OR_OVERWRITE)
 		self._query_parser.set_database (self._index)
 		self._enquire = xapian.Enquire(self._index)
-		
+	
+		self._index.set_metadata(fts_index_version, INDEX_VERSION)
 		# Register that this index was built with CJK enabled
 		if XAPIAN_CJK_NGRAM in os.environ :
 			self._index.set_metadata(cjk_ngram, 1)
@@ -607,7 +612,7 @@
 		# usually web URIs, are indexed in another way because there may
 		# be domain name etc. in there we want to rank differently
 		scheme, host, path = self._split_uri (url_unescape (uri))
-		if scheme == file:// or not scheme:
+		if scheme == file or not scheme:
 			path, name = os.path.split(path)
 			self._tokenizer.index_text(name, 5)
 			self._tokenizer.index_text(name, 5, N)
@@ -617,9 +622,9 @@
 			while path and name:
 weight = weight / 1.5
 path, name = os.path.split(path)
-self._tokenizer.index_text(name, weight)
+self._tokenizer.index_text(name, int(weight))
 			
-		elif scheme == mailto::
+		elif scheme == mailto:
 			tokens = host.split(@)
 			name = tokens[0]
 			self._tokenizer.index_text(name, 6)

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 860362] Re: FTS doesn't index paths correctly

2011-09-29 Thread Michal Hruby
** Branch linked: lp:~mhr3/zeitgeist-extensions/scheme-detection

-- 
You received this bug notification because you are a member of Zeitgeist
Extensions, which is the registrant for Zeitgeist Extensions.
https://bugs.launchpad.net/bugs/860362

Title:
  FTS doesn't index paths correctly

Status in Zeitgeist Extensions:
  Triaged

Bug description:
  There's a bug in scheme branching in fts (~line 610) which cause
  file:// uris to truncate and index the same way as http and other
  uris.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist-extensions/+bug/860362/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 594215] Re: Add thunderbird support

2011-09-29 Thread tricote
I tried out the extension, too.
There is an issue with UTF8:
In my case I see many messages' topic as  =?UTF-8?B?0L/RgNC40LLQtdGC?= (not 
the same, of course)

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Data-Sources.
https://bugs.launchpad.net/bugs/594215

Title:
  Add thunderbird support

Status in Zeitgeist Data-Sources:
  In Progress

Bug description:
  I would like to have support for send and/or received Emails for a
  specified account.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist-datasources/+bug/594215/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 862333] [NEW] Add version metadata to FTS index

2011-09-29 Thread Mikkel Kamstrup Erlandsen
Public bug reported:

The Xapian index for the FTS extension should add version metadata to
more easily and cleanly facilitate re-indexing when needed

** Affects: zeitgeist-extensions
 Importance: High
 Assignee: Michal Hruby (mhr3)
 Status: In Progress

** Branch linked: lp:~mhr3/zeitgeist-extensions/scheme-detection

** Changed in: zeitgeist-extensions
   Importance: Undecided = High

** Changed in: zeitgeist-extensions
   Status: New = In Progress

** Changed in: zeitgeist-extensions
 Assignee: (unassigned) = Michal Hruby (mhr3)

-- 
You received this bug notification because you are a member of Zeitgeist
Extensions, which is the registrant for Zeitgeist Extensions.
https://bugs.launchpad.net/bugs/862333

Title:
  Add version metadata to FTS index

Status in Zeitgeist Extensions:
  In Progress

Bug description:
  The Xapian index for the FTS extension should add version metadata to
  more easily and cleanly facilitate re-indexing when needed

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist-extensions/+bug/862333/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 860362] Re: FTS doesn't index paths correctly

2011-09-29 Thread Mikkel Kamstrup Erlandsen
** Changed in: zeitgeist-extensions
 Assignee: (unassigned) = Michal Hruby (mhr3)

-- 
You received this bug notification because you are a member of Zeitgeist
Extensions, which is the registrant for Zeitgeist Extensions.
https://bugs.launchpad.net/bugs/860362

Title:
  FTS doesn't index paths correctly

Status in Zeitgeist Extensions:
  Triaged

Bug description:
  There's a bug in scheme branching in fts (~line 610) which cause
  file:// uris to truncate and index the same way as http and other
  uris.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist-extensions/+bug/860362/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Branch ~zeitgeist/zeitgeist/bluebird] Rev 278: Start implementing storage monitor extension.

2011-09-29 Thread noreply

revno: 278
committer: Siegfried-Angel Gevatter Pujals siegfr...@gevatter.com
branch nick: bluebird
timestamp: Thu 2011-09-29 17:30:04 +0200
message:
  Start implementing storage monitor extension.
added:
  extensions/storage-monitor.vala
  src/ext-storage-monitor.vala@
modified:
  .bzrignore
  extensions/Makefile.am
  extensions/blacklist.vala
  src/Makefile.am
  src/extension-collection.vala
  src/extension-store.vala


--
lp:~zeitgeist/zeitgeist/bluebird
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird

Your team Zeitgeist Framework Team is subscribed to branch 
lp:~zeitgeist/zeitgeist/bluebird.
To unsubscribe from this branch go to 
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird/+edit-subscription
=== modified file '.bzrignore'
--- .bzrignore	2011-09-17 19:38:43 +
+++ .bzrignore	2011-09-29 15:30:04 +
@@ -46,3 +46,5 @@
 test/direct/marshalling
 test/dbus/__pycache__
 test/direct/table-lookup-test
+src/zeitgeist-engine.vapi
+src/zeitgeist-engine.h

=== modified file 'extensions/Makefile.am'
--- extensions/Makefile.am	2011-09-05 10:27:02 +
+++ extensions/Makefile.am	2011-09-29 15:30:04 +
@@ -1,7 +1,7 @@
 NULL =
 
 #extensionsdir = $(libdir)/zeitgeist/extensions
-noinst_LTLIBRARIES = ds-registry.la blacklist.la
+noinst_LTLIBRARIES = ds-registry.la blacklist.la storage-monitor.la
 
 AM_CPPFLAGS = \
 	$(BLUEBIRD_CFLAGS) \
@@ -37,3 +37,13 @@
 blacklist_la_LIBADD = \
 	$(BLUEBIRD_LIBS) \
 	$(NULL)
+
+storage_monitor_la_SOURCES = \
+	storage-monitor.la \
+	$(NULL)
+
+storage_monitor_la_LDFLAGS = -module -avoid-version
+
+storage_monitor_la_LIBADD = \
+	$(BLUEBIRD_LIBS) \
+	$(NULL)

=== modified file 'extensions/blacklist.vala'
--- extensions/blacklist.vala	2011-09-28 12:51:08 +
+++ extensions/blacklist.vala	2011-09-29 15:30:04 +
@@ -145,9 +145,17 @@
 public override void pre_insert_events (GenericArrayEvent? events,
 BusName? sender)
 {
-for (int i=0; i  events.length; i++)
+for (int i = 0; i  events.length; i++)
+{
 foreach (var tmpl in blacklist.get_values ())
-if (events[i].matches_template (tmpl)) events[i] = null;
+{
+if (events[i].matches_template (tmpl))
+{
+events[i] = null;
+break;
+}
+}
+}
 }
 
 public void add_template (string template_id, Variant event_template)

=== added file 'extensions/storage-monitor.vala'
--- extensions/storage-monitor.vala	1970-01-01 00:00:00 +
+++ extensions/storage-monitor.vala	2011-09-29 15:30:04 +
@@ -0,0 +1,344 @@
+/* ds-registry.vala
+ *
+ * Copyright © 2011 Collabora Ltd.
+ * By Siegfried-Angel Gevatter Pujals siegfr...@gevatter.com
+ *
+ * Based upon a Python implementation:
+ *  Copyright © 2009 Mikkel Kamstrup Erlandsen mikkel.kamst...@gmail.com
+ *  Copyright © 2011 Canonical Ltd.
+ *
+ * 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 2.1 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 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/.
+ *
+ */
+
+using Zeitgeist;
+
+namespace Zeitgeist
+{
+[DBus (name = org.gnome.zeitgeist.StorageMonitor)]
+public interface RemoteStorageMonitor: Object
+{
+[DBus (signature = a(sa{sv}))]
+public abstract Variant get_storages () throws Error;
+
+public signal void storage_available (string storage_id,
+[DBus (signature = a{sv})] Variant storage_description);
+public signal void storage_unavailable (string storage_id);
+}
+
+namespace StorageMedia
+{
+private Variant to_variant (string medium_name, bool available,
+string icon, string display_name)
+{
+var vb = new VariantBuilder (new VariantType ((sa{sv})));
+
+vb.add (s, medium_name);
+vb.open (new VariantType (a{sv}));
+{
+vb.open (new VariantType ({sv}));
+vb.add (s, available);
+vb.add (v, new Variant (b, available));
+vb.close ();
+vb.open (new VariantType ({sv}));
+vb.add (s, icon);
+vb.add (v, new Variant (s, icon));
+vb.close ();
+vb.open (new VariantType ({sv}));
+vb.add (s, 

[Zeitgeist] [Bug 807950] Re: zeitgeist-daemon crashed with LookupError in remove_from_connection(): _zeitgeist.engine.remote.RemoteInterface at /org/gnome/zeitgeist/log/activity at 0xb74ee2cc is not

2011-09-29 Thread Matthias Schmidt
Fresh install of oneiric and the crash happened some seconds after the
login w/o doing anything.

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/807950

Title:
  zeitgeist-daemon crashed with LookupError in remove_from_connection():
  _zeitgeist.engine.remote.RemoteInterface at
  /org/gnome/zeitgeist/log/activity at 0xb74ee2cc is not exported at a
  location matching (None,None)

Status in Zeitgeist Framework:
  Fix Released
Status in “zeitgeist” package in Ubuntu:
  Triaged
Status in “zeitgeist” source package in Oneiric:
  Triaged

Bug description:
  I tried to start update of Ubuntu

  ProblemType: Crash
  DistroRelease: Ubuntu 11.10
  Package: zeitgeist-core 0.8.1-1ubuntu1
  ProcVersionSignature: Ubuntu 3.0-2.3-generic 3.0.0-rc4
  Uname: Linux 3.0-2-generic i686
  NonfreeKernelModules: nvidia
  Architecture: i386
  Date: Sat Jul  9 15:52:11 2011
  ExecutablePath: /usr/bin/zeitgeist-daemon
  InstallationMedia: Ubuntu 11.10 Oneiric Ocelot - Alpha i386 (20110704.1)
  InterpreterPath: /usr/bin/python2.7
  PackageArchitecture: all
  ProcCmdline: /usr/bin/python /usr/bin/zeitgeist-daemon
  ProcEnviron:
   SHELL=/bin/bash
   LANG=ru_RU.UTF-8
  PythonArgs: ['/usr/bin/zeitgeist-daemon']
  SourcePackage: zeitgeist
  Title: zeitgeist-daemon crashed with LookupError in remove_from_connection(): 
_zeitgeist.engine.remote.RemoteInterface at /org/gnome/zeitgeist/log/activity 
at 0xb74ee2cc is not exported at a location matching (None,None)
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/807950/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp